Skip to content

feat(miner): add claimIssue and listActiveClaims ledger aliases - #3640

Merged
loopover-orb[bot] merged 1 commit into
JSONbored:mainfrom
kiannidev:feat/claim-ledger-foundation-api-3351
Jul 5, 2026
Merged

feat(miner): add claimIssue and listActiveClaims ledger aliases#3640
loopover-orb[bot] merged 1 commit into
JSONbored:mainfrom
kiannidev:feat/claim-ledger-foundation-api-3351

Conversation

@kiannidev

Copy link
Copy Markdown
Contributor

Summary

Closes #3351
Closes #3353

Test plan

Made with Cursor

…bored#3351)

Expose the foundation-phase claim ledger API names with full idempotent claimIssue coverage (JSONbored#3353).

Co-authored-by: Cursor <cursoragent@cursor.com>
@kiannidev
kiannidev requested a review from JSONbored as a code owner July 5, 2026 21:19
@superagent-security

Copy link
Copy Markdown
Contributor

Superagent didn't find any vulnerabilities or security issues in this PR.

@loopover-orb loopover-orb Bot added the gittensor:feature Gittensor-scored feature linked to a feature issue — scores a 0.25x multiplier. label Jul 5, 2026
@loopover-orb

loopover-orb Bot commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

Warning

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

⏸️ Gittensory review result - manual review recommended

Review updated: 2026-07-05 21:24:29 UTC

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

⏸️ Suggested Action - Manual Review

Review summary
This diff adds thin `claimIssue`/`listActiveClaims` convenience wrappers around the existing `recordClaim`/`listClaims` primitives, both as instance methods on the ledger returned by `openClaimLedger()` and as default-store module exports, closing the #3351 API-surface gap. The implementation is correct: `claimIssue` delegates straight to `recordClaim` (inheriting its atomic INSERT...ON CONFLICT idempotency), and `listActiveClaims` just pins `status: 'active'` on `listClaims`, reusing all existing normalization/validation logic rather than duplicating it. The `const ledger = {...}; return ledger;` restructuring to allow the object to self-reference in `claimIssue`/`listActiveClaims` is a small but correct JS pattern change, and the new tests exercise the real idempotent-reclaim and repo-scoped filtering paths rather than fabricating state.

Nits — 5 non-blocking
  • claim-ledger.js: `claimIssue`/`listActiveClaims` are pure pass-throughs with no added behavior — consider whether this alias layer is worth maintaining long-term versus just documenting `recordClaim`/`listClaims` usage, though this is a style call given the issue explicitly requests the alias.
  • test/unit/miner-claim-ledger.test.ts: the new tests don't cover `claimIssue`/`listActiveClaims` rejecting invalid input (e.g., malformed repoFullName) the way the existing 'rejects malformed inputs' test does for `recordClaim`/`listClaims`, though this is low-risk since both delegate straight to already-tested validators.
  • claim-ledger.d.ts and claim-ledger.js both look complete and consistent with the JS implementation — no changes needed there.
  • If future PRs add more aliases, consider a small JSDoc note on `claimIssue`/`listActiveClaims` clarifying they are pure delegations (already present) so reviewers don't need to re-trace the call chain each time.
  • 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 ✅ Linked #3351, #3353
Related work ⚠️ 3 scoped overlaps Top overlaps are listed below; lower-confidence bulk is hidden.
Change scope ❌ 8/20 High review scope from cached public metadata (2 linked issues).
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: 1478 registered-repo PR(s), 770 merged, 48 issue(s).
Contributor context ✅ Confirmed Gittensor contributor kiannidev; Gittensor profile; 1478 PR(s), 48 issue(s).
Gate result ✅ Passing No configured blocker found.
Review context
Contributor next steps
  • Review top overlaps.
  • Add a concise scope and risk note.
  • Await review-lane availability.
  • Refresh registry data or choose a registered active repo.
  • Check active issues and PRs before submitting.
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

@codecov

codecov Bot commented Jul 5, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.13%. Comparing base (a4c4cf0) to head (407eda4).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3640   +/-   ##
=======================================
  Coverage   93.13%   93.13%           
=======================================
  Files         314      314           
  Lines       32002    32002           
  Branches    11723    11723           
=======================================
  Hits        29804    29804           
  Misses       1552     1552           
  Partials      646      646           
🚀 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 left a comment

Copy link
Copy Markdown
Contributor

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 0912c37 into JSONbored:main Jul 5, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gittensor:feature Gittensor-scored feature linked to a feature issue — scores a 0.25x multiplier.

Projects

None yet

1 participant