fix(review): enforce blocker-first PR verdicts - #1781
Conversation
|
Caution 🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥 🛑 Gittensory review result - fixes requiredReview updated: 2026-06-30 01:31:02 UTC
🛑 Suggested Action - Manual Review
Review summary Blockers
Nits — 5 non-blocking
Why this is blocked
CI checks failing
Review context
Contributor next steps
Signal definitions
🟩 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 Gittensory, a quiet PR intelligence layer for OSS maintainers.
|
ab04d9f to
31648de
Compare
Codecov Report❌ Patch coverage is ❌ Your patch status has failed because the patch coverage (70.79%) is below the target coverage (97.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #1781 +/- ##
==========================================
- Coverage 95.74% 95.64% -0.10%
==========================================
Files 211 214 +3
Lines 23030 23218 +188
Branches 8322 8390 +68
==========================================
+ Hits 22050 22207 +157
- Misses 401 417 +16
- Partials 579 594 +15
🚀 New features to boost your workflow:
|
…urable disposition (#4603) isConfiguredGateBlocker voided aiReviewCloseConfidence entirely (commit 311b761, #1781), so a sub-floor ai_consensus_defect/ai_review_split finding always one-shot-closed a contributor PR under aiReviewGateMode: block regardless of the AI reviewers' own calibrated confidence, while five other comments across the codebase still described the old (correct) "downgrades to a hold" behavior. Adds aiReviewLowConfidenceDisposition ("one_shot" | "hold_for_review" | "advisory_only", default hold_for_review) to govern a sub-floor finding: hold_for_review (shipped default) still blocks the gate but routes the would-be close through the same held-for-manual-review mechanism the disposition planner already uses for migrationCollisionHold/unlinkedIssueMatchHold; one_shot keeps today's unconditional-close behavior as an opt-in; advisory_only drops a sub-floor finding to non-blocking. Wires the new field through the full template this repo uses for a RepositorySettings field: migration + Drizzle schema + resolver/parser (src/db/repositories.ts), OpenAPI schema + regenerated apps/gittensory-ui/public/openapi.json, .gittensory.yml config-as-code override (gate.aiReview.lowConfidenceDisposition), and the maintainer /ai-review + internal settings routes. Mirrors the gate-decision change into the packages/gittensory-engine predictor twin so the MCP predict_gate tool stays accurate. Fixes all 6 stale-comment locations the original audit found.
…urable disposition (#4656) * fix(review): resolve dead aiReviewCloseConfidence floor with a configurable disposition (#4603) isConfiguredGateBlocker voided aiReviewCloseConfidence entirely (commit 311b761, #1781), so a sub-floor ai_consensus_defect/ai_review_split finding always one-shot-closed a contributor PR under aiReviewGateMode: block regardless of the AI reviewers' own calibrated confidence, while five other comments across the codebase still described the old (correct) "downgrades to a hold" behavior. Adds aiReviewLowConfidenceDisposition ("one_shot" | "hold_for_review" | "advisory_only", default hold_for_review) to govern a sub-floor finding: hold_for_review (shipped default) still blocks the gate but routes the would-be close through the same held-for-manual-review mechanism the disposition planner already uses for migrationCollisionHold/unlinkedIssueMatchHold; one_shot keeps today's unconditional-close behavior as an opt-in; advisory_only drops a sub-floor finding to non-blocking. Wires the new field through the full template this repo uses for a RepositorySettings field: migration + Drizzle schema + resolver/parser (src/db/repositories.ts), OpenAPI schema + regenerated apps/gittensory-ui/public/openapi.json, .gittensory.yml config-as-code override (gate.aiReview.lowConfidenceDisposition), and the maintainer /ai-review + internal settings routes. Mirrors the gate-decision change into the packages/gittensory-engine predictor twin so the MCP predict_gate tool stays accurate. Fixes all 6 stale-comment locations the original audit found. * fix(review): restore accidentally-deleted accuracy-trend feature + close codecov/patch gap on #4603 Two independent problems found in PR #4656 (#4603) before merge, both fixed here: 1. The PR silently deleted src/services/public-accuracy-trend.ts (181 lines) and its test, un-exported the public-stats.ts helpers it depended on, and dropped the accuracyTrend field from the public GET /v1/public/stats response -- entirely unrelated to #4603's actual scope (a live, wired-in public homepage feature from epic #4445/#4447, undisclosed in the commit message or PR body). Restored all four pieces verbatim from main. 2. codecov/patch was failing (83.33% vs 99% target): the new isConfiguredGateBlocker branches for aiReviewLowConfidenceDisposition in packages/gittensory-engine/src/advisory/gate-advisory.ts had a dedicated node:test suite, but that suite runs against the compiled dist/ output in a separate test runner whose coverage never reaches the coverage/lcov.info file Codecov actually reads -- only the root vitest suite's coverage does, and it only touches this file through the handful of test/unit/*.ts files that import it directly by relative path (not via the npm package). Added the missing branch cases to the existing test/unit/predicted-gate-engine-branch-coverage.test.ts, which does import it that way. Also found src/api/routes.ts's `updated.aiReviewLowConfidenceDisposition ?? "hold_for_review"` fallback is unreachable in practice -- parseAiReviewLowConfidenceDisposition's return type is non-nullable and already falls back to the same literal itself -- so marked it /* v8 ignore next */ rather than writing a contrived test for a branch that can't actually run. Part of #4603
Summary
What changed
linked_issue_claimed_atfor PRs and threaded claim-aware duplicate winner logic through gate, comments, and planner paths.Why
Blocked PRs were sometimes rendered as manual review when a guardrail/size hold was also present. Same-linked-issue duplicate handling also used PR creation order, which let older PRs that edited in a claim later suppress the real first claimant.
Validation
npm run validate— 5,166 tests passed, 4 skipped; coverage completed successfully.npm run db:migrations:check— migrations contiguous through 0084.npm audit --audit-level=moderate— 0 vulnerabilities.git diff --checkgrafana/dashboards/maintainer-reviews.jsonwith Node.