fix(miner): flag real LOOPOVER_MINER_* env vars missing from DEPLOYMENT.md (#6601)#6726
Conversation
…NT.md (JSONbored#6601) deployment-docs-audit only checked the forward direction (a documented env var must have a real read). Add the reverse: a real LOOPOVER_MINER_*-prefixed read (excluding the *_DB family, documented generically, and the bare MINER_* alias namespace, which matches non-env constants) that DEPLOYMENT.md never documents now fails the audit by name. Expose reality.envReads as an enumerable set (both .d.ts and .d.mts) so the check can diff reality's own vars, populated from the existing scanEnvVarTokens result with no new scanning. Document the 13 previously-undocumented env vars in DEPLOYMENT.md so it passes the new check. Closes JSONbored#6601
|
🚨 Contributor flagged. Click here for more info: Superagent Dashboard |
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #6726 +/- ##
=======================================
Coverage 93.65% 93.65%
=======================================
Files 682 682
Lines 68133 68137 +4
Branches 18701 18701
=======================================
+ Hits 63808 63812 +4
Misses 3347 3347
Partials 978 978
Flags with carried forward coverage won't be shown. Click here to find out more.
|
|
Warning ⏸️ LoopOver review result - manual review recommendedReview updated: 2026-07-17 04:49:52 UTC
Review summary Nits — 4 non-blocking
Flagged checks (non-blocking)
Decision drivers
Context & advisory signals — never blocks the verdict
Linked issue satisfactionAddressed Review context
Contributor next steps
Signal definitions
🧪 Chat with LoopOverAsk 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.
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.
|
Summary
packages/loopover-miner/lib/deployment-docs-audit.jsonly enforced the forward direction of its own contract — a DOCUMENTED env var / path / subcommand must still exist. It never caught the reverse: a realLOOPOVER_MINER_*env-var read thatDEPLOYMENT.mdsimply never documents.auditDeploymentDocs: every real read that starts withLOOPOVER_MINER_, does not end with_DB(that family is documented generically via one pattern sentence, not enumerated), and is not inclaims.envVarsnow fails the audit, naming the exact var. BareMINER_*-only tokens are excluded (they also match non-env event/metric/filename constants).reality.envReadsas an enumerable set (in bothdeployment-docs-audit.d.tsandcheck-miner-deployment-docs.d.mts), populated bybuildLiveMinerDeploymentRealityfrom thescanEnvVarTokensresult it already builds — no new source-scanning.DEPLOYMENT.md(new "Environment variable reference" section) so the doc passes the new check.Closes #6601
Test plan
test/unit/miner-deployment-docs-audit.test.ts: new cases for all reverse branches — an undocumented non-_DBLOOPOVER_MINER_*read is flagged by name; a documented one is not; an undocumented*_DBread is NOT flagged; an undocumented bareMINER_*read is NOT flagged.test/unit/check-miner-deployment-docs.test.ts: asserts the live-built reality's newenvReadsfield is populated, containsLOOPOVER_MINER_LOG_LEVEL, and agrees withhasEnvRead.node scripts/check-miner-deployment-docs.mjsexits 0 against the updatedDEPLOYMENT.md(16 env vars, 15 paths, 4 subcommands).npm run typecheckclean.auditDeploymentDocscovered by the tests above).