Context
Home now mirrors the untouched cli/install/bun-upgrade.test.ts corpus at 7 passed / 0 failed / 0 unsupported / 0 TODO, including package-name rejection, help behavior, and cleanup of an existing $BUN_TMPDIR/<version> staging tree after a failed stable archive extraction.
The public CLI still needs to activate the copied native Bun self-upgrade implementation rather than treating upgrade as the package-manager update command.
Parent tracker: #66
Acceptance criteria
- Dispatch
bun upgradeto Home's copied native upgrade command. - Preserve
bun updatepackage dependency behavior as a distinct command. - Support stable/canary/profile selection and platform/architecture resolution.
- Download, validate, stage, and atomically replace the executable with cleanup on every failure path.
- Preserve the exact 7/7 corpus result and add native CLI integration coverage where self-replacement can be safely isolated.
- Keep diagnostics actionable and retain the causal error chain for download, extraction, validation, and replacement failures.