Skip to content

feat(queue): wire an admin trigger for agent-regate-pr's force field, which currently has zero producers #8898

Description

@JSONbored

⚠️ 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

  • A new admin-gated route (or CLI command, if a route isn't the right shape) that enqueues an agent-regate-pr job with force: true for an operator-specified repo+PR
  • An integration test exercising the new route/command end-to-end, asserting the enqueued job actually carries force: true and that regatePullRequest receives it

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    gittensor:featureGittensor-scored feature linked to a feature issue — scores a 0.25x multiplier.help wantedExtra attention is needed

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions