Problem
src/settings/command-authorization.ts:138 maps commenter author_association === OWNER || MEMBER → maintainer role. MEMBER is org membership, not maintainer-of-this-repo. The HTTP write path (requireRepoWriteAccess) deliberately avoids trusting association for exactly this reason.
Why this is a hard agent-layer prerequisite
Acceptable while commands are read-only — becomes a privilege-escalation bug the moment @gittensory commands gain write power (merge/close/review) in Phase 1 (#778). Must be fixed before N6.
Fix
When commands become write-capable, resolve real repo permission via the installation (getRepositoryCollaboratorPermission) instead of author_association.
Acceptance
Problem
src/settings/command-authorization.ts:138 maps commenter
author_association === OWNER || MEMBER→ maintainer role. MEMBER is org membership, not maintainer-of-this-repo. The HTTP write path (requireRepoWriteAccess) deliberately avoids trusting association for exactly this reason.Why this is a hard agent-layer prerequisite
Acceptable while commands are read-only — becomes a privilege-escalation bug the moment @gittensory commands gain write power (merge/close/review) in Phase 1 (#778). Must be fixed before N6.
Fix
When commands become write-capable, resolve real repo permission via the installation (getRepositoryCollaboratorPermission) instead of author_association.
Acceptance