fix(miner): sweep stale active soft-claims to expired#2885
Conversation
Add pure findExpiredClaims and sweepExpiredClaims plus expireClaim store support so local soft-claims older than the max age transition to expired. Closes JSONbored#2316. Co-authored-by: Cursor <cursoragent@cursor.com>
|
Warning 🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨 ⏸️ Gittensory review result - manual review recommendedReview updated: 2026-07-04 04:09:10 UTC
⏸️ Suggested Action - Manual Review Review summary Nits — 5 non-blocking
Review context
Contributor next steps
Signal definitions
🟩 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 Gittensory, a quiet PR intelligence layer for OSS maintainers.
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2885 +/- ##
=======================================
Coverage ? 96.03%
=======================================
Files ? 259
Lines ? 28393
Branches ? 10326
=======================================
Hits ? 27266
Misses ? 491
Partials ? 636 🚀 New features to boost your workflow:
|
Summary
findExpiredClaimsandsweepExpiredClaimshelpers so stale active soft-claims can be expired locally without network calls.expireClaim, mirroring the active-only transition guard used byreleaseClaim.age === maxAgeMs), and SQLite sweep integration in unit tests.Closes #2316.
Scope
type(scope): short summaryConventional Commit format.Validation
npm run test:cilocally — CI will run the full gate on push.Safety
UI Evidence
Not applicable — miner library only.
Notes
DEFAULT_MAX_CLAIM_AGE_MS).maxAgeMsexactly remain active; only strictly older rows expire.