Skip to content

fix(miner): printHelp() omits the working deny-hooks subcommand - #8933

Merged
loopover-orb[bot] merged 1 commit into
JSONbored:mainfrom
phamngocquy:miner/issue-8851
Jul 26, 2026
Merged

fix(miner): printHelp() omits the working deny-hooks subcommand#8933
loopover-orb[bot] merged 1 commit into
JSONbored:mainfrom
phamngocquy:miner/issue-8851

Conversation

@phamngocquy

@phamngocquy phamngocquy commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

Summary

deny-hooks is a fully working top-level CLI subcommand (packages/loopover-miner/bin/loopover-miner.ts:174, dispatched via runDenyHooks, wired since #8806) but is the only registered subcommand absent from packages/loopover-miner/lib/cli.ts's printHelp() usage text -- every other subcommand (queue, claim, ledger, plan, governor, calibration, state, orb export, tenant, purge, ...) is listed there. An operator running loopover-miner --help cannot discover the command exists.

Deliverables

  • printHelp() includes a deny-hooks usage line describing its real subcommands (check deny-hooks-cli.ts for the actual subcommand names to document accurately)
  • A test asserting printHelp()'s output contains the string deny-hooks (extend the existing help-text test if one exists, or add one)

All of the above Deliverables are required in the same PR unless the deliverable text itself states otherwise.

Test plan

packages/loopover-miner/** -- 99%+ Codecov patch target. The new/updated test must assert the exact substring is present in printHelp's output, not just that the function runs.

Fixes #8851

@phamngocquy
phamngocquy requested a review from JSONbored as a code owner July 26, 2026 13: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 26, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.55%. Comparing base (10755ed) to head (0127b16).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8933      +/-   ##
==========================================
- Coverage   90.56%   90.55%   -0.01%     
==========================================
  Files          96       97       +1     
  Lines       22490    22498       +8     
  Branches     3884     3886       +2     
==========================================
+ Hits        20367    20374       +7     
  Misses       1945     1945              
- Partials      178      179       +1     
Flag Coverage Δ
backend 87.50% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
packages/loopover-miner/lib/cli.ts 87.50% <ø> (ø)

@loopover-orb loopover-orb Bot added the gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. label Jul 26, 2026
@loopover-orb

loopover-orb Bot commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

Tip

✅ LoopOver review result - approve/merge recommended

Review updated: 2026-07-26 14:02:01 UTC

2 files · 1 AI reviewer · no blockers · readiness 93/100 · CI green · clean

✅ Suggested Action - Approve/Merge

  • safe to merge

Review summary
This is a narrow, well-scoped doc fix: it adds the missing `deny-hooks` usage lines (list/refresh/approve/reject) to printHelp() and asserts their presence in the existing help-text test, matching the format of every other subcommand block already in the file. It closes the linked issue #8851, doesn't touch runtime dispatch logic, and the new test lines exercise the exact strings added to the diff rather than fabricating anything.

Nits — 4 non-blocking
  • The new usage lines don't follow the file's pattern of a trailing description column for each verb (e.g. `queue done`/`claim release` have no inline description either, but `refresh`/`approve`/`reject` here get none while `list` implicitly shares the block description below `reject` — consider clarifying which line the summary description on the line after 'reject' applies to, since it visually reads as belonging only to 'reject').
  • test/unit/miner-cli.test.ts:75 asserts full string for 'list' but not for 'refresh'/'approve'/'reject' — since deliverables call out documenting the real subcommands accurately, asserting at least one more variant (e.g. 'deny-hooks approve') would tighten coverage of the exact new lines.
  • cli.ts: consider right-aligning the trailing description under 'reject' or moving it directly after 'list' to make clear it describes the whole deny-hooks command group, consistent with how 'discover --search' groups its description on the following line.
  • Code changes lack test evidence — Add focused regression tests or explain why existing coverage is sufficient.

Decision drivers

  • ✅ Code review — No blockers (1 reviewer)
  • ✅ Gate result — Passing (No configured blocker found.)
Context & advisory signals — never blocks the verdict
Signal Result Evidence
Linked issue ✅ Linked #8851
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 ✅ 25/25 PR body includes validation/test evidence.
Contributor workload ✅ 10/10 Author activity: 1 registered-repo PR(s), 0 merged, 0 issue(s).
Contributor context ✅ Confirmed Gittensor contributor phamngocquy; Gittensor profile; 1 PR(s), 0 issue(s).
Improvement ℹ️ None detected risk: low · value: none
Linked issue satisfaction

Addressed
The diff adds a deny-hooks usage block to printHelp() listing its real subcommands (list, refresh, approve, reject) matching the surrounding format, and extends the existing help-text test to assert the substrings 'deny-hooks' and a specific usage line are present in the output.

Review context
  • Author: phamngocquy
  • Role context: outside_contributor
  • Public audience mode: oss maintainer
  • Lane context: Repository is configured for direct PR review.
  • Public profile languages: Java, Python, Lua, Jupyter Notebook, C, Dockerfile, JavaScript, Shell
  • Official Gittensor activity: 1 PR(s), 0 issue(s).
  • PR-specific overlap: none found.
Contributor next steps
  • Start here: Triage stale or unlinked PRs.
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.
🧪 Chat with LoopOver

Ask LoopOver a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.

  • @loopover ask &lt;question&gt; answers contribution-quality Q&A with source citations and freshness.
  • @loopover chat &lt;question&gt; answers in natural prose from cached decision-pack facts via local inference (maintainer/collaborator; read-only).
  • A plain-language @loopover mention with a real question is routed to the closest matching read-only command automatically — no exact syntax required.

Full command reference: https://loopover.ai/docs/loopover-commands

🧪 Experimental — new and may change.

Decision record
  • action: merge · clause: success
  • config: 03a7f8b529a9 · pack: oss-anti-slop
  • record: 3f9b6276c693 (schema v2, head 0127b16)

🟩 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 LoopOver, a quiet PR intelligence layer for OSS maintainers.

  • Re-run LoopOver 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.

LoopOver 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:bug Gittensor-scored bug fix — scores a 0.05x multiplier.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(miner): printHelp() omits the working deny-hooks subcommand

1 participant