feat(api): wire an admin trigger for agent-regate-pr's force field - #8967
feat(api): wire an admin trigger for agent-regate-pr's force field#8967hurryup52 wants to merge 2 commits into
Conversation
Adds POST /v1/internal/jobs/agent-regate-pr, the first real producer for the force flag on the agent-regate-pr job (previously plumbed and tested but unreachable from any automatic path). Lets an operator force a fresh AI opinion on a specific repo+PR instead of reusing a cached result. Closes JSONbored#8898
Closes the codecov/patch gap flagged on the prior review: the non-integer and negative prNumber arms of the 400 validation guard weren't exercised, only the missing-field case was.
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #8967 +/- ##
==========================================
+ Coverage 90.56% 91.08% +0.52%
==========================================
Files 96 99 +3
Lines 22490 25149 +2659
Branches 3884 4685 +801
==========================================
+ Hits 20367 22907 +2540
- Misses 1945 1975 +30
- Partials 178 267 +89
Flags with carried forward coverage won't be shown. Click here to find out more.
|
|
Caution 🛑 LoopOver review result - reject/close recommendedReview updated: 2026-07-26 14:48:02 UTC
Review summary Nits — 5 non-blocking
Why this is blocked
📋 Copy for AI agents — paste into your coding agentCI checks failing
Decision drivers
Context & advisory signals — never blocks the verdict
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. Visual preview
Click any thumbnail to open the full-size screenshot. Before = production · After = this PR's preview deploy. Scroll preview
A short scroll-through clip (desktop) — click either thumbnail to open the full animation. Evidence for scroll-linked behavior a single screenshot can't show. 🟩 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.
|
|
This pull request changes UI/visual code but its screenshot evidence is incomplete. Every required viewport × theme combination needs its own before/after image pair in a labeled table row (e.g. "Desktop · Light | before | after"). Still missing: Desktop · Dark, Tablet · Dark, Mobile · Dark. Please resubmit with the remaining rows filled in. See https://github.com/JSONbored/loopover/blob/main/.claude/skills/contributing-to-loopover/SKILL.md for the exact format and examples. This is an automated maintenance action. |


Summary
agent-regate-prjob messages carry an optionalforcefield, threaded throughregatePullRequestto bypass the AI review cache — but no producer ever sets it (confirmed: all 9 existing call sites omit it).POST /v1/internal/jobs/agent-regate-pr, an operator-gated route (bearer-gated by the shared/v1/internal/*middleware) that enqueues anagent-regate-prjob withforce: truefor an operator-specifiedrepoFullName/prNumber.getPullRequest/getRepositorybefore enqueuing (404 if either is missing), 400 on missing/invalid input (including non-integer/negativeprNumber).openapi.json.Scope
type(scope): short summaryConventional Commit format.CONTRIBUTING.mdand does not reintroduce GitHub Pages, VitePress,site/, orCNAME.Closes #8898).Validation
git diff --checknpm run actionlintnpm run typechecknpm run test:coveragelocally — new integration test covers both 400 branches (missing field, non-integer, negative), both 404 branches (missing PR, PR-present-but-repo-unregistered), the 202 success shape, and the 401 no-bearer case.npm run test:workersnpm run build:mcpnpm run test:mcp-packnpm run ui:openapi:checknpm run ui:lintnpm run ui:typechecknpm run ui:buildnpm audit --audit-level=moderateIf any required check was skipped, explain why:
test:workers/build:mcp/test:mcp-pack/ui:lint/ui:typecheck/ui:buildskipped: this PR touches onlysrc/api/routes.ts,src/types.ts,src/openapi/spec.ts, its test file, and the generatedapps/loopover-ui/public/openapi.json— no MCP package code and noapps/loopover-uisource/component code changed, so those builds/lints are not exercised by this diff.Safety
UI Evidencesection below — N/A, see below.UI Evidence
N/A — this PR contains no visible UI, frontend, or docs change. The only path touched under
apps/loopover-ui/is the generatedapps/loopover-ui/public/openapi.json, a machine-written API-schema data file produced bynpm run ui:openapi(required by this repo'sui:openapi:checkdrift gate wheneversrc/openapi/spec.tschanges) — it is not rendered UI code and has no visual output to screenshot.Notes
codecov/patchwas at 92.30% (fixed in this PR by adding the missing invalid-prNumberbranch coverage), and a screenshot-evidence gate flagged the diff as a "UI/visual" change purely because it touches a path underapps/loopover-ui/— the file in question is the generated, non-visualopenapi.json, not UI code (seeUI Evidenceabove).