Skip to content

fix(cli): return failure when a platform installer throws - #377

Open
DivyamTalwar wants to merge 1 commit into
activeloopai:mainfrom
DivyamTalwar:fix/cli-install-failure-status
Open

DivyamTalwar wants to merge 1 commit into
activeloopai:mainfrom
DivyamTalwar:fix/cli-install-failure-status

Conversation

@DivyamTalwar

Copy link
Copy Markdown

Summary

Fixes #376.

The unified CLI caught platform installer and uninstaller exceptions, printed a failure, and then returned success. Automation could therefore accept a partially applied setup. The patch keeps best-effort iteration across platforms but sets process.exitCode = 1, skips post-install embeddings after a failed direct install, and reports uninstall failure status.

Version Bump

None; no release requested.

Test plan

Independent validation

Exact commit 2bbf0d70cac410de8698d01ef769c7e796be57e4 passed the isolated Node 22/Linux typecheck, build, duplication guard, critical-only OpenClaw bundle audit, and full test suite with coverage. The gate asserts zero failed and zero skipped tests; this is an independent branch run, not a combined-branch result.

Commands and retained validation logs, job cli-install-failure-status.

Limits

This fixes thrown installer failures at the dispatcher boundary; it does not make every installer transactional or change errors an installer intentionally handles internally. No release/version bump is requested. The existing full macOS baseline has 19 failures and 10 skips; no clean full macOS run is claimed. The scoped tests use mocked installer boundaries and isolated state, not real user installations or live services.

The unified installer caught per-platform errors, continued its post-install flow, and left the process exit status at zero. Detached autoupdate therefore treated a partially refreshed installation as successful. Return explicit success from each installer wrapper and set a non-zero status after all targets have been attempted.\n\nConstraint: Remaining platforms should still be attempted, while callers must receive a failure status\nRejected: Abort on the first installer error | would leave later detected platforms unprocessed\nConfidence: high\nScope-risk: moderate\nReversibility: clean\nDirective: Do not log FAILED installer work and then claim Done without a non-zero process status\nTested: CLI index and install-consent Vitest suites (80 tests); TypeScript noEmit\nNot-tested: Live global npm update
@coderabbitai

coderabbitai Bot commented Sep 21, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 18 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 4 included reviews currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Repository: activeloopai/hivemind/.coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: c2c7de0d-3ba4-495c-89b9-3c475bc52730

📥 Commits

Reviewing files that changed from the base of the PR and between ce30de7 and 2bbf0d7.

📒 Files selected for processing (2)
  • src/cli/index.ts
  • tests/cli/cli-index.test.ts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CLI returns success after a platform installer or uninstaller throws

1 participant