Skip to content

fix(orb): gate the ai_review_inconclusive hold on aiReviewGateMode - #10239

Merged
loopover-orb[bot] merged 1 commit into
JSONbored:mainfrom
bitfathers94:fix/issue-10016
Jul 31, 2026
Merged

fix(orb): gate the ai_review_inconclusive hold on aiReviewGateMode#10239
loopover-orb[bot] merged 1 commit into
JSONbored:mainfrom
bitfathers94:fix/issue-10016

Conversation

@bitfathers94

Copy link
Copy Markdown
Contributor

fix(orb): gate the ai_review_inconclusive hold on aiReviewGateMode

evaluateGateCheckCore held the gate neutral whenever an inconclusive AI
review finding showed up, regardless of the repo's configured
aiReviewGateMode. Since the finding is produced by mode-agnostic
producers (a lock-contention race or a failed attempt), an
advisory-mode repo's clean, green PR could get diverted to manual
review over a race or a transient model hiccup it never opted into
blocking on.

Mirror isEvaluationBlocker's cla_check_unresolved precedent: only hold
the gate when the resolved mode is block. The finding still surfaces
as a warning in every mode via the existing gateWarnings path.

Closes #10016

evaluateGateCheckCore held the gate neutral whenever an inconclusive AI
review finding showed up, regardless of the repo's configured
aiReviewGateMode. Since the finding is produced by mode-agnostic
producers (a lock-contention race or a failed attempt), an
advisory-mode repo's clean, green PR could get diverted to manual
review over a race or a transient model hiccup it never opted into
blocking on.

Mirror isEvaluationBlocker's cla_check_unresolved precedent: only hold
the gate when the resolved mode is block. The finding still surfaces
as a warning in every mode via the existing gateWarnings path.
@bitfathers94
bitfathers94 requested a review from JSONbored as a code owner July 31, 2026 13:52
@loopover-orb

loopover-orb Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Tip

✅ LoopOver review result - approve/merge recommended

Review updated: 2026-07-31 14:17:31 UTC

6 files · 1 AI reviewer · no blockers · readiness 90/100 · CI green · clean

✅ Suggested Action - Approve/Merge

  • safe to merge

Review summary
This PR gates the ai_review_inconclusive hold on aiReviewGateMode resolving to "block" in both the host (src/rules/advisory.ts) and engine (gate-advisory.ts) twins, mirroring the existing cla_check_unresolved precedent (isEvaluationBlocker). The two implementations use slightly different helpers (gateMode(...) === "block" in advisory.ts vs the new gatePolicyBlocks(mode, "advisory") in gate-advisory.ts) but both default an unset aiReviewGateMode to "advisory", so behavior is consistent. Tests cover advisory/off/block modes plus a secret_scan_incomplete coexistence case and a dry-run preview, and the finding still surfaces via gateWarnings/warnings in every mode as claimed.

Nits — 5 non-blocking
  • src/rules/advisory.ts uses `gateMode(effective.aiReviewGateMode ?? "advisory") === "block"` while gate-advisory.ts introduces a new `gatePolicyBlocks` helper for the identical check — worth using the same idiom in both twins for readability, even though the parity checker only enforces structural markers.
  • The PR closes orb(gate): the AI-inconclusive hold ignores aiReviewGateMode, so an advisory-mode repo's clean PR is held for a human #10016 but the external brief flags the issue link as only 'partial' coverage — worth double-checking the issue text against this fix's scope before merge.
  • Both touched files are already flagged as long-file (594 and 853 lines); this diff adds comments/lines to already-oversized files rather than extracting the resolveConfiguredGateMode-style pattern, though that's out of scope for a one-line gating fix.
  • Consider adding resolveConfiguredGateMode-style single source of truth for the ai_review_inconclusive mode check in src/rules/advisory.ts, similar to how gatePolicyBlocks was introduced in the engine twin, for future consistency.
  • Double check that gate-check-policy.test.ts and predicted-gate-engine.test.ts (not shown in full due to review budget) actually assert the new gating end-to-end, since I could only verify their diff hunks, not full file content.

Decision drivers

  • ✅ Code review — No blockers (1 reviewer)
  • ✅ Gate result — Passing (No configured blocker found.)
Context & advisory signals — never blocks the verdict
Signal Result Evidence
Linked issue ✅ Linked #10016
Related work ✅ No active overlap found No same-issue or scoped active PR overlap found.
Change scope ✅ 20/20 Low review scope from cached public metadata (1 linked issue).
Validation posture ⚠️ 20/25 Preflight is ready, but the PR body does not name the validation run.
Contributor workload ✅ 10/10 Author activity: 140 registered-repo PR(s), 99 merged, 3 issue(s).
Contributor context ✅ Confirmed Gittensor contributor bitfathers94; Gittensor profile; 140 PR(s), 3 issue(s).
Improvement ✅ Minor risk: clean · value: minor · LLM: moderate
Linked issue satisfaction

Addressed
The PR gates the ai_review_inconclusive hold in evaluateGateCheckCore on the resolved aiReviewGateMode (mirroring the CLA precedent), keeps the finding flowing to warnings in advisory/off mode, preserves the block-mode hold and ordering, and adds regression tests in both the host and engine covering advisory/off/block plus the secret_scan_incomplete and dry-run cases.

Review context
  • Author: bitfathers94
  • Role context: outside_contributor
  • Public audience mode: oss maintainer
  • Lane context: Repository is configured for direct PR review.
  • Public profile languages: not available
  • Official Gittensor activity: 140 PR(s), 3 issue(s).
  • PR-specific overlap: none found.
Contributor next steps
  • Start here: Add validation command/output.
  • Then work through the remaining 1 step in the Signals table above.
Signal definitions
  • Related work = same linked issue, overlapping active PRs, or title/path similarity.
  • Change scope = cached public metadata such as size labels, draft state, and review-burden hints.
  • Validation posture = whether the PR provides enough public validation/test evidence for maintainer review.
  • Contributor workload = public contributor activity and cleanup pressure, not a repo-wide quality failure.
  • Contributor context = public GitHub/Gittensor identity context; non-Gittensor status is not a blocker.
🧪 Chat with LoopOver

Ask 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.

  • @loopover ask <question> answers contribution-quality Q&A with source citations and freshness.
  • @loopover chat <question> answers in natural prose from cached decision-pack facts via local inference (maintainer/collaborator; read-only).
  • A plain-language @loopover mention with a real question is routed to the closest matching read-only command automatically — no exact syntax required.

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.

  • Re-run LoopOver review

@superagent-security

Copy link
Copy Markdown
Contributor

Superagent didn't find any vulnerabilities or security issues in this PR.

@loopover-orb loopover-orb Bot added the gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. label Jul 31, 2026
@codecov

codecov Bot commented Jul 31, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.26%. Comparing base (79d7e03) to head (fac29a6).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #10239      +/-   ##
==========================================
+ Coverage   92.25%   92.26%   +0.01%     
==========================================
  Files         938      938              
  Lines      114694   114702       +8     
  Branches    27693    27699       +6     
==========================================
+ Hits       105813   105834      +21     
+ Misses       7575     7558      -17     
- Partials     1306     1310       +4     
Flag Coverage Δ
backend 95.67% <100.00%> (-0.01%) ⬇️
engine 74.11% <100.00%> (+0.06%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...ages/loopover-engine/src/advisory/gate-advisory.ts 84.02% <100.00%> (+2.09%) ⬆️
src/rules/advisory.ts 97.86% <100.00%> (+0.01%) ⬆️

... and 1 file with indirect coverage changes

@loopover-orb loopover-orb Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LoopOver approves — the gate is satisfied and CI is green.

@loopover-orb
loopover-orb Bot merged commit 00e3ee9 into JSONbored:main Jul 31, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

orb(gate): the AI-inconclusive hold ignores aiReviewGateMode, so an advisory-mode repo's clean PR is held for a human

1 participant