Skip to content

fix(ci): stop swallowing control-plane coverage failures with an unjustified || true#8497

Merged
JSONbored merged 1 commit into
JSONbored:mainfrom
joaovictor91123:fix/ci-control-plane-coverage-swallow-8392
Jul 24, 2026
Merged

fix(ci): stop swallowing control-plane coverage failures with an unjustified || true#8497
JSONbored merged 1 commit into
JSONbored:mainfrom
joaovictor91123:fix/ci-control-plane-coverage-swallow-8392

Conversation

@joaovictor91123

Copy link
Copy Markdown
Contributor

Summary

.github/workflows/ci.yml's "Control-plane coverage" step ran npm run control-plane:coverage || true, unconditionally swallowing a non-zero exit. The next step ("Verify control-plane coverage report exists") only checks that control-plane/coverage/lcov.info is non-empty — it never checks the coverage run itself exited cleanly. So a genuine coverage-harvest failure that still manages to write a non-empty but incomplete/wrong lcov.info currently stays green and silently uploads bad data to Codecov under the control-plane flag.

The identical || true shape on the "REES coverage" step immediately above carries an explicit justifying comment: c8 instrumentation inflates review-enrichment's timing-sensitive linear-time/ReDoS-guard assertions past their uninstrumented budgets, so a non-zero exit there is a known, documented false alarm (the real pass/fail already happened in the uninstrumented test step just before it). The "Control-plane coverage" step has no such comment, and a repo-wide search (grep -rln "budget|timing-sensitive|instrumentation|c8" control-plane/) confirms control-plane's suite has no timing-budget or ReDoS-guard assertions that would explain an instrumentation-induced false failure — this reads as the REES step's shape copied without its justification, not a verified decision for control-plane.

  • Removed || true from the "Control-plane coverage" step only. The REES coverage step and scripts/control-plane-coverage.mjs are untouched.

Scope

  • The PR title follows type(scope): short summary Conventional Commit format.
  • This PR is focused and does not mix unrelated backend, UI, MCP, docs, dependency, and deploy changes.
  • This follows CONTRIBUTING.md and does not reintroduce GitHub Pages, VitePress, site/, or CNAME.
  • I linked a currently open issue this PR resolves.

Closes #8392

Validation

  • npm run actionlint
  • git diff --check
  • Rebuilt control-plane (stale dist from an earlier main sync), then ran npm run control-plane:coverage from the repo root per the issue's explicit instruction: exits 0, all 201 tests pass, coverage summary is clean (99.95% statements, 99.54% branches, 99.04% functions, 99.95% lines) — confirming the swallow is safe to remove and this change doesn't itself introduce a CI failure.

.github/** and scripts/** are outside Codecov's coverage.include, so this change owes no codecov/patch obligation.

…stified || true

The REES coverage step's identical || true is documented and justified
(c8 instrumentation inflates its timing-sensitive assertions past their
uninstrumented budgets). Control-plane's suite has no such timing-budget
or ReDoS-guard assertions, so this looks like the shape being copied
without its justification, not a verified decision. A genuine
coverage-harvest failure that still writes a non-empty but
incomplete/wrong lcov.info currently stays green and uploads bad data to
Codecov -- exactly what the next step's existence check is meant to
catch but, with the swallow in place, cannot.

Verified locally: after rebuilding control-plane (stale dist), npm run
control-plane:coverage exits 0 with all 201 tests passing and a clean
coverage summary, confirming the swallow is safe to remove.

Closes JSONbored#8392
@superagent-security

Copy link
Copy Markdown
Contributor

Superagent did not 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 92.51%. Comparing base (9adcccb) to head (8f6d78b).
⚠️ Report is 28 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #8497   +/-   ##
=======================================
  Coverage   92.50%   92.51%           
=======================================
  Files         791      791           
  Lines       79333    79343   +10     
  Branches    23960    23967    +7     
=======================================
+ Hits        73386    73403   +17     
  Misses       4807     4807           
+ Partials     1140     1133    -7     
Flag Coverage Δ
control-plane 99.85% <ø> (ø)
rees 88.56% <ø> (ø)
shard-1 59.31% <ø> (+3.80%) ⬆️
shard-2 45.64% <ø> (-4.26%) ⬇️
shard-3 56.14% <ø> (-0.72%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.
see 1 file 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

Warning

⏸️ LoopOver review result - manual review recommended

Review updated: 2026-07-24 16:14:45 UTC

1 file · 1 AI reviewer · no blockers · CI green · clean

⏸️ Suggested Action - Manual Review

  • Touches a guarded path — held for manual review: This PR changes guardrail-protected path(s): .github/workflows/ci.yml (matched .github/workflows/**).

Review summary
This is a one-line change that removes an unjustified `|| true` from the 'Control-plane coverage' CI step, matching the exact fix scope described. The rationale is sound: unlike the adjacent REES coverage step, control-plane's suite has no timing-sensitive/instrumentation-based false-failure mode documented or found by search, so swallowing its exit code just let a broken coverage harvest silently upload bad data to Codecov. `scripts/control-plane-coverage.mjs` confirms the harvest script does exit non-zero on genuine failure (via `spawnSync` result.status), so removing `|| true` will now correctly fail the step on real breakage.

Nits — 3 non-blocking
  • control-plane-coverage.mjs writes an empty/partial lcov.info in some failure paths via the try/catch around the SF: path rewrite (comment notes 'Verify control-plane coverage report exists' fails closed on a missing report) — worth double-checking that a mid-run c8 crash after writing a partial lcov.info still gets caught now that the exit code is no longer swallowed, rather than relying solely on the downstream non-empty check.
  • Consider adding a one-line comment on the fixed step (mirroring the REES step's justification comment) stating that no such exemption applies here, so a future contributor doesn't reintroduce `|| true` by copy-paste from the REES step above it.
  • Touches a guarded path — held for manual review — A maintainer must review and merge this change.

Decision drivers

  • ✅ Code review — No blockers (1 reviewer)
  • ⚠️ Gate result — Not blocking (Advisory; not blocking this PR.)
Context & advisory signals — never blocks the verdict
Signal Result Evidence
Linked issue ✅ Linked #8392
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: 183 registered-repo PR(s), 83 merged, 5 issue(s).
Contributor context ✅ Confirmed Gittensor contributor joaovictor91123; Gittensor profile; 183 PR(s), 5 issue(s).
Improvement ℹ️ Insufficient signal risk: clean · value: insufficient-signal
Linked issue satisfaction

Addressed
The diff removes the unjustified `|| true` from the Control-plane coverage step exactly as required, leaves the REES coverage step and control-plane-coverage.mjs untouched, and the PR description states validation was run.

Review context
  • Author: joaovictor91123
  • Role context: outside_contributor
  • Public audience mode: oss maintainer
  • Lane context: Repository is configured for direct PR review.
  • Public profile languages: Python, JavaScript, MDX, TypeScript, C++, CSS, Rust
  • Official Gittensor activity: 183 PR(s), 5 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 added the manual-review Gittensor contributor context label Jul 24, 2026
@JSONbored
JSONbored merged commit b86c458 into JSONbored:main Jul 24, 2026
12 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. manual-review Gittensor contributor context

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ci.yml's Control-plane coverage step swallows failures with an unjustified || true, unlike REES's documented one

2 participants