Skip to content

feat(miner): add local portfolio queue CLI - #3076

Merged
loopover-orb[bot] merged 1 commit into
JSONbored:mainfrom
pekar9781:feat/miner-portfolio-queue-cli
Jul 4, 2026
Merged

feat(miner): add local portfolio queue CLI#3076
loopover-orb[bot] merged 1 commit into
JSONbored:mainfrom
pekar9781:feat/miner-portfolio-queue-cli

Conversation

@pekar9781

Copy link
Copy Markdown
Contributor

Summary

  • Add local gittensory-miner queue list|next|done commands for inspecting and operating the portfolio backlog store.
  • Provide table and --json output for queue rows, atomic next-item claiming, and done marking.
  • Cover argv parsing, table rendering, injected-store CLI wiring, and missing-entry handling in unit tests.

Follow-up to #2292 (portfolio queue foundation) and #3074 (ranked discovery enqueue).

Scope

  • The PR title follows type(scope): short summary Conventional Commit format (feat — new miner capability).
  • Focused on portfolio queue operator CLI only — no network calls or unrelated miner changes.

Validation

  • npm run test:ci locally — CI will run the full gate on push.
  • Unit tests cover list/next/done flows, JSON output, repo filtering, and CLI dispatch.

Safety

  • No secrets, wallet details, hotkeys, or private scoring output in code or PR text.
  • Local SQLite only: SELECT/UPDATE on the portfolio queue file, no GitHub writes or uploads.

UI Evidence

Not applicable — miner CLI package only.

Notes

  • Dispatch queue before the npm update check (same offline contract as status, doctor, and manage status).
  • queue next atomically claims the highest-priority queued row; queue done fails closed with queue_entry_not_found when the row is absent.

Co-authored-by: Cursor <cursoragent@cursor.com>
@pekar9781
pekar9781 requested a review from JSONbored as a code owner July 4, 2026 12:45
@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.08%. Comparing base (ab01335) to head (c299eed).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3076   +/-   ##
=======================================
  Coverage   96.08%   96.08%           
=======================================
  Files         265      265           
  Lines       29077    29077           
  Branches    10588    10588           
=======================================
  Hits        27940    27940           
  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.

@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:49:34 UTC

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

⏸️ Suggested Action - Manual Review

Review summary
This adds a focused local queue CLI that wires list/next/done ahead of the update-check path, and the implementation follows the existing portfolio-queue store contracts instead of duplicating queue logic. The atomic claim path stays in `portfolio-queue.js`, while this layer is limited to argv parsing, output formatting, and exit-code behavior, which is the right split. I do not see a reachable correctness defect in the changed code.

Nits — 6 non-blocking
  • nit: `packages/gittensory-miner/lib/portfolio-queue-cli.js:211` reports unknown queue subcommands with only the `queue list` usage, so `queue done`/`queue next` users do not get the actual subcommand menu.
  • nit: `packages/gittensory-miner/lib/cli.js:18` documents `queue done` without a short description while the adjacent commands include one, which makes the help output uneven.
  • nit: `test/unit/miner-portfolio-queue-cli.test.ts:145` dispatches `done` after `next`, but does not assert the JSON shape for `done --json`; that is a small coverage gap for one of the advertised output modes.
  • Add a queue-level usage string in `packages/gittensory-miner/lib/portfolio-queue-cli.js` and use it for unknown subcommands so all supported subcommands are visible.
  • Add a short description to the `queue done` help line in `packages/gittensory-miner/lib/cli.js`.
  • 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: 975 registered-repo PR(s), 693 merged, 40 issue(s).
Contributor context ✅ Confirmed Gittensor contributor jony376; Gittensor profile; 975 PR(s), 40 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: 975 PR(s), 40 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 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 0c30e17 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 0.25x multiplier.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant