Skip to content

feat(miner): add local governor ledger CLI#3118

Merged
gittensory-orb[bot] merged 2 commits into
JSONbored:mainfrom
jony376:feat/miner-governor-ledger-cli
Jul 4, 2026
Merged

feat(miner): add local governor ledger CLI#3118
gittensory-orb[bot] merged 2 commits into
JSONbored:mainfrom
jony376:feat/miner-governor-ledger-cli

Conversation

@jony376

@jony376 jony376 commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add read-only gittensory-miner governor list for inspecting locally persisted governor decision events.
  • Provide table and --json output with optional repo and event-type filtering.
  • Cover argv parsing, table rendering, list flows, and CLI dispatch in unit tests.

Follow-up to #2328 (governor ledger storage foundation).

Scope

  • The PR title follows type(scope): short summary Conventional Commit format (feat — new miner capability).
  • Focused on read-only governor ledger inspection only — no MCP writes or network calls.

Validation

  • npm run test:ci locally — CI will run the full gate on push.
  • Unit tests cover list output, repo/type filtering, JSON shape, and invalid argv handling.

Safety

  • No secrets, wallet details, hotkeys, or private scoring output in code or PR text.
  • Read-only SELECT/list against local SQLite; no GitHub writes or uploads.

UI Evidence

Not applicable — miner CLI package only.

Notes

  • Dispatch governor before the npm update check (same offline contract as ledger, queue, and plan).
  • --type values are validated against the frozen GOVERNOR_LEDGER_EVENT_TYPES vocabulary from the engine.

jony376 and others added 2 commits July 4, 2026 07:54
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@jony376 jony376 requested a review from JSONbored as a code owner July 4, 2026 15:08
@superagent-security

Copy link
Copy Markdown

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

@gittensory-orb gittensory-orb Bot added the gittensor:feature Gittensor-scored feature linked to a feature issue — scores a 1.25x 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 15:12:59 UTC

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

⏸️ Suggested Action - Manual Review

Review summary
This adds a read-only `gittensory-miner governor list` command, wires it before the npm update check, and covers parsing, rendering, dispatch, and ledger-backed filtering. The core list path is coherent and CI has already exercised the added syntax/tests, but the event-type vocabulary is duplicated locally instead of using the engine source the PR says it validates against. That creates a real contract-drift risk for persisted ledger rows and CLI filters.

Nits — 6 non-blocking
  • nit: packages/gittensory-miner/lib/governor-ledger-cli.js:1 duplicates `GOVERNOR_LEDGER_EVENT_TYPES` instead of importing the engine vocabulary referenced by the comment and PR description, so change it to import the engine export or explain why the miner package must carry an intentionally frozen copy.
  • nit: packages/gittensory-miner/lib/governor-ledger-cli.d.ts:3 repeats the same event-type union, which can drift independently from both the engine and the JS runtime list; prefer deriving this from a shared exported constant/type if the package boundary allows it.
  • nit: packages/gittensory-miner/lib/governor-ledger-cli.js:78 assumes `eventType`, `actionClass`, and `decision` are always strings in table rendering; that matches normal ledger rows, but using `display(...).padEnd(...)` consistently would keep malformed historical rows from crashing a read-only inspection command.
  • packages/gittensory-miner/lib/governor-ledger-cli.js:1 should import `GOVERNOR_LEDGER_EVENT_TYPES` from `@​jsonbored/gittensory-engine` if that export is available, matching the PR claim that `--type` is validated against the engine vocabulary.
  • packages/gittensory-miner/lib/governor-ledger-cli.d.ts:3 should avoid a manually maintained union unless there is no shared type export available from the engine/miner ledger module.
  • 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: 989 registered-repo PR(s), 699 merged, 41 issue(s).
Contributor context ✅ Confirmed Gittensor contributor jony376; Gittensor profile; 989 PR(s), 41 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: 989 PR(s), 41 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.09%. Comparing base (c0de333) to head (fa0c5cc).
⚠️ Report is 7 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3118   +/-   ##
=======================================
  Coverage   96.09%   96.09%           
=======================================
  Files         265      265           
  Lines       29083    29083           
  Branches    10591    10591           
=======================================
  Hits        27946    27946           
  Misses        493      493           
  Partials      644      644           
🚀 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 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 fcfb5ef 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:feature Gittensor-scored feature linked to a feature issue — scores a 1.25x multiplier. gittensor Gittensor contributor context

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant