Skip to content

test(miner): rename miner-cli-json-error-coverage.test.ts to drop the coverage-padding filename#8585

Merged
JSONbored merged 1 commit into
mainfrom
test/rename-miner-cli-json-error-coverage
Jul 24, 2026
Merged

test(miner): rename miner-cli-json-error-coverage.test.ts to drop the coverage-padding filename#8585
JSONbored merged 1 commit into
mainfrom
test/rename-miner-cli-json-error-coverage

Conversation

@JSONbored

Copy link
Copy Markdown
Owner

Closes #8579.

Summary

Unlike the other bolt-on files in the '-coverage' family (#8574), this one is a legitimate single-concern suite: the shared --json error-envelope contract ({ ok: false, error }, exit code 2, nothing on stderr) exercised across many miner CLI subcommands via one shared expectJsonError/expectJsonErrorAsync helper. Distributing it into each CLI's own sibling file (Option B) would duplicate that helper across ~9 files and lose the "one contract, many entry points" narrative.

Went with Option A from the issue: rename only, no content change (miner-cli-json-error-coverage.test.ts -> miner-cli-json-error-paths.test.ts), retitled the top-level describe to drop the "coverage" framing, and added a comment explaining why the file stays consolidated so it doesn't get flagged again.

Test plan

  • npx vitest run test/unit/miner-cli-json-error-paths.test.ts — 8/8 pass
  • npm run typecheck — clean
  • Pure rename, no test-body changes — no coverage impact to verify.

… coverage-padding filename (#8579)

Unlike the other bolt-on files in the '-coverage' family (#8574), this
one is a legitimate single-concern suite: the shared --json error-envelope
contract exercised across many miner CLI subcommands via one shared
expectJsonError/expectJsonErrorAsync helper. Distributing it into each
CLI's own sibling file would duplicate that helper and lose the "one
contract, many entry points" narrative -- so this is a rename only
(Option A from the issue), no content change. Also retitled the
top-level describe to drop "coverage" framing and added a comment
explaining why the file stays consolidated.
@superagent-security

Copy link
Copy Markdown
Contributor

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

@JSONbored JSONbored self-assigned this Jul 24, 2026
@JSONbored
JSONbored merged commit 35b934e into main Jul 24, 2026
4 checks passed
@JSONbored
JSONbored deleted the test/rename-miner-cli-json-error-coverage branch July 24, 2026 22:31
@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 91.99%. Comparing base (346c183) to head (c3bf0d3).
⚠️ Report is 7 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8585      +/-   ##
==========================================
- Coverage   92.54%   91.99%   -0.56%     
==========================================
  Files         796      796              
  Lines       79845    79845              
  Branches    24134    24134              
==========================================
- Hits        73896    73452     -444     
- Misses       4802     5309     +507     
+ Partials     1147     1084      -63     
Flag Coverage Δ
backend 92.95% <ø> (-0.78%) ⬇️

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

Rename or distribute miner-cli-json-error-coverage.test.ts

1 participant