fix(mosaic): preserve grant safety invariants

This commit is contained in:
be-coder-06
2026-08-05 13:11:04 -05:00
committed by Hermes Agent
parent 1e58e6c74a
commit 2419313286
13 changed files with 562 additions and 144 deletions
+1 -1
View File
@@ -193,4 +193,4 @@ No ref is updated and no repository artifact is created. This proves that the de
## Grant read-back
A collaborator grant is accepted only when the provider returns the named collaborator permission and the subject credential independently reads the repository with matching effective permission. A team grant additionally requires provider-read-back of organization membership, team membership, team repository attachment, and effective subject permission. Token capability, repository permission, and organization/team role are reported as separate layers; no layer substitutes for another.
A collaborator grant is accepted only when the provider returns the named collaborator permission and the subject credential independently reads the repository with matching effective permission. A team grant additionally enumerates the team's complete repository attachment set before mutation and refuses any team already attached outside the one explicitly requested repository (`team-scope-exceeds-request`). It then requires provider read-back of organization membership, team membership, team repository attachment, and effective subject permission. Token capability, repository permission, and organization/team role are reported as separate layers; no layer substitutes for another.