Skip to content

fix(miner): treat null listClaims filters as unscoped#2978

Merged
loopover-orb[bot] merged 1 commit into
JSONbored:mainfrom
jony376:fix/miner-claim-ledger-null-list-filters
Jul 4, 2026
Merged

fix(miner): treat null listClaims filters as unscoped#2978
loopover-orb[bot] merged 1 commit into
JSONbored:mainfrom
jony376:fix/miner-claim-ledger-null-list-filters

Conversation

@jony376

@jony376 jony376 commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Treat null repoFullName and status filters in listClaims as unscoped, matching governor-ledger and event-ledger read semantics.
  • Prevents { repoFullName: null } from throwing and { status: null } from being rejected as invalid_status.

Scope

  • The PR title follows type(scope): short summary Conventional Commit format.
  • Focused on claim-ledger list 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/status filters returning all claims.

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 consistency fix after #2955 null read-filter normalization in the event ledger.

listClaims no longer throws on null repo or status filters; null and omitted filters both return all matching rows.

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 (8833803) to head (499282c).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2978   +/-   ##
=======================================
  Coverage   96.06%   96.06%           
=======================================
  Files         259      259           
  Lines       28663    28663           
  Branches    10431    10431           
=======================================
  Hits        27536    27536           
  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.

@loopover-orb loopover-orb Bot added the gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. label Jul 4, 2026
@loopover-orb

loopover-orb Bot commented Jul 4, 2026

Copy link
Copy Markdown

Warning

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

⏸️ Gittensory review result - manual review recommended

Review updated: 2026-07-04 08:06:25 UTC

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

⏸️ Suggested Action - Manual Review

Review summary
This change updates claim-ledger list filtering so null repoFullName/status values are normalized to the same unscoped path as undefined, and the .d.ts contract now matches the runtime behavior. The implementation routes null filters through the existing prepared-statement branches without touching persistence or mutation paths, and the added unit test covers the all-null cases. I do not see a reachable correctness break in the provided diff.

Nits — 3 non-blocking
  • test/unit/miner-claim-ledger.test.ts:110: nit: the new test covers all-null inputs but not mixed null/concrete filters, so the intended partial-unscoping behavior is less explicitly locked down.
  • test/unit/miner-claim-ledger.test.ts:110: add assertions for mixed cases such as `{ repoFullName: null, status: "active" }` and `{ repoFullName: "o/a", status: null }` to document that only the null field is unscoped.
  • 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

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

@loopover-orb loopover-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.

@loopover-orb loopover-orb Bot merged commit 0da1db3 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