fix(miner): reject invalid since cursors in event ledger reads#2897
Conversation
Validate readEvents since as a non-negative integer so NaN and other corrupted polling cursors fail loudly instead of reaching SQLite. Co-authored-by: Cursor <cursoragent@cursor.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2897 +/- ##
=======================================
Coverage 96.03% 96.03%
=======================================
Files 259 259
Lines 28393 28393
Branches 10326 10326
=======================================
Hits 27266 27266
Misses 491 491
Partials 636 636 🚀 New features to boost your workflow:
|
|
Warning 🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨 ⏸️ Gittensory review result - manual review recommendedReview updated: 2026-07-04 05:03:16 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.
|
Summary
sinceseq cursor inreadEventsso polling rejects non-integer, negative, and non-finite values.NaNfrom bad arithmetic) from silently reaching SQLite.Scope
type(scope): short summaryConventional Commit format.readEventsfiltering only — no unrelated miner CLI or UI changes.Validation
npm run test:cilocally — CI will run the full gate on push.Safety
UI Evidence
Not applicable — miner library only.