fix(miner): exit 2 (not 1) on a secret-mount failure to match the documented 0/2 exit-code contract#6249
Conversation
…umented 0/2 exit-code contract
|
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 #6249 +/- ##
=======================================
Coverage 95.35% 95.35%
=======================================
Files 598 598
Lines 47121 47121
Branches 14993 14993
=======================================
Hits 44932 44932
Misses 1464 1464
Partials 725 725
Flags with carried forward coverage won't be shown. Click here to find out more. |
|
Caution 🛑 LoopOver review result - reject/close recommendedReview updated: 2026-07-15 23:55:30 UTC
Review summary Nits — 4 non-blocking
Why this is blocked
📋 Copy for AI agents — paste into your coding agentDecision 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://gittensory.aethereal.dev/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.
|
|
LoopOver is closing this pull request on the maintainer's behalf (Linked issue overlaps another open PR; duplicate of another open PR). This is an automated maintenance action — to pursue this change, please open a new pull request with the issues resolved. Closed PRs may be analyzed later to improve review accuracy, but they are not automatically reopened or re-reviewed. |
Summary
bin/loopover-miner.js'sloadMinerFileSecrets()catch block exited with code1on failure, butdocs/unattended-scheduling.md's documented exit-code contract is0(success) /2(failure -- "Alert on this"). An operator wiring alerting strictly to exit code2would miss a real, reachable startup failure -- a brokenGITHUB_TOKEN_FILE(or any secret-mount) misconfiguration.Changes
bin/loopover-miner.js: the secret-mount-failure catch nowprocess.exit(2)(was1), matching the documented contract.exit(1)startup path in the file (all other exits are0, a command's own return code, orexitCode), so no other path needed the same fix.lib/env-file-indirection.js'sloadMinerFileSecretsthrow behavior is unchanged -- only the exit-code translation at the CLI boundary.Validation
node --check bin/loopover-miner.js;npm run typecheck.test/unit/miner-env-file-indirection.test.ts) that spawns the real bin with a missingGITHUB_TOKEN_FILEto assert exit code2(was1) -- 13 passed.git diff --checkclean; rebased onto latestmain, mergeable-clean.Safety
Closes #6162