This is the safety-critical core of Phase 5: the single chokepoint every miner write action (open_pr, file_issue, apply_labels, post_eligibility_comment, create_branch, delete_branch — the exact set in src/mcp/local-write-tools.ts) MUST pass through before it executes, and it must FAIL CLOSED — any internal error, missing config, or unexpected state denies the action rather than allowing it. This wires together the previously-built pure calculators (rate-limit, budget caps, non-convergence detector) into one real enforcement path and is the reason this phase exists.
Given the strategic risk (the #1 slop-at-scale concern per the roadmap), this issue is intentionally maintainer-owned: the owner wants to build and review the actual enforcement wiring personally.
Deliverables
References
src/mcp/local-write-tools.ts (70 lines) — the exact write-action spec builders this chokepoint gates
src/settings/agent-execution.ts — the existing "safest wins" precedence pattern (paused/dry_run/live resolution) to mirror for composing multiple safety layers
src/settings/autonomy.ts (resolveAutonomy, deny-by-default pattern) — the reusable autonomy dial this chokepoint should consult first
This is the safety-critical core of Phase 5: the single chokepoint every miner write action (open_pr, file_issue, apply_labels, post_eligibility_comment, create_branch, delete_branch — the exact set in
src/mcp/local-write-tools.ts) MUST pass through before it executes, and it must FAIL CLOSED — any internal error, missing config, or unexpected state denies the action rather than allowing it. This wires together the previously-built pure calculators (rate-limit, budget caps, non-convergence detector) into one real enforcement path and is the reason this phase exists.Given the strategic risk (the #1 slop-at-scale concern per the roadmap), this issue is intentionally maintainer-owned: the owner wants to build and review the actual enforcement wiring personally.
Deliverables
GovernorDecisionchokepoint function that every local-write-tool caller invokes before executing aLocalWriteActionSpecfromsrc/mcp/local-write-tools.tsLocalWriteActionSpecsrc/settings/agent-execution.ts's "safest wins" style (global kill-switch > per-repo pause > dry-run > rate-limit > budget cap > non-convergence > allow)References
src/mcp/local-write-tools.ts(70 lines) — the exact write-action spec builders this chokepoint gatessrc/settings/agent-execution.ts— the existing "safest wins" precedence pattern (paused/dry_run/liveresolution) to mirror for composing multiple safety layerssrc/settings/autonomy.ts(resolveAutonomy, deny-by-default pattern) — the reusable autonomy dial this chokepoint should consult first