fix(mosaic): preserve grant safety invariants

This commit is contained in:
2026-08-05 18:01:41 -05:00
parent ce0a8ad7d1
commit d5ed9cfdf1
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.