feat(review): record a confirmed override when the owner closes an AI-judgment-held PR - #8125
Conversation
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
…-judgment-held PR (JSONbored#8123)
c98b19c to
6cd2db5
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8125 +/- ##
==========================================
- Coverage 92.02% 89.53% -2.49%
==========================================
Files 760 98 -662
Lines 77372 22786 -54586
Branches 23386 3915 -19471
==========================================
- Hits 71203 20402 -50801
+ Misses 5061 2199 -2862
+ Partials 1108 185 -923
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-23 00:17:00 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.
|
Summary
Closes #8123.
Implements #8106's recorded decision: the repo owner closing (not merging) a PR that was held for a low-confidence AI judgment is the explicit "the automated call was right" signal — the confirmed-side mirror of
recordReversalSignals' existing reversal hooks, and the first non-inferred positive confirmation in this system.recordReversalSignals(src/review/outcomes-wire.ts), using the exactownerLogin === senderLogincheck the reversal side already uses. A contributor's own close records nothing.aiReviewLowConfidenceHold" is detected the same way calibration: wire linked_issue_scope_mismatch into the shared signal-tracking module (fired + reversal) #8101 detects its rule: a recordedrule_firedevent for eitherAI_JUDGMENT_BLOCKER_CODEScode (ai_consensus_defect/ai_review_split, imported fromsrc/rules/advisory.ts) against this target within the 30-day lookback calibration: wire recordRuleFired/recordHumanOverride for the remaining isConfiguredGateBlocker codes (excludes linked_issue_scope_mismatch, covered by #8101) #8104 established. Each matching code gets a"confirmed"HumanOverrideEventvia the existingcreateSignalStoreadapter.aiReviewLowConfidenceHoldonly — the other two hold kinds carry no ruleId-equivalent to key on (the issue's explicit boundary).resolveAiReviewLowConfidenceHoldand the holds' production logic are untouched..catch(() => undefined)and the helper mirrors calibration: wire linked_issue_scope_mismatch into the shared signal-tracking module (fired + reversal) #8101's shape exactly — a SignalStore failure can never affect the PR-close handling (pinned by test). An owner merge-close never enters this branch (the merged path remains the reversal side's business — also pinned by test).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:
test/unit/outcomes-wire.test.ts— 79/79 green, including 7 new calibration: record a 'confirmed' HumanOverrideEvent when an owner closes an aiReviewLowConfidenceHold PR #8123 cases covering every branch the issue's own requirements enumerate: owner-vs-contributor, held-vs-not-held (a non-AI rule firing does not make it an AI hold), matching-vs-different-target, both AI codes confirmed in one close, the merged-close exclusion, and the fail-open.catchpath (a rejecting SignalStore never throws out of the handler). The diff is one focused branch + one helper mirroring the adjacent, already-merged calibration: wire linked_issue_scope_mismatch into the shared signal-tracking module (fired + reversal) #8101 hook, so the changed lines are exercised end-to-end by those cases; real CI re-runs typecheck and the sharded suite here.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.The three unchecked Safety boxes are N/A: no auth/session/UI change — a webhook-side recording hook plus tests.
UI Evidence
N/A — no UI change.
Notes
ai_consensus_defect/ai_review_splitbecome the first rules whose calibration: pure confusion-matrix scorer for a candidate rule classifier against the backtest corpus #8085 backtest precision reflects genuine positive confirmations rather than a reversal-only floor — exactly the issue's Expected Outcome.