fix(review): fold pause into the ai-review public gate skip reason - #9909
Conversation
A paused repo's publish pass still computes the gate verdict (only GitHub writes are suppressed), so resolvePublicAiReviewGateSkipReason now checks mode === "paused" first, matching the stop runAiReviewForAdvisory already applies. Threading AgentActionMode through shouldStartAiReviewForAdvisory and shouldRequirePublicAiReviewForAdvisory keeps aiReviewWillRun in sync with reality on a paused pass, so the ai_review_public_summary_missing alarm and review-evasion tracking no longer fire against a review that was never expected to run.
|
Tip ✅ LoopOver review result - approve/merge recommendedReview updated: 2026-07-29 21:54:12 UTC
Review summary Nits — 3 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.
|
|
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 #9909 +/- ##
==========================================
+ Coverage 79.52% 80.42% +0.90%
==========================================
Files 281 283 +2
Lines 58577 62208 +3631
Branches 6833 8193 +1360
==========================================
+ Hits 46581 50030 +3449
- Misses 11706 11766 +60
- Partials 290 412 +122
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Summary
resolvePublicAiReviewGateSkipReasonhad no way to know the pass was paused, soaiReviewWillRunstayedtruewhilerunAiReviewForAdvisorycorrectly refused to spend onmode: "paused". That mismatch fired thegithub_app.ai_review_public_summary_missingalarm andcapturePostHogReviewFailureon every single paused pass, plus started review-evasion tracking for a review that would never run."paused"toPublicAiReviewGateSkipReasonand threadsmode: AgentActionMode(required) throughresolvePublicAiReviewGateSkipReason→shouldRequirePublicAiReviewForAdvisory→shouldStartAiReviewForAdvisory, mirroring the mode checkrunAiReviewForAdvisoryalready applies as its own first line.pausedis evaluated beforeskip_ai_review_requested, matching that priority order.processors.tscall site (the three fail-closed holds plus theaiReviewWillRuncomposition and the named-reason audit) now passes the pass's already-resolvedmode, so a paused pass records exactly onegithub_app.ai_review_public_gate_skippedrow namingpausedand nothing else changes forlive/dry_run.Closes #9692
Scope
type(scope): short summaryConventional Commit format, for examplefix(api): restore profile access checks.CONTRIBUTING.mdand does not reintroduce GitHub Pages, VitePress,site/, orCNAME.Closes #123) — a linked open issue is required for every contributor PR.Validation
git diff --checknpm run actionlintnpm run typechecknpm run test:coveragelocally;codecov/patchrequires ≥99% coverage of the lines AND branches you changed (aim for 100% on your diff so CI variance does not fail near the threshold). Global coverage is a non-blocking trend with a loose 90% backstop, not the gate.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:
src/queue/**(no UI, MCP, wrangler, or dependency changes), soactionlint/ui:*/build:mcp/test:mcp-pack/npm auditare unaffected by the diff and were not re-run locally given the shared-workspace time budget;typecheckand the targetedvitestruns below (including full coverage on the two changed files) are green.Validation detail
npx tsc --noEmit(root) andtsc -p packages/loopover-contract|loopover-mcp|loopover-miner/tsconfig.json --noEmitare clean.npx vitest run test/unit/ai-review-advisory.test.ts test/unit/auto-review-wiring.test.ts test/unit/gate-integrity-invariants.test.ts test/unit/reputation-wiring.test.ts test/unit/queue-2.test.ts --coverage— 256/256 passing;src/queue/ai-review-orchestration.tsat 96%/93.7% stmt/branch with the only uncovered lines pre-existing and unrelated to this diff (RAG context building, escalation logging, vote recording).npx vitest run test/unit/queue.test.ts test/unit/queue-2.test.ts test/unit/queue-3.test.ts test/unit/queue-4.test.ts test/unit/queue-5.test.ts test/unit/queue-lifecycle-guards.test.ts— all green (1000+ tests), confirming no regression in the existingagentPaused/aiReviewModepaths.test/unit/queue-2.test.tsdrives a realprocessJobwebhook pass against a repo withagentPaused: trueandaiReviewMode: "block", asserting: zeroai_review_public_summary_missingaudit rows, exactly oneai_review_public_gate_skippedrow withreason: "paused", and zeroactive_review_trackingrows for the head SHA — matching every Deliverable in the issue.Safety
UI Evidencesection below with JPG/JPEG or PNG screenshots arranged as organized, captioned, clickable thumbnails. SVG screenshots are not used as review evidence. Review-only screenshots or recordings are not committed to the repository. (Not applicable — backend-only change.)UI Evidence
Not applicable — this is a backend-only fix in
src/queue/ai-review-orchestration.tsandsrc/queue/processors.tswith no visible surface change.Notes
mode === "live"or"dry_run"; only thepausedpass's named skip reason changes.