⚠️ Definition of Done: this issue must be completed in full, in a single PR. Do not split this
work across multiple PRs, and do not defer any Deliverable below to a follow-up issue. A PR that
satisfies only some of the Deliverables, stubs a required test, or leaves a checkbox
partially-done does NOT resolve this issue and will be closed.
Context
The agent-regate-pr job type carries an optional force field (src/queue/job-dispatch.ts:285-297, which reads and threads message.force into regatePullRequest), explicitly documented as "no production scheduler or webhook enqueues a job with force set today, so this is a supported hook for a future manual-trigger producer, not yet reachable from any automatic path." Confirmed via grep: none of the 9 agent-regate-pr producer call sites (src/queue/processors.ts:1380,1587,1842,1914,4438,4487,4541,4884, src/review/pr-reconciliation.ts:132) ever set .force. This is distinct from webhook.forceAiReview, which IS reachable via the PR-panel checkbox / @loopover review.
Requirements
Add an admin API route (Bearer-gated the same way other /v1/internal/* routes are) or CLI command that enqueues { type: "agent-regate-pr", force: true, ... } for a specific repo+PR, giving the already-built-and-tested force plumbing a real caller.
Deliverables
All of the above Deliverables are required in the same PR unless the deliverable text itself states otherwise.
Test Coverage Requirements
src/** -- 99%+ patch coverage, branch-counted, on the new route/command and its end-to-end wiring.
Expected Outcome
An operator can force a re-gate of a specific PR through a real, reachable trigger, instead of the force field being built and tested but permanently unreachable.
Links & Resources
src/queue/job-dispatch.ts:285-297
src/queue/processors.ts:1380,1587,1842,1914,4438,4487,4541,4884
src/review/pr-reconciliation.ts:132
Context
The
agent-regate-prjob type carries an optionalforcefield (src/queue/job-dispatch.ts:285-297, which reads and threadsmessage.forceintoregatePullRequest), explicitly documented as "no production scheduler or webhook enqueues a job withforceset today, so this is a supported hook for a future manual-trigger producer, not yet reachable from any automatic path." Confirmed via grep: none of the 9agent-regate-prproducer call sites (src/queue/processors.ts:1380,1587,1842,1914,4438,4487,4541,4884,src/review/pr-reconciliation.ts:132) ever set.force. This is distinct fromwebhook.forceAiReview, which IS reachable via the PR-panel checkbox /@loopover review.Requirements
Add an admin API route (Bearer-gated the same way other
/v1/internal/*routes are) or CLI command that enqueues{ type: "agent-regate-pr", force: true, ... }for a specific repo+PR, giving the already-built-and-testedforceplumbing a real caller.Deliverables
agent-regate-prjob withforce: truefor an operator-specified repo+PRforce: trueand thatregatePullRequestreceives itAll of the above Deliverables are required in the same PR unless the deliverable text itself states otherwise.
Test Coverage Requirements
src/**-- 99%+ patch coverage, branch-counted, on the new route/command and its end-to-end wiring.Expected Outcome
An operator can force a re-gate of a specific PR through a real, reachable trigger, instead of the
forcefield being built and tested but permanently unreachable.Links & Resources
src/queue/job-dispatch.ts:285-297src/queue/processors.ts:1380,1587,1842,1914,4438,4487,4541,4884src/review/pr-reconciliation.ts:132