Skip to content

fix(review): preserve generic gate warnings on the surface-close hold path - #10100

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

fix(review): preserve generic gate warnings on the surface-close hold path#10100
loopover-orb[bot] merged 1 commit into
JSONbored:mainfrom
bitfathers94:fix/issue-10011

Conversation

@bitfathers94

Copy link
Copy Markdown
Contributor

fix(review): preserve generic gate warnings on the surface-close hold path

applySurfaceGate's fourth merge path returned the surface evaluation
bare when the generic gate held with no blockers, dropping every
warning-carried hold reason (size, guardrail, secret-scan) instead of
unioning them like the three sibling paths already do.

Closes #10011

… path

applySurfaceGate's fourth merge path returned the surface evaluation
bare when the generic gate held with no blockers, dropping every
warning-carried hold reason (size, guardrail, secret-scan) instead of
unioning them like the three sibling paths already do.
@bitfathers94
bitfathers94 requested a review from JSONbored as a code owner July 31, 2026 06:54
@superagent-security

Copy link
Copy Markdown
Contributor

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

@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 07:04:36 UTC

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

✅ Suggested Action - Approve/Merge

  • safe to merge

Review summary
This fixes applySurfaceGate's fourth merge path (content-lane-wire.ts:141-144): when the generic gate holds with blockers.length===0 and a non-success surface overrides it, the old code returned `surface` bare, discarding any warning-carried hold reasons (oversized_pr, guardrails, etc.) from the generic gate. The fix unions `generic.warnings` before `surface.warnings`, matching the pattern already used by the three sibling merge paths in the same function (the AI-judgment-only override and the duplicate-only downgrade both already do `[...generic.warnings, ...surface.warnings]` or similar). The new/expanded tests directly exercise this exact branch (manual and close surface verdicts against a warning-only generic hold) and confirm warning order and content, which is real coverage of the fixed line, not a fabricated scenario.

Nits — 2 non-blocking
  • nit: the diff doesn't add a case where `surface.warnings` itself is non-empty alongside a non-success surface in this same branch — the existing `surfaceClose` test fixture always has empty warnings, so the concatenation order (generic-then-surface) is asserted but only from one side.
  • Consider a test where both `generic.warnings` and `surface.warnings` are non-empty on this path to fully pin the concatenation order (currently only proven implicitly via the empty-array case).

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 #10011
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: 98 registered-repo PR(s), 67 merged, 3 issue(s).
Contributor context ✅ Confirmed Gittensor contributor bitfathers94; Gittensor profile; 98 PR(s), 3 issue(s).
Improvement ✅ Minor risk: clean · value: minor · LLM: moderate
Linked issue satisfaction

Addressed
The diff changes the exact line identified in the issue to `{ ...surface, warnings: [...generic.warnings, ...surface.warnings] }`, matching the required pattern from the sibling AI-judgment branch, and leaves the two unchanged sub-cases (:139 early return and success-surface branch) untouched. Tests added cover the manual and close surface verdicts against a warning-only generic hold, verifying bo

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: 98 PR(s), 3 issue(s).
  • PR-specific overlap: none found.
Contributor next steps
  • Start here: Add validation command/output.
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

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

@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 83d8b40 into JSONbored:main Jul 31, 2026
6 checks passed
@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 79.77%. Comparing base (0919f19) to head (eb80940).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #10100      +/-   ##
==========================================
+ Coverage   79.75%   79.77%   +0.02%     
==========================================
  Files         282      283       +1     
  Lines       58685    58759      +74     
  Branches     6878     6908      +30     
==========================================
+ Hits        46804    46877      +73     
  Misses      11593    11593              
- Partials      288      289       +1     
Flag Coverage Δ
backend 98.64% <100.00%> (?)

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

Files with missing lines Coverage Δ
src/review/content-lane-wire.ts 98.64% <100.00%> (ø)

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(content-lane): applySurfaceGate discards the generic gate's warnings on the blocker-free hold path

1 participant