Skip to content

feat(miner): add manage poll command writing CI snapshots to ledger - #3082

Merged
loopover-orb[bot] merged 2 commits into
JSONbored:mainfrom
pekar9781:feat/miner-manage-poll-command
Jul 4, 2026
Merged

feat(miner): add manage poll command writing CI snapshots to ledger#3082
loopover-orb[bot] merged 2 commits into
JSONbored:mainfrom
pekar9781:feat/miner-manage-poll-command

Conversation

@pekar9781

Copy link
Copy Markdown
Contributor

Summary

  • Add gittensory-miner manage poll <owner/repo> <pr#> to poll GitHub check runs and append manage_pr_update snapshots to the local event ledger.
  • Map CI poller conclusions into manage-status fields (ciState, gateVerdict, outcome) and ensure a pr:<number> portfolio row exists for status rendering.
  • Cover argv parsing, conclusion mapping, ledger writes, portfolio bootstrap, and CLI output in unit tests.

Follow-up to #2323 (CI poller lib), #2325 / #3070 (manage status reader), and #3076 (portfolio queue CLI).

Scope

  • The PR title follows type(scope): short summary Conventional Commit format (feat — new miner capability).
  • Focused on manage poll orchestration only — read-only GitHub GETs plus local ledger/queue writes.

Validation

  • npm run test:ci locally — CI will run the full gate on push.
  • Unit tests cover mapping, ledger append, portfolio row bootstrap, JSON output, and poll error surfacing.

Safety

  • No secrets in code or PR text; GITHUB_TOKEN is read from the environment only.
  • GitHub access is read-only GET via the existing ci-poller module; no uploads or PR mutations.

UI Evidence

Not applicable — miner CLI package only.

Notes

  • manage poll runs after the npm update-check bootstrap (network command, unlike offline manage status).
  • Poll snapshots populate the columns that manage status already renders from the event ledger.

pekar9781 and others added 2 commits July 4, 2026 06:05
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@pekar9781
pekar9781 requested a review from JSONbored as a code owner July 4, 2026 13:22
@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 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 13:32:17 UTC

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

⏸️ Suggested Action - Manual Review

Review summary
The change adds a coherent `manage poll` command that polls the existing CI poller, writes a `manage_pr_update` ledger snapshot, and bootstraps a managed PR row for status rendering. The CLI wiring, build script inclusion, and unit coverage line up with the described feature, and the post-change files do not show a merge-blocking break. The main review risk is semantic: the status mapping depends on the exact conclusion vocabulary emitted by `ci-poller`, so I would tighten that mapping/coverage before relying on the command operationally.

Nits — 6 non-blocking
  • nit: packages/gittensory-miner/lib/manage-poll.js:106 validates only `enqueue` on an injected `portfolioQueue`, but `ensureManagedPrRow` also requires `listQueue`; either validate both methods or let the concrete store type remain the only supported input.
  • nit: packages/gittensory-miner/lib/manage-poll.js:20 maps only `failure` to a blocking verdict, so confirm the existing `ci-poller` cannot emit terminal non-success conclusions like `cancelled`, `timed_out`, or `action_required` that should also be `block`/`needs-work`.
  • nit: packages/gittensory-miner/lib/manage-poll.js:54 stores `pollResult.conclusion` without validating it, which is fine with the current poller but makes injected/test callers able to write arbitrary `ciState` strings into the ledger.
  • nit: test/unit/miner-manage-poll.test.ts:51 covers the happy argv path and invalid PR number, but it does not cover unknown options, malformed `owner/repo`, or missing `--branch` value despite those branches being newly added parser behavior.
  • packages/gittensory-miner/lib/manage-poll.js:106 should validate `typeof portfolioQueue.listQueue === "function"` alongside `enqueue`, because the helper calls both methods.
  • 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

@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 (0c30e17) to head (f49c8d5).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3082   +/-   ##
=======================================
  Coverage   96.08%   96.08%           
=======================================
  Files         265      265           
  Lines       29077    29077           
  Branches    10589    10589           
=======================================
  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 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 761e44c 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