Skip to content

fix(miner): treat null repo filter as unscoped in event ledger reads#2955

Merged
gittensory-orb[bot] merged 2 commits into
JSONbored:mainfrom
jony376:fix/miner-event-ledger-unscoped-null-repo-filter
Jul 4, 2026
Merged

fix(miner): treat null repo filter as unscoped in event ledger reads#2955
gittensory-orb[bot] merged 2 commits into
JSONbored:mainfrom
jony376:fix/miner-event-ledger-unscoped-null-repo-filter

Conversation

@jony376

@jony376 jony376 commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Treat a null repoFullName read filter as unscoped so readEvents returns every event, matching governor-ledger semantics.
  • Prevents { repoFullName: null } from silently narrowing results to global-scope rows only.

Scope

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

Validation

  • npm run test:ci locally — CI will run the full gate on push.
  • Unit tests cover null repo filter alone and combined with since.

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

Append-time repo scope is unchanged: omitted/nullish event scopes still persist as NULL. Only read-filter normalization is split out.

readEvents no longer maps a null repoFullName filter to global-scope rows only; null and omitted filters both return all events.

Co-authored-by: Cursor <cursoragent@cursor.com>
@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 (f8ba5d6) to head (0a02709).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2955   +/-   ##
=======================================
  Coverage   96.06%   96.06%           
=======================================
  Files         259      259           
  Lines       28648    28648           
  Branches    10423    10423           
=======================================
  Hits        27521    27521           
  Misses        490      490           
  Partials      637      637           
🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@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 07:18:43 UTC

3 files · 1 AI reviewer · no blockers · readiness 73/100 · CI green · clean

⏸️ Suggested Action - Manual Review

Review summary
The change cleanly separates append-time repo scope normalization from read-filter normalization, so `null` continues to persist as a global event scope on append while `readEvents({ repoFullName: null })` now selects the unscoped read path. The `.d.ts` contract matches the new accepted read input, and the tests cover both the plain null filter and null combined with `since`. The visible implementation is coherent with the PR description and does not introduce a reachable break in the changed path.

Nits — 5 non-blocking
  • nit: `test/unit/miner-event-ledger.test.ts:96` checks type order and length, but comparing `readEvents({ repoFullName: null })` directly against `readEvents()` would lock the intended equivalence more tightly.
  • nit: `test/unit/miner-event-ledger.test.ts:105` covers null-plus-since, but the read-side malformed `repoFullName` validation path is still only implicit through the shared helper.
  • In `test/unit/miner-event-ledger.test.ts:96`, assert `ledger.readEvents({ repoFullName: null })` equals `ledger.readEvents()` after setup so future query-path changes cannot accidentally diverge while preserving the same count/type list.
  • In `test/unit/miner-event-ledger.test.ts`, add a small read-side validation assertion such as `expect(() => ledger.readEvents({ repoFullName: "no-slash" })).toThrow("invalid_repo_full_name")` to pin the contract after splitting read normalization from append normalization.
  • 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: 914 registered-repo PR(s), 651 merged, 38 issue(s).
Contributor context ✅ Confirmed Gittensor contributor jony376; Gittensor profile; 914 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: 914 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

@gittensory-orb gittensory-orb Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gittensory approves — the gate is satisfied and CI is green.

@gittensory-orb gittensory-orb Bot merged commit 0fcd23e 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

None yet

Development

Successfully merging this pull request may close these issues.

1 participant