Repository navigation
fix(setup): preserve Linux Hopper HTTP failure status - #7183
Conversation
[Medium impact] The PR appears safe to merge; the added diagnostic preserves the existing download rejection and installation safeguards. SummaryPreserves an observed HTTP failure status from the Hopper downloader through Linux setup diagnostics.
Diagram%%{init: {'theme': 'neutral'}}%%
flowchart LR
A[Failed HTTP response] --> B[downloadHopperPackage]
B --> C[Optional httpStatus]
C --> D[installLinuxHopper]
D --> E[operationFailure detail]
E --> F[Setup remediation]
F --> G[download_failed unchanged]
Reviews (1) · Last reviewed commit: "fix(setup): preserve Linux Hopper HTTP f..." · Reviewed by Greptile |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
@codex review |
|
@codex review |
|
Codex Review: Didn't find any major issues. 🚀 Reviewed commit: ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback". |
|
Independently validated head
No vendor package was downloaded or installed, and no real Hopper execution or macOS diagnostic acceptance is claimed. The live TLS check verifies actual HTTP transport; installer/setup regression uses controlled hosts that reject installation effects. |
Main's 1a91630 (morluto#7183) changed downloadHopperPackage to return a HopperDownload that keeps the HTTP status of a refused response, and split that refusal from the oversized-body check. Keep both: the merged function returns HopperDownload with main's HTTP-status refusal and content-length check, inside this branch's stall and overall timers. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Summary
Fixes #7182.
Linux Hopper setup now preserves an observed HTTP failure status instead of giving indistinguishable diagnostics for HTTP 404 and 503.
Problem and expected behavior
The downloader previously returned only
ok: false, so the Linux installer and setup adapter could not report the HTTP status. Preserve that fact without inferring its cause or promising that retrying will succeed.Change and scope
operationFailuredetail and setup remediation. The top-level code remainsdownload_failed.This is the separate HTTP-status diagnostic follow-up explicitly excluded by #7150, not a replacement for its timeout work. No timeout, retry, redirect, byte-limit, package-verification, or authorization policy changes.
Contract and boundary impact
downloadHopperPackageproduces the observed HTTP fact; the Linux installer consumes it through existing setup failure projection.Expected effects:
Evidence and regression coverage
The new regression failed for 404 and 503 against the original implementation, then passed after the fix. It executes the production downloader, Linux installer, and setup adapter with synthetic fetch responses and a controlled installer host that rejects unexpected installation effects.
For HTTP 503, the observed setup result is:
{"status":"failed","code":"download_failed","remediation":"download: Package download returned HTTP 503. REA could not download or unpack the official Hopper package. Check network and filesystem access, then retry setup."}Coverage also checks cancellation of failed response bodies, unchanged successful downloads, and generic diagnostics for missing or invalid statuses. Existing redirect and setup tests remain included. These are offline application-boundary results, not CLI or real-vendor output.
Validation performed
npm run test:focused -- tests/process-global/hopperDownloadHttpFailure.test.ts tests/process-global/hopperDownloadRedirect.test.ts src/application/LinuxHopper.test.ts src/application/SetupInstallFailure.test.ts: 81 tests passed across four files; independently rerun successfully.npm run check:fast: passed, including typecheck/lint.npm run docs:check: passed.Validation used isolated lockfile dependencies installed with npm 11.16.0 and
npm ci --ignore-scripts; no lockfile change. Earlier shared-dependency mismatch and a direct TypeScript run exiting 137 were retained as failed attempts, not counted as passing evidence. The subsequent isolated official checks above passed.Compatibility, safety, and release
Base:
1173c0a9dc1b352a60943a491462294db8f353ae. Reviewed tree:57e48695ed681694580777508a6270bbe05c6980.Optional result detail is additive; no migration or release metadata change. Only a numeric observed status is included, not response bodies or credentials. No automatic retry or weakened verification.
Not run: full aggregate suite, package verification, actual CLI setup, vendor download, package installation, macOS diagnostic acceptance, or real provider execution. Hosted CI remains pending. No maintainer agreement or broader setup reliability claim is implied.
Author readiness
Human owner: @WenyuChiou
Before merge