Skip to content

fix(review): manual-review label actions hardcode requiresApproval: false, bypassing auto_with_approval #3661

Description

@JSONbored

Problem

planAgentMaintenanceActions in src/settings/agent-actions.ts emits several manual-review-label actions (guardrail hold, migration-collision fallback, the two unlinked-issue-match fallbacks, and the final manual-hold fallback) with requiresApproval hardcoded to false, instead of deriving it from the governing autonomy class the way every other label action in this function does (approval("close"), approval("review_state_label"), etc).

Net effect: a repo configured with autonomy: { merge: "auto_with_approval" } (or close: "auto_with_approval" for the manual-hold fallback) still has these specific manual-review labels applied immediately, with no maintainer approval step — silently bypassing the approval gate the operator explicitly configured.

Fix

Derive requiresApproval via approval("merge") / approval(manualHoldAutonomyClass) matching each action's actual governing autonomy class, consistent with the rest of the function. Covers all five call sites (including the two unlinked-issue-match fallbacks added by the credibility-gate-farming guardrail after the original fix branch was cut).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions