Skip to content

feat(miner): add reject render CLI for courtesy notes - #3278

Closed
kiannidev wants to merge 2 commits into
JSONbored:mainfrom
kiannidev:feat/miner-reject-render-cli
Closed

feat(miner): add reject render CLI for courtesy notes#3278
kiannidev wants to merge 2 commits into
JSONbored:mainfrom
kiannidev:feat/miner-reject-render-cli

Conversation

@kiannidev

@kiannidev kiannidev commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add gittensory-miner reject render to print CoC-compliant courtesy notes from the existing rejection-templates module (feat(miner-manage): CoC-compliant rejection message templates #2324).
  • Add gittensory-miner reject reasons to list valid reason buckets for scripting (--json supported on both).
  • Parse errors and template validation failures return exit code 2 without throwing through the bin entrypoint.

No-issue rationale

Follow-up wiring for the already-merged rejection template library (#2804): exposes the pure renderer as a shell command for local miner harnesses without adding GitHub write actions.

Test plan

  • npm test -- test/unit/miner-cli-rejection-render.test.ts test/unit/miner-rejection-templates.test.ts
  • npm run build --workspace @jsonbored/gittensory-miner
  • npm run typecheck
  • CI + Orb gate green on upstream

Wire the existing CoC-compliant rejection templates to `gittensory-miner reject render|reasons` so local harnesses can emit public-safe close notes without reimplementing validation.

Co-authored-by: Cursor <cursoragent@cursor.com>
@kiannidev
kiannidev requested a review from JSONbored as a code owner July 5, 2026 00:28
@superagent-security

Copy link
Copy Markdown
Contributor

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

Resolve bin, help, and build-script conflicts with the expanded miner CLI surface from main.

Co-authored-by: Cursor <cursoragent@cursor.com>
@loopover-orb loopover-orb Bot added the gittensor:feature Gittensor-scored feature linked to a feature issue — scores a 0.25x multiplier. label Jul 5, 2026
@loopover-orb

loopover-orb Bot commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

Warning

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

⏸️ Gittensory review result - manual review recommended

Review updated: 2026-07-05 00:49:14 UTC

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

⏸️ Suggested Action - Manual Review

  • Touches a guarded path — held for manual review

Review summary
The change cleanly exposes the existing rejection-template renderer through `gittensory-miner reject render` and adds a small `reasons` helper, with parse errors and renderer validation mapped to exit code 2 as described. The new bin dispatch is wired into the existing opportunistic update-check flow, and the package build script now syntax-checks the new module. I do not see a reachable correctness defect in the provided files.

Nits — 6 non-blocking
  • nit: packages/gittensory-miner/lib/rejection-render.js:122 reports only the render usage for an unknown `reject` subcommand, so `gittensory-miner reject wat` hides the valid `reasons` subcommand; change the message to a reject-level usage string or explain why only render help is intentional.
  • nit: test/unit/miner-cli-rejection-render.test.ts:45 covers the library entrypoints but not the actual bin dispatch path added in packages/gittensory-miner/bin/gittensory-miner.js:89; add one `runCapture(["reject", "reasons"])`-style test so the CLI wiring is protected like the existing top-level commands.
  • packages/gittensory-miner/lib/rejection-render.js:4 could define a separate `REJECT_USAGE = "Usage: gittensory-miner reject <render|reasons> ..."` and use it from `runRejectCli` for unknown subcommands.
  • test/unit/miner-cli-rejection-render.test.ts:45 should include at least one spawned/bin-level assertion for `reject render` or `reject reasons` so future dispatch changes cannot strand the new module.
  • Readiness score is below the configured threshold — Use the readiness panel as advisory maintainer context; the score does not block this PR.
  • Touches a guarded path — held for manual review — A maintainer must review and merge this change.
Signal Result Evidence
Code review ✅ No blockers 1 reviewer
Linked issue ⚠️ Missing No linked issue or no-issue rationale found.
Related work ⚠️ 1 scoped overlap Top overlaps are listed below; lower-confidence bulk is hidden.
Change scope ❌ 8/20 High 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: 1313 registered-repo PR(s), 629 merged, 49 issue(s).
Contributor context ✅ Confirmed Gittensor contributor kiannidev; Gittensor profile; 1313 PR(s), 49 issue(s).
Gate result ⚠️ Not blocking Advisory; not blocking this PR.
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: 1313 PR(s), 49 issue(s).
  • Related work: Titles/paths share 5 meaningful terms. (issue #1683, issue #1681)
Contributor next steps
  • Explain no-issue PR.
  • Review top overlaps.
  • Add a concise scope and risk note.
  • 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.
  • Check active issues and PRs before submitting.
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 5, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.13%. Comparing base (d9dfcf8) to head (db0cbe1).
⚠️ Report is 4 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3278   +/-   ##
=======================================
  Coverage   94.13%   94.13%           
=======================================
  Files         276      276           
  Lines       30204    30204           
  Branches    11011    11011           
=======================================
  Hits        28432    28432           
  Misses       1127     1127           
  Partials      645      645           
🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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

Please focus on outstanding issues instead.

@JSONbored JSONbored closed this Jul 5, 2026
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. manual-review Gittensor contributor context

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants