feat(queue): wire an admin trigger for agent-regate-pr force re-gates - #8958
Conversation
Add POST /v1/internal/jobs/regate-pr, a Bearer-gated operator route that enqueues an agent-regate-pr job with force: true for a specific repo+PR. Until now the job's force field had no production producer -- every scheduled/webhook caller left it unset, so the fresh-opinion plumbing (bypassing the durable review cache and the non-cacheable-reuse cooldown) was built and tested but unreachable. This gives it a real caller. The route trims/resolves the repo, 400s a blank repo or non-positive PR number, and 404s a repo with no known installation. An end-to-end test asserts the enqueued job carries force: true and that processJob threads it straight into regatePullRequest. Closes JSONbored#8898
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8958 +/- ##
==========================================
+ Coverage 90.56% 91.02% +0.46%
==========================================
Files 96 97 +1
Lines 22490 24953 +2463
Branches 3884 4677 +793
==========================================
+ Hits 20367 22713 +2346
- Misses 1945 1975 +30
- Partials 178 265 +87
Flags with carried forward coverage won't be shown. Click here to find out more.
|
|
Tip ✅ LoopOver review result - approve/merge recommendedReview updated: 2026-07-26 14:35:48 UTC
Review summary Nits — 5 non-blocking
Decision drivers
Context & advisory signals — never blocks the verdict
Linked issue satisfactionAddressed Review context
Contributor next steps
Signal definitions
🧪 Chat with LoopOverAsk LoopOver a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.
Full command reference: https://loopover.ai/docs/loopover-commands 🧪 Experimental — new and may change. 🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed 💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by LoopOver, a quiet PR intelligence layer for OSS maintainers.
|
feat(queue): wire an admin trigger for agent-regate-pr force re-gates
Add POST /v1/internal/jobs/regate-pr, a Bearer-gated operator route that
enqueues an agent-regate-pr job with force: true for a specific repo+PR.
Until now the job's force field had no production producer -- every
scheduled/webhook caller left it unset, so the fresh-opinion plumbing
(bypassing the durable review cache and the non-cacheable-reuse cooldown)
was built and tested but unreachable. This gives it a real caller.
The route trims/resolves the repo, 400s a blank repo or non-positive PR
number, and 404s a repo with no known installation. An end-to-end test
asserts the enqueued job carries force: true and that processJob threads
it straight into regatePullRequest.
Closes #8898
Validation
Verified locally on this branch before opening:
npm run typechecknpx turbo run build:tsc build:verifynpm run test:coverage— patch coverage 100.0% of changed lines