fix(selfhost): default miner DR scripts to the post-rename config dir - #5991
Conversation
backup-miner.sh and restore-miner.sh defaulted STATE_DIR to the pre-rename $HOME/.config/gittensory-miner, so an operator who never sets LOOPOVER_MINER_CONFIG_DIR would back up/restore a directory that no longer exists after the rebrand's hard cutover (the real default is ~/.config/loopover-miner, per local-store.js's resolveLocalStoreDbPath). Fix both defaults to loopover-miner, refresh the describing comments (keeping the JSONbored#4872 references), and add a test/unit regression guard asserting the default fallback string. Closes JSONbored#5933
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
|
Tip 🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩 ✅ LoopOver review result - approve/merge recommendedReview updated: 2026-07-15 06:11:09 UTC
✅ Suggested Action - Approve/Merge
Review summary Nits — 4 non-blocking
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.
|
Closes #5933.
scripts/backup-miner.shandscripts/restore-miner.shdefaultedSTATE_DIRto the pre-rename$HOME/.config/gittensory-miner. The miner's real current default is~/.config/loopover-miner(perpackages/loopover-miner/lib/local-store.js'sresolveLocalStoreDbPath, shared by every store), so an operator who never setsLOOPOVER_MINER_CONFIG_DIRwould run a backup/restore against a directory that no longer exists after the rebrand's hard cutover — the script exits 1 ("nothing to back up"), easy to miss in an unattended cron/systemd timer.Changes
scripts/backup-miner.sh/scripts/restore-miner.sh:STATE_DIRdefaultgittensory-miner→loopover-miner(no dual-read/alias, matching the CHANGELOG's no-migration-shim mandate). Refreshed the describing header/usage comments to the current name (kept the#4872issue references).test/unit/miner-dr-scripts-config-default.test.ts(new): the regression guard the issue asks for — reads both scripts and asserts the default fallback is~/.config/loopover-minerand that nogittensory-minerresidue remains. Mirrorstest/unit/miner-docker-compose.test.ts'sreadFileSync+assert pattern.Validation
test/unit/miner-backup-restore-scripts.test.tsstill green (14/14) — it always setsLOOPOVER_MINER_CONFIG_DIRexplicitly, so the default change doesn't affect it.sh -nclean on both scripts; theloopover-miner doctorsubcommand referenced in restore output is real (packages/loopover-miner/bin/loopover-miner.js).scripts/**, outside Codecov'scoverage.include, so no patch-coverage gate applies.~/.config/gittensory-minerdefault (the two CHANGELOG references are intentional historical notes).