Skip to content

fix(rules): disclose configured blockers omitted past the inline gate-check cap (#8323) - #8367

Merged
loopover-orb[bot] merged 1 commit into
JSONbored:mainfrom
jeffrey701:fix-disclose-omitted-gate-blockers-8323
Jul 24, 2026
Merged

fix(rules): disclose configured blockers omitted past the inline gate-check cap (#8323)#8367
loopover-orb[bot] merged 1 commit into
JSONbored:mainfrom
jeffrey701:fix-disclose-omitted-gate-blockers-8323

Conversation

@jeffrey701

Copy link
Copy Markdown
Contributor

Summary

formatGateCheckOutput (src/rules/advisory.ts) renders configured hard-blocker lines with a bare gate.blockers.slice(0, 8) — no comment, no disclosure. A contributor with 9+ genuine configured blockers on one PR saw only the first 8, fixed them, then discovered the 9th (and beyond) on the next gate run — indistinguishable from the bot silently moving the goalposts. Its sibling buildCheckRunAnnotations already discloses truncation via an omittedCount "…N more … omitted from inline check output." line; this closes the gap.

  • Extract the inline 8 to a named GATE_CHECK_BLOCKER_LIMIT constant with an explanatory comment.
  • When gate.blockers.length exceeds the cap, append "…N more configured blocker(s) omitted from inline check output." to the check-run text, mirroring buildCheckRunAnnotations' omitted-count wording. The line is not added when blockers are at or under the cap.
  • No other behavior changes — the title cap, summary, and the zero-blocker fallback are untouched.

Validation

  • npm run typecheck green; the full changed-graph test:changed net passes.
  • test/unit/rules.test.ts extended with both branches (the deliverable + Codecov requirement — both must be independently covered): 11 blockers ⇒ exactly 8 inline lines + a "…3 more … omitted" disclosure; 1 and 8 blockers ⇒ the exact count of lines and no disclosure line. 100% line + branch coverage on every changed line in formatGateCheckOutput (verified via vitest --coverage + the advisory.ts lcov block); the full rules.test.ts suite (99 tests) passes.

Closes #8323

@jeffrey701
jeffrey701 requested a review from JSONbored as a code owner July 24, 2026 10:58
@superagent-security

Copy link
Copy Markdown
Contributor

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

@codecov

codecov Bot commented Jul 24, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.70%. Comparing base (ee7eed6) to head (d612279).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8367      +/-   ##
==========================================
- Coverage   92.17%   89.70%   -2.48%     
==========================================
  Files         791       98     -693     
  Lines       79245    23026   -56219     
  Branches    23946     4009   -19937     
==========================================
- Hits        73044    20655   -52389     
+ Misses       5062     2187    -2875     
+ Partials     1139      184     -955     
Flag Coverage Δ
shard-1 67.81% <50.00%> (+14.14%) ⬆️
shard-2 84.37% <100.00%> (+33.53%) ⬆️
shard-3 59.68% <50.00%> (+1.46%) ⬆️

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

Files with missing lines Coverage Δ
src/rules/advisory.ts 98.12% <100.00%> (+0.02%) ⬆️

... and 693 files with indirect coverage changes

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

loopover-orb Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Tip

✅ LoopOver review result - approve/merge recommended

Review updated: 2026-07-24 11:11:45 UTC

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

✅ Suggested Action - Approve/Merge

  • safe to merge

Review summary
This PR extracts the magic number 8 into GATE_CHECK_BLOCKER_LIMIT and adds an omitted-count disclosure line to formatGateCheckOutput, mirroring the existing buildCheckRunAnnotations pattern. The logic is correct: omittedCount is computed as Math.max(0, blockers.length - LIMIT), only appended when positive, and the fallback text for zero-line output and the 255-char title cap are untouched. Tests cover both branches (11 blockers with disclosure; 1 and 8 blockers without) with concrete assertions on line counts and text content.

Nits — 3 non-blocking
  • The PR links formatGateCheckOutput silently truncates configured blockers past 8 with no omitted-count disclosure #8323 as the issue it closes, but I can't independently verify that issue's contents from this diff alone — worth double-checking the issue text matches this fix's scope.
  • src/rules/advisory.ts's comment above GATE_CHECK_BLOCKER_LIMIT is a bit verbose for a one-line constant but it does explain the non-obvious GitHub size-limit rationale, so it's fine as-is.
  • Consider whether the omitted-count line should also be sanitized via sanitizeForCheckRun for consistency, though since it only interpolates a plain number it's not actually exploitable.

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 #8323
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 ✅ 25/25 PR body includes validation/test evidence.
Contributor workload ✅ 10/10 Author activity: 64 registered-repo PR(s), 29 merged, 16 issue(s).
Contributor context ✅ Confirmed Gittensor contributor jeffrey701; Gittensor profile; 64 PR(s), 16 issue(s).
Improvement ✅ Minor risk: clean · value: minor · LLM: minor
Linked issue satisfaction

Addressed
The diff extracts the magic number 8 into a commented GATE_CHECK_BLOCKER_LIMIT constant, appends an omitted-count disclosure line only when blockers exceed the cap, and adds tests covering both the >8 disclosure case and the <=8 no-disclosure case as required.

Review context
  • Author: jeffrey701
  • Role context: outside_contributor
  • Public audience mode: oss maintainer
  • Lane context: Repository is configured for direct PR review.
  • Public profile languages: Rust, TypeScript, Clojure, JavaScript
  • Official Gittensor activity: 64 PR(s), 16 issue(s).
  • PR-specific overlap: none found.
Contributor next steps
  • Start here: Triage stale or unlinked PRs.
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 &lt;question&gt; answers contribution-quality Q&A with source citations and freshness.
  • @loopover chat &lt;question&gt; 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

@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 ce5f5aa into JSONbored:main Jul 24, 2026
14 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.

formatGateCheckOutput silently truncates configured blockers past 8 with no omitted-count disclosure

1 participant