Skip to content

fix(miner): close two blind spots in the DEPLOYMENT.md docs-accuracy audit - #5435

Merged
JSONbored merged 1 commit into
mainfrom
fix/miner-deployment-docs-audit-blind-spots
Jul 12, 2026
Merged

fix(miner): close two blind spots in the DEPLOYMENT.md docs-accuracy audit#5435
JSONbored merged 1 commit into
mainfrom
fix/miner-deployment-docs-audit-blind-spots

Conversation

@JSONbored

Copy link
Copy Markdown
Owner

Summary

Fixes the CI failure currently red on main (surfaced on #5430, but unrelated to that PR's own diff -- confirmed by reproducing it on an older, unrelated branch base that never touches these files).

Two real false positives in test/unit/miner-deployment-docs-audit.test.ts / packages/gittensory-miner/lib/deployment-docs-audit.js, both introduced by #5423/#5424 documenting real, working miner config that tripped the audit's own scan gaps -- not actual DEPLOYMENT.md drift:

  1. Cross-package blind spot: the audit only scanned packages/gittensory-miner/lib and bin for env var reads. MINER_CODING_AGENT_CLAUDE_MODEL / MINER_CODING_AGENT_CODEX_MODEL / MINER_CODING_AGENT_TIMEOUT_MS are genuinely read in packages/gittensory-engine/src/miner/driver-factory.ts -- a real dependency the miner uses for coding-agent driver construction -- but that directory was never scanned. Now also scans gittensory-engine's miner source (not dist/, which is gitignored and may not be built).
  2. Anchor-fragment bug: extractFilePathClaims recorded a markdown link's full target verbatim, including any #anchor fragment, then checked that whole string against existsSync. README.md#coding-agent-driver-configuration was checked as a literal (nonexistent) filename instead of README.md with an in-page heading fragment. Now strips the fragment before recording the claim.

Test plan

  • npm run typecheck
  • npm run docs:drift-check
  • node --check packages/gittensory-miner/lib/deployment-docs-audit.js
  • Added a regression test for each bug; manually verified each fails against the pre-fix code and passes against the fix
  • Full test/unit/miner-deployment-docs-audit.test.ts suite green (18/18, up from 15 -- 3 new tests)

…audit

Two real false positives, both currently red on main:

- The audit only scanned packages/gittensory-miner/lib and bin for env
  var reads, missing packages/gittensory-engine/src/miner/ (a real
  dependency the miner uses for coding-agent driver construction).
  MINER_CODING_AGENT_CLAUDE_MODEL/CODEX_MODEL/TIMEOUT_MS are genuinely
  read there (driver-factory.ts) but were flagged as undocumented-in-code.
- extractFilePathClaims recorded a markdown link's full target verbatim,
  including any #anchor fragment, then checked that string against
  existsSync -- so "README.md#coding-agent-driver-configuration" was
  checked as a literal (nonexistent) filename instead of "README.md"
  with a heading fragment.

Both were introduced by #5423/#5424 documenting real, working miner
config but tripping the audit's own scan gaps, not actual DEPLOYMENT.md
drift. Added a regression test for each, verified to fail on the prior
code and pass on the fix.
@JSONbored JSONbored self-assigned this Jul 12, 2026
@superagent-security

Copy link
Copy Markdown
Contributor

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

@JSONbored
JSONbored merged commit 156b382 into main Jul 12, 2026
14 of 15 checks passed
@JSONbored
JSONbored deleted the fix/miner-deployment-docs-audit-blind-spots branch July 12, 2026 19:18
@loopover-orb loopover-orb Bot added the gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. label Jul 12, 2026
@codecov

codecov Bot commented Jul 12, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.01%. Comparing base (566b4e5) to head (0c0764f).
⚠️ Report is 3 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5435      +/-   ##
==========================================
- Coverage   88.28%   86.01%   -2.27%     
==========================================
  Files         554      554              
  Lines       44425    44426       +1     
  Branches    14663    14663              
==========================================
- Hits        39220    38213    -1007     
- Misses       3899     4910    +1011     
+ Partials     1306     1303       -3     
Flag Coverage Δ
shard-1 43.87% <0.00%> (-0.25%) ⬇️
shard-2 ?
shard-3 31.66% <0.00%> (+0.06%) ⬆️
shard-4 31.43% <100.00%> (?)
shard-5 32.89% <0.00%> (-0.39%) ⬇️
shard-6 43.83% <0.00%> (+0.46%) ⬆️

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

Files with missing lines Coverage Δ
...ages/gittensory-miner/lib/deployment-docs-audit.js 100.00% <100.00%> (+100.00%) ⬆️

... and 179 files with indirect coverage changes

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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.

1 participant