Skip to content

feat(requirements): support allowed_approval_reviewers#16701

Open
owenlin0 wants to merge 2 commits intomainfrom
owen/approvals_reviewer_requirements_toml
Open

feat(requirements): support allowed_approval_reviewers#16701
owenlin0 wants to merge 2 commits intomainfrom
owen/approvals_reviewer_requirements_toml

Conversation

@owenlin0
Copy link
Copy Markdown
Collaborator

@owenlin0 owenlin0 commented Apr 3, 2026

Description

Add requirements.toml support for allowed_approvals_reviewers = ["user", "guardian_subagent"], so admins can now restrict the use of guardian mode.

Note: If a user sets a reviewer that isn’t allowed by requirements.toml, config loading falls back to the first allowed reviewer and emits a startup warning.

The table below describes the possible admin controls.

Admin intent requirements.toml User config.toml End result
Leave Guardian optional omit allowed_approvals_reviewers or set ["user", "guardian_subagent"] user chooses approvals_reviewer = "user" or "guardian_subagent" Guardian off for user, on for guardian_subagent + approval_policy = "on-request"
Force Guardian off allowed_approvals_reviewers = ["user"] any user value Effective reviewer is user; Guardian off
Force Guardian on allowed_approvals_reviewers = ["guardian_subagent"] and usually allowed_approval_policies = ["on-request"] any user reviewer value; user should also have approval_policy = "on-request" unless policy is forced Effective reviewer is guardian_subagent; Guardian on when effective approval policy is on-request
Allow both, but default to manual if user does nothing allowed_approvals_reviewers = ["user", "guardian_subagent"] omit approvals_reviewer Effective reviewer is user; Guardian off
Allow both, and user explicitly opts into Guardian allowed_approvals_reviewers = ["user", "guardian_subagent"] approvals_reviewer = "guardian_subagent" and approval_policy = "on-request" Guardian on
Invalid admin config allowed_approvals_reviewers = [] anything Config load error

@owenlin0 owenlin0 force-pushed the owen/approvals_reviewer_requirements_toml branch from 7888c91 to 2a352b8 Compare April 3, 2026 17:17
@owenlin0 owenlin0 marked this pull request as ready for review April 3, 2026 18:08
@owenlin0 owenlin0 requested a review from dylan-hurd-oai April 3, 2026 18:08
@owenlin0 owenlin0 force-pushed the owen/approvals_reviewer_requirements_toml branch from 70fc446 to 95ddc09 Compare April 3, 2026 18:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant