Skip to content

feat(miner): add local manage-phase status command - #3070

Merged
loopover-orb[bot] merged 4 commits into
JSONbored:mainfrom
jony376:feat/miner-manage-status-command-v2
Jul 4, 2026
Merged

feat(miner): add local manage-phase status command#3070
loopover-orb[bot] merged 4 commits into
JSONbored:mainfrom
jony376:feat/miner-manage-status-command-v2

Conversation

@jony376

@jony376 jony376 commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add a read-only gittensory-miner manage status command that aggregates managed PR rows from the local portfolio queue and event ledger.
  • Introduce manage_pr_update event vocabulary plus table/JSON renderers for CI state, gate verdict, outcome, and last-polled timestamp.
  • Cover empty portfolio, mixed portfolio/event snapshots, --json output shape, and bin entrypoint wiring in unit tests.

Closes #2325.

Scope

Validation

  • npm run test:ci locally — Node.js is not installed on the contributor machine; CI will run the full gate on push.
  • New behavior has unit tests for empty portfolio, mixed state, JSON output, and CLI help/status wiring.

Safety

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

UI Evidence

Not applicable — miner CLI package only.

Notes

  • Portfolio PR identifiers use the pr:<number> convention; manage rows merge latest manage_pr_update payloads from the append-only event ledger.
  • Dispatch manage status before the npm update check (same offline contract as foundation status/doctor).

jony376 and others added 3 commits July 4, 2026 04:43
Co-authored-by: Cursor <cursoragent@cursor.com>
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 11:49
@superagent-security

Copy link
Copy Markdown
Contributor

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

@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.11%. Comparing base (07e7fbe) to head (d861c3d).
⚠️ Report is 5 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3070   +/-   ##
=======================================
  Coverage   96.11%   96.11%           
=======================================
  Files         263      263           
  Lines       28964    28964           
  Branches    10539    10539           
=======================================
  Hits        27838    27838           
  Misses        492      492           
  Partials      634      634           
🚀 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:feature Gittensor-scored feature linked to a feature issue — scores a 0.25x multiplier. label Jul 4, 2026
@loopover-orb

loopover-orb Bot commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

Warning

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

⏸️ Gittensory review result - manual review recommended

Review updated: 2026-07-04 12:04:12 UTC

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

⏸️ Suggested Action - Manual Review

Review summary
This adds a read-only `gittensory-miner manage status` path, a local aggregator over portfolio queue rows plus ledger snapshots, and table/JSON renderers with focused unit coverage. The visible implementation is coherent with the offline-command dispatch convention, validates malformed snapshot payloads before indexing, and preserves queue metadata when a ledger update exists for the same repo/PR. I do not see a reachable correctness blocker in the provided diff.

Nits — 5 non-blocking
  • nit: `packages/gittensory-miner/lib/manage-status.js:43` accepts a whitespace-padded `repoFullName` because it checks `trim()` but stores the original value; either normalize it before building the key or reject non-canonical names so table/JSON output cannot contain accidental spaces.
  • nit: `packages/gittensory-miner/lib/manage-status.js:103` uses fixed `padEnd` widths without truncation or delimiter escaping, so long repo/branch names make the table hard to scan; this is acceptable for now but should be tightened if humans will rely on this command during active management.
  • nit: `test/unit/miner-manage-status.test.ts:157` covers `runManageStatus` directly but not the actual bin dispatch path promised in the PR description; add a small harness/spawn assertion for `manage status` if you want the entrypoint wiring claim fully backed.
  • In `packages/gittensory-miner/lib/manage-status.js:43`, assign `const repoFullName = event.repoFullName.trim()` and use that for the key/output, or reject when `repoFullName !== event.repoFullName.trim()`.
  • In `test/unit/miner-manage-status.test.ts`, add a bin-level test mirroring the existing CLI harness style so `gittensory-miner manage status` is proven to dispatch before the npm update check.
Signal Result Evidence
Code review ✅ No blockers 1 reviewer
Linked issue ✅ Linked #2325
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: 956 registered-repo PR(s), 680 merged, 42 issue(s).
Contributor context ✅ Confirmed Gittensor contributor jony376; Gittensor profile; 956 PR(s), 42 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: 956 PR(s), 42 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

Co-authored-by: Cursor <cursoragent@cursor.com>

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

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

Development

Successfully merging this pull request may close these issues.

feat(miner-manage): local manage-phase CLI status command

1 participant