[PR #7183] [MERGED] fix(setup): preserve Linux Hopper HTTP failure status #7699

Closed
opened 2026-11-03 13:39:44 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/7183
Author: @WenyuChiou
Created: 10/26/2026
Status: ✅ Merged
Merged: 10/26/2026
Merged by: @gensokyo-dev

Base: main ← Head: fix/hopper-http-status-7182


📝 Commits (1)

  • 701bf8a fix(setup): preserve Linux Hopper HTTP failure status

📊 Changes

4 files changed (+171 additions, -11 deletions)

View changed files

📝 docs/installation.md (+4 -0)
📝 src/application/HopperDownload.ts (+17 -5)
📝 src/application/LinuxHopper.ts (+18 -6)
➕ tests/process-global/hopperDownloadHttpFailure.test.ts (+132 -0)

📄 Description

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

  • Add optional HTTP status to the shared download result for valid failed-response statuses.
  • Carry that fact through the Linux installer's existing operationFailure detail and setup remediation. The top-level code remains download_failed.
  • Add offline producer-to-setup regression coverage and a short installation-guide note.

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

  • Semantic owner: downloadHopperPackage produces the observed HTTP fact; the Linux installer consumes it through existing setup failure projection.
  • Contribution scope: ordinary correction within existing setup; advance maintainer scope decision not applicable.
  • CLI/MCP: no schema or catalog change; Linux setup remediation becomes more specific.
  • Platform: Linux diagnostic consumption only. Other consumers retain existing behavior.
  • Evidence/reconstruction: no analysis artifact or reconstruction changes.
  • Lifecycle: response cancellation and existing installation safeguards remain; no new resource acquisition.
  • Package/metadata: no dependency, lockfile, version, or generated-catalog changes.

Expected effects:

  • Contact network services. Existing setup download behavior only; tests use synthetic fetch responses.
  • Launch or attach to a process.
  • Inject instrumentation or run scripts/code.
  • Recover protected code or work around protections.

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.
  • Independent boundary smoke checks: 12 passed.
  • npm run check:fast: passed, including typecheck/lint.
  • npm run docs:check: passed.
  • Independent static review: no remaining blockers in the four-file patch.

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

  • I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work.
  • I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps.
  • I declare this PR ready for initial maintainer review.

Before merge

  • This PR addresses a concrete problem or an agreed enhancement.
  • Material scope and authority questions are resolved.
  • Tests and affected validation support the final change.
  • Human review and required checks are complete.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/morluto/rea/pull/7183 **Author:** [@WenyuChiou](https://github.com/WenyuChiou) **Created:** 10/26/2026 **Status:** ✅ Merged **Merged:** 10/26/2026 **Merged by:** [@gensokyo-dev](https://github.com/gensokyo-dev) **Base:** `main` ← **Head:** `fix/hopper-http-status-7182` --- ### 📝 Commits (1) - [`701bf8a`](https://github.com/morluto/rea/commit/701bf8aff9e19ebd3158ba8923c4caf41d7363c8) fix(setup): preserve Linux Hopper HTTP failure status ### 📊 Changes **4 files changed** (+171 additions, -11 deletions) <details> <summary>View changed files</summary> 📝 `docs/installation.md` (+4 -0) 📝 `src/application/HopperDownload.ts` (+17 -5) 📝 `src/application/LinuxHopper.ts` (+18 -6) ➕ `tests/process-global/hopperDownloadHttpFailure.test.ts` (+132 -0) </details> ### 📄 Description ## 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 - Add optional HTTP status to the shared download result for valid failed-response statuses. - Carry that fact through the Linux installer's existing `operationFailure` detail and setup remediation. The top-level code remains `download_failed`. - Add offline producer-to-setup regression coverage and a short installation-guide note. 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 - Semantic owner: `downloadHopperPackage` produces the observed HTTP fact; the Linux installer consumes it through existing setup failure projection. - Contribution scope: ordinary correction within existing setup; advance maintainer scope decision not applicable. - CLI/MCP: no schema or catalog change; Linux setup remediation becomes more specific. - Platform: Linux diagnostic consumption only. Other consumers retain existing behavior. - Evidence/reconstruction: no analysis artifact or reconstruction changes. - Lifecycle: response cancellation and existing installation safeguards remain; no new resource acquisition. - Package/metadata: no dependency, lockfile, version, or generated-catalog changes. Expected effects: - [x] Contact network services. Existing setup download behavior only; tests use synthetic fetch responses. - [ ] Launch or attach to a process. - [ ] Inject instrumentation or run scripts/code. - [ ] Recover protected code or work around protections. ## 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: ```json {"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. - Independent boundary smoke checks: 12 passed. - `npm run check:fast`: passed, including typecheck/lint. - `npm run docs:check`: passed. - Independent static review: no remaining blockers in the four-file patch. 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 - [x] I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work. - [x] I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps. - [x] I declare this PR ready for initial maintainer review. ## Before merge - [ ] This PR addresses a concrete problem or an agreed enhancement. - [ ] Material scope and authority questions are resolved. - [ ] Tests and affected validation support the final change. - [ ] Human review and required checks are complete. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 13:39:44 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
morluto/rea#7699
No description provided.