Skip to content

fix(miner): treat null readEvents since filter as unscoped#3016

Merged
JSONbored merged 1 commit into
JSONbored:mainfrom
jony376:fix/miner-event-ledger-null-since-filter
Jul 4, 2026
Merged

fix(miner): treat null readEvents since filter as unscoped#3016
JSONbored merged 1 commit into
JSONbored:mainfrom
jony376:fix/miner-event-ledger-null-since-filter

Conversation

@jony376

@jony376 jony376 commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Treat readEvents({ since: null }) as an unscoped poll, matching how null repo filters already behave.
  • Prevents nullable filter objects from throwing invalid_since when callers omit a seq cursor via null.

Scope

  • The PR title follows type(scope): short summary Conventional Commit format.
  • Focused on event-ledger readEvents filtering only — no unrelated miner CLI or UI changes.

Validation

  • npm run test:ci locally — CI will run the full gate on push.
  • Unit test covers null since returning all events.

Safety

  • No secrets, wallet details, hotkeys, or private scoring output in code or PR text.
  • Deterministic, read/write-local only: no network calls.

UI Evidence

Not applicable — miner library only.

Notes

Follow-up to #2897 and #2955 — completes nullish read-filter parity for the event ledger (#2290).

Co-authored-by: Cursor <cursoragent@cursor.com>
@jony376 jony376 requested a review from JSONbored as a code owner July 4, 2026 08:58
@gittensory-orb gittensory-orb Bot added the gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. label Jul 4, 2026
@gittensory-orb

gittensory-orb Bot commented Jul 4, 2026

Copy link
Copy Markdown

Warning

🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨

⏸️ Gittensory review result - manual review recommended

Review updated: 2026-07-04 08:59:30 UTC

3 files · 1 AI reviewer · no blockers · readiness 73/100 · CI pending · blocked

⏸️ Suggested Action - Manual Review

Review summary
The change correctly aligns the runtime normalizer and TypeScript declaration so `readEvents({ since: null })` is treated the same as an omitted cursor. The added regression test exercises the newly supported unscoped read path, and the existing branch selection in `readEvents` continues to preserve repo filtering when `since` normalizes to `undefined`. No visible correctness defect is introduced by this diff.

Nits — 3 non-blocking
  • packages/gittensory-miner/lib/event-ledger.js:56: nit: the comment still says only omitted values become `undefined`, so update it to mention nullish values now that `null` is accepted.
  • test/unit/miner-event-ledger.test.ts:100: add a small assertion for `readEvents({ repoFullName: "o/a", since: null })` so the repo-scoped plus null-cursor branch is locked down too.
  • Readiness score is below the configured threshold — Use the readiness panel as advisory maintainer context; the score does not block this PR.
Signal Result Evidence
Code review ✅ No blockers 1 reviewer
Linked issue ⚠️ Missing No linked issue or no-issue rationale found.
Related work ✅ No active overlap found No same-issue or scoped active PR overlap found.
Change scope ✅ 20/20 Low review scope from cached public metadata (no linked issue context).
Validation posture ❌ 5/25 Preflight is holding this PR: the review lane is unavailable, so it is not ready for automated review.
Contributor workload ✅ 10/10 Author activity: 927 registered-repo PR(s), 659 merged, 38 issue(s).
Contributor context ✅ Confirmed Gittensor contributor jony376; Gittensor profile; 927 PR(s), 38 issue(s).
Gate result ✅ Passing No configured blocker found.
Review context
  • Author: jony376
  • Role context: outside_contributor
  • Public audience mode: oss maintainer
  • Lane context: Repository registration is not available in the local Gittensory cache.
  • Public profile languages: not available
  • Official Gittensor activity: 927 PR(s), 38 issue(s).
  • PR-specific overlap: none found.
Contributor next steps
  • Explain no-issue PR.
  • Await review-lane availability.
  • Refresh registry data or choose a registered active repo.
  • Link the issue being solved, or explicitly explain why this is a no-issue PR.
Signal definitions
  • Related work = same linked issue, overlapping active PRs, or title/path similarity.
  • Change scope = cached public metadata such as size labels, draft state, and review-burden hints.
  • Validation posture = whether the PR provides enough public validation/test evidence for maintainer review.
  • Contributor workload = public contributor activity and cleanup pressure, not a repo-wide quality failure.
  • Contributor context = public GitHub/Gittensor identity context; non-Gittensor status is not a blocker.

🟩 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.

  • Re-run Gittensory review

@gittensory-orb gittensory-orb Bot added the gittensor Gittensor contributor context label Jul 4, 2026
@codecov

codecov Bot commented Jul 4, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.06%. Comparing base (6b3a95d) to head (ceadea4).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3016   +/-   ##
=======================================
  Coverage   96.06%   96.06%           
=======================================
  Files         260      260           
  Lines       28689    28689           
  Branches    10437    10437           
=======================================
  Hits        27560    27560           
  Misses        493      493           
  Partials      636      636           
🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@JSONbored JSONbored merged commit d03e0a3 into JSONbored:main Jul 4, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. gittensor Gittensor contributor context

Projects

Development

Successfully merging this pull request may close these issues.

2 participants