fix(miner): report a clean CLI failure when manage status collection throws (#7236) - #7266
Conversation
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7266 +/- ##
=======================================
Coverage 93.81% 93.81%
=======================================
Files 704 704
Lines 69448 69451 +3
Branches 18897 18897
=======================================
+ Hits 65152 65155 +3
Misses 3302 3302
Partials 994 994
Flags with carried forward coverage won't be shown. Click here to find out more.
|
|
Tip ✅ LoopOver review result - approve/merge recommendedReview updated: 2026-07-19 11:26:26 UTC
Review summary Nits — 2 non-blocking
Decision drivers
Context & advisory signals — never blocks the verdict
Linked issue satisfactionAddressed Review context
Contributor next steps
Signal definitions
🧪 Chat with LoopOverAsk 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.
Full command reference: https://loopover.ai/docs/loopover-commands 🧪 Experimental — new and may change. 🟩 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.
|
Summary
manage-status.js'srunManageStatusopened three local SQLite stores and rancollectManageStatus/collectRunPortfolio+ theconsole.loginside atry { ... } finally { ...close... }with nocatch.A read/render failure therefore propagated as an unhandled throw out of the CLI command — inconsistent
with every other store-touching command, which fail cleanly through
reportCliFailure(honoring--json).This adds the missing
catchbetween the existingtrybody andfinally, matching the exact patternrunOrbExportCli(orb-export.js) andrunQueueList(portfolio-queue-cli.js) already use:catch (error) { return reportCliFailure(parsed.json, describeCliError(error)); }. The store-opening linesstay outside the
try, and thefinally's store-closing logic is untouched.describeCliErroris nowimported alongside the existing
argsWantJson, reportCliFailure.Closes #7236
Scope
site//CNAME/lovable; no new dependency.Closes #7236).Validation
git diff --checknpm run typecheck(root — clean)npm run test:coverage— 100% of the changed line covered. New regression: whencollectManageStatusthrows,
runManageStatusreturns a clean exit code (2) and surfaces the message viaconsole.error(text)or a
{ ok: false, error }JSON object (--json), never an unhandled throw. Existing tests pass unchanged.npm run build:miner(node --checkpasses).If any required check was skipped, explain why:
packages/loopover-miner/lib/**; CI runs the full suite.Safety
describeCliError's message string, same as the sibling commands.