Skip to content

docs(miner): document miner_claims schema in claim ledger#3642

Closed
kiannidev wants to merge 1 commit into
JSONbored:mainfrom
kiannidev:docs/claim-ledger-schema-3352
Closed

docs(miner): document miner_claims schema in claim ledger#3642
kiannidev wants to merge 1 commit into
JSONbored:mainfrom
kiannidev:docs/claim-ledger-schema-3352

Conversation

@kiannidev

Copy link
Copy Markdown
Contributor

Summary

  • Document the foundation-phase miner_claims schema inline above the CREATE TABLE: repo_full_name, issue_number, claimed_at, status CHECK (active/released/expired), and UNIQUE (repo_full_name, issue_number).
  • Note that release/expire timing is captured via status transitions rather than a separate released_at column (the shipped schema extends the original sketch with expired for TTL expiry).
  • Add a source-doc regression test so the schema comment cannot drift silently.

Closes #3352

Test plan

Made with Cursor

…3352)

Record the foundation-phase table columns, status CHECK, and UNIQUE constraint with a regression test so the schema cannot drift silently.

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

Copy link
Copy Markdown
Contributor

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

@codecov

codecov Bot commented Jul 5, 2026

Copy link
Copy Markdown

⚠️ JUnit XML file not found

The CLI was unable to find any JUnit XML files to upload.
For more help, visit our troubleshooting guide.

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

loopover-orb Bot commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

Caution

🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥

🛑 Gittensory review result - fixes required

Review updated: 2026-07-05 21:32:22 UTC

2 files · 1 AI reviewer · no blockers · readiness 80/100 · CI failing · blocked

🛑 Suggested Action - Fix Blockers

Review summary
This is a pure documentation PR: it adds a comment block above the `miner_claims` CREATE TABLE in claim-ledger.js:81-95 spelling out the columns, the status CHECK values, and the UNIQUE constraint, plus a regression test that greps the source file for those exact strings so the comment can't silently drift. The documented schema (columns, CHECK values, UNIQUE constraint) matches the real CREATE TABLE below it, and the PR closes the linked issue #3352 as required. It's low-risk, narrowly scoped, and correct as written; the only gap is the comment omits the `DEFAULT 'active'` clause that's actually in the CREATE TABLE.

Nits — 5 non-blocking
  • The new schema comment (claim-ledger.js) omits `DEFAULT 'active'`, which the real CREATE TABLE has on the `status` column — worth adding for completeness since the whole point of this PR is an accurate inline schema doc.
  • The regression test (miner-claim-ledger.test.ts) asserts brittle exact-whitespace substrings (e.g. `CHECK(status IN (...))` with no space, differing from the actual DDL's `CHECK (status IN (...))` with a space) — any future reformatting of the comment (even a harmless one) will break this test for no functional reason.
  • The test only checks that certain substrings exist in the file; it doesn't verify the documented CHECK values/UNIQUE columns actually match the live CREATE TABLE, so the two could drift apart again without failing this test.
  • Add `DEFAULT 'active'` to the schema comment in claim-ledger.js so it fully mirrors the CREATE TABLE.
  • Consider deriving the test assertions from the actual CREATE TABLE string (e.g. slicing the source between markers) rather than hardcoding parallel literal strings, so the test fails only when documentation and implementation genuinely diverge, not on incidental formatting changes.

CI checks failing

  • validate
  • validate-code
Signal Result Evidence
Code review ✅ No blockers 1 reviewer
Linked issue ✅ Linked #3352
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 (1 linked issue).
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
  • Author: kiannidev
  • Role context: outside_contributor
  • Public audience mode: oss maintainer
  • Lane context: Repository registration is not available in the local Gittensory cache.
  • Public profile languages: TypeScript, MDX, C++, HTML, Rust
  • Official Gittensor activity: 1478 PR(s), 48 issue(s).
  • PR-specific overlap: none found.
Contributor next steps
  • Await review-lane availability.
  • Refresh registry data or choose a registered active repo.
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 commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

Gittensory is closing this pull request on the maintainer's behalf (CI is failing (validate, validate-code)). This is an automated maintenance action — to pursue this change, please open a new pull request with the issues resolved. Closed PRs may be analyzed later to improve review accuracy, but they are not automatically reopened or re-reviewed.

@loopover-orb loopover-orb Bot closed this Jul 5, 2026
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.

Projects

None yet

1 participant