Skip to content

fix(gate): default the three bare gateMode() calls in advisory.ts to advisory - #10245

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

fix(gate): default the three bare gateMode() calls in advisory.ts to advisory#10245
loopover-orb[bot] merged 1 commit into
JSONbored:mainfrom
bitfathers94:fix/issue-10015

Conversation

@bitfathers94

Copy link
Copy Markdown
Contributor

fix(gate): default the three bare gateMode() calls in advisory.ts to advisory

recordGateScoreSignals and buildQualityGateWarning called gateMode() bare on
an optional mode field. Since #9167 made gateMode's fallback fail-closed to
"block", an absent slopGateMode resolved to "block" there while
buildSlopGateBlocker (the pure evaluator it's documented to mirror) already
defaulted the same absent value to "advisory" via
gateMode(policy.slopGateMode ?? "advisory") -- so an unconfigured slop gate
still wrote a slop_gate_score corpus signal labeled "mode block" that the
gate itself never evaluated.

Give all three call sites the same ?? "advisory" default and correct the
gateMode doc comment, which claimed every caller already supplied that
default when three sites in the same file didn't.

Closes #10015

…advisory

recordGateScoreSignals and buildQualityGateWarning called gateMode() bare on
an optional mode field. Since JSONbored#9167 made gateMode's fallback fail-closed to
"block", an absent slopGateMode resolved to "block" there while
buildSlopGateBlocker (the pure evaluator it's documented to mirror) already
defaulted the same absent value to "advisory" via
gateMode(policy.slopGateMode ?? "advisory") -- so an unconfigured slop gate
still wrote a slop_gate_score corpus signal labeled "mode block" that the
gate itself never evaluated.

Give all three call sites the same ?? "advisory" default and correct the
gateMode doc comment, which claimed every caller already supplied that
default when three sites in the same file didn't.
@bitfathers94
bitfathers94 requested a review from JSONbored as a code owner July 31, 2026 14:06
@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:18:12 UTC

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

✅ Suggested Action - Approve/Merge

  • safe to merge

Review summary
This PR closes a real mismatch: recordGateScoreSignals and buildQualityGateWarning called gateMode() bare on optional slopGateMode/qualityGateMode fields, which fail-closes to "block" per #9167's default, while the pure evaluator buildSlopGateBlocker it's documented to mirror already resolved the same absent value to "advisory" via gateMode(policy.slopGateMode ?? "advisory"). The fix adds the matching ?? "advisory" default to all three call sites and updates the gateMode doc comment's now-false claim that every caller already supplied that default. Tests are well-targeted: one regression test proves slop no longer fires a phantom "mode block" signal when unset, and one confirms quality's firing condition (mode !== "off") is unaffected since advisory also satisfies that check.

Nits — 2 non-blocking

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 #10015
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 diff applies the exact `?? "advisory"` default to all three call sites (recordGateScoreSignals's slopMode and qualityMode, and buildQualityGateWarning), matching buildSlopGateBlocker's reference pattern, corrects the gateMode doc comment's inaccurate claim, and adds regression tests covering the previously-untested unset-mode divergence for both slop and quality. All required behaviors (fail-c

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 80.68%. Comparing base (79d7e03) to head (4ec8ce7).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@
##             main   #10245       +/-   ##
===========================================
- Coverage   92.25%   80.68%   -11.58%     
===========================================
  Files         938      284      -654     
  Lines      114694    59467    -55227     
  Branches    27693     8880    -18813     
===========================================
- Hits       105813    47978    -57835     
- Misses       7575    11188     +3613     
+ Partials     1306      301     -1005     
Flag Coverage Δ
backend 97.84% <100.00%> (+2.16%) ⬆️

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

Files with missing lines Coverage Δ
src/rules/advisory.ts 97.84% <100.00%> (ø)

... and 786 files 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 78891b8 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): three gateMode() call sites skip the ?? default its fail-closed branch assumes, so the score-signal recorder no longer mirrors the evaluator

1 participant