fix(miner): stop doctor's ams-backtest-proposals check from creating and pruning the event ledger - #10264
Conversation
…and pruning the event ledger checkAmsBacktestProposals opened the ledger through initEventLedger, which unconditionally creates the file, runs schema migrations, and retention-prunes rows -- none of which a read-only diagnostic command should ever trigger. Add openEventLedgerReadOnly, a driver-enforced read-only connection mirroring checkStoreIntegrity's existsSync + readOnly:true pattern, and only reach for it when the ledger file already exists; a missing file now short-circuits straight to the "nothing to propose" detail without touching disk.
|
Tip ✅ LoopOver review result - approve/merge recommendedReview updated: 2026-07-31 15:08:13 UTC
Review summary Nits — 5 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.
|
|
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 #10264 +/- ##
==========================================
+ Coverage 80.60% 80.69% +0.08%
==========================================
Files 283 285 +2
Lines 59101 59372 +271
Branches 7000 7086 +86
==========================================
+ Hits 47641 47910 +269
Misses 11167 11167
- Partials 293 295 +2
Flags with carried forward coverage won't be shown. Click here to find out more.
|
fix(miner): stop doctor's ams-backtest-proposals check from creating and pruning the event ledger
checkAmsBacktestProposals opened the ledger through initEventLedger, which unconditionally
creates the file, runs schema migrations, and retention-prunes rows -- none of which a
read-only diagnostic command should ever trigger. Add openEventLedgerReadOnly, a
driver-enforced read-only connection mirroring checkStoreIntegrity's existsSync +
readOnly:true pattern, and only reach for it when the ledger file already exists; a missing
file now short-circuits straight to the "nothing to propose" detail without touching disk.
Closes #10002