fix(cli): return failure when a platform installer throws - #377
Open
DivyamTalwar wants to merge 1 commit into
Open
DivyamTalwar wants to merge 1 commit into
DivyamTalwar wants to merge 1 commit into
Conversation
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
|
Warning Review limit reachedNext included review available in 18 minutes. View limit detailsLimit 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. Review configuration: ⚙️ Run configurationConfiguration used: Repository: activeloopai/hivemind/.coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (2)
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. Comment |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
ce30de7ca94115cb73fa991538c6d2595ac2622a, a mocked throwing installer leavesprocess.exitCodeundefined despite emittingFAILED: boom.cli-index.test.tsandinstall-consent.test.tspass: 80 tests.tsc --noEmitpasses.npm run buildpasses.Independent validation
Exact commit
2bbf0d70cac410de8698d01ef769c7e796be57e4passed 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.