Skip to content

feat(miner): add ci wait CLI command#2703

Closed
kiannidev wants to merge 3 commits into
JSONbored:mainfrom
kiannidev:feat/miner-ci-wait
Closed

feat(miner): add ci wait CLI command#2703
kiannidev wants to merge 3 commits into
JSONbored:mainfrom
kiannidev:feat/miner-ci-wait

Conversation

@kiannidev

@kiannidev kiannidev commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add gittensory-miner ci wait <owner/repo> <pr-number> to block until GitHub check runs settle, reusing the existing pollCheckRuns poller.
  • Support --json for scripting and honor GITHUB_TOKEN / GITTENSOR_MINER_GITHUB_TOKEN.
  • Document the command in --help with unit tests for arg parsing and exit codes.

Test plan

  • npm test -- test/unit/miner-cli-ci-wait.test.ts test/unit/miner-cli.test.ts
  • CI green on upstream

Expose pollCheckRuns as `gittensory-miner ci wait` so miners can block until a PR's check runs finish, with JSON output for scripting.

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

codecov Bot commented Jul 3, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.13%. Comparing base (10b83e6) to head (559c066).
⚠️ Report is 7 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2703      +/-   ##
==========================================
- Coverage   96.15%   96.13%   -0.03%     
==========================================
  Files         240      240              
  Lines       26964    26985      +21     
  Branches     9788     9792       +4     
==========================================
+ Hits        25928    25941      +13     
- Misses        426      433       +7     
- Partials      610      611       +1     

see 2 files with indirect coverage changes

🚀 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 commented Jul 3, 2026

Copy link
Copy Markdown

Warning

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

⏸️ Gittensory review result - manual review recommended

Review updated: 2026-07-03 07:39:24 UTC

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

⏸️ Suggested Action - Manual Review

Review summary
The diff adds a coherent `gittensory-miner ci wait` command, wires it through the bin entrypoint, documents it in help output, and covers the parser plus success/failure exit codes. The implementation correctly reuses `pollCheckRuns`, keeps JSON on stdout, and returns distinct usage/token errors with exit code 2. I do not see a reachable correctness defect in the provided changed files.

Nits — 6 non-blocking
  • nit: packages/gittensory-miner/lib/ci-wait.js:50 accepts any first positional string even though the usage promises `<owner/repo>`; add a small shape check so bad input fails before the GitHub call.
  • nit: packages/gittensory-miner/lib/ci-wait.js:83 forwards `minIntervalMs` and `maxIntervalMs` independently, so `--min-interval-ms 5000 --max-interval-ms 1000` is accepted; either reject that combination here or document that `pollCheckRuns` normalizes it.
  • nit: test/unit/miner-cli-ci-wait.test.ts:54 does not assert that `pollCheckRuns` is not called when the token is missing, which is the main side-effect boundary for that branch.
  • nit: test/unit/miner-cli-ci-wait.test.ts:61 only checks one JSON substring; asserting the parsed stdout payload would make the scripting contract less brittle.
  • packages/gittensory-miner/lib/ci-wait.js:50: validate `repoFullName` as exactly two non-empty path segments before polling, matching the advertised `<owner/repo>` contract.
  • 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: 1626 registered-repo PR(s), 796 merged, 49 issue(s).
Contributor context ✅ Confirmed Gittensor contributor kiannidev; Gittensor profile; 1626 PR(s), 49 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: not available
  • Official Gittensor activity: 1626 PR(s), 49 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 added gittensor gittensor:feature Gittensor-scored feature linked to a feature issue — scores a 0.25x multiplier. labels Jul 3, 2026
Co-authored-by: Cursor <cursoragent@cursor.com>
Parse polling options without throwing so malformed argv surfaces user-facing errors and documents the flags in --help.

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

@JSONbored JSONbored left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Merge conflicts:

This branch has conflicts that must be resolved
Use the [web editor](https://github.com/JSONbored/gittensory/pull/2703/conflicts) or the command line to resolve conflicts before continuing.

packages/gittensory-miner/package.json

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.

Development

Successfully merging this pull request may close these issues.

2 participants