[PR #1312] [CLOSED] fix(browser): follow only HTTP redirect statuses for source maps #2792

Closed
opened 2026-10-17 21:10:18 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/1312
Author: @rudycelekli
Created: 10/9/2026
Status: ❌ Closed

Base: main ← Head: fix/source-map-http-status-20261009


📝 Commits (2)

  • 1e055a0 fix(browser): follow only HTTP redirect statuses for source maps
  • 7d8b4b8 test(browser): avoid duplicating source-map listener setup

📊 Changes

2 files changed (+92 additions, -1 deletions)

View changed files

📝 src/browser/WebSourceMapFetcher.ts (+3 -1)
➕ tests/boundary/browser/webSourceMapHttpStatus.test.ts (+89 -0)

📄 Description

Problem

Source-map fetching followed any 3xx response with a Location header. HTTP 300, 304, 305 and 306 are not automatic Fetch redirects, but REA could replace the observed failure with an unrelated map and incorrect source attribution.

Change

Follow only HTTP 301, 302, 303, 307 and 308. Other statuses retain their existing HTTP failure. Redirect chain checks, relative resolution and response cleanup are unchanged.

Verification

  • Frozen real HTTP regression failed for all four nonredirect statuses before the fix; all five redirect controls passed.
  • After: all 67 focused HTTP/cleanup/source-map tests passed, independently rerun by a second reviewer.
  • Actual Chrome 154 CDP analyzeBundle before/after: HTTP 304 previously fetched/included an unrelated map; after it retains fetch_failed/HTTP 304 and does not request the unrelated URL.
  • npm run check, typecheck and test discovery passed. The final formatted test was refrozen and rerun before/after.
  • Native proof uses the production CDP provider; any public CLI/MCP parity proof is separately recorded. No Hopper/Ghidra run performed; unrelated provider behavior is unchanged. Hosted checks may still be pending.

AI assistance was used for investigation, implementation and verification.


🔄 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/1312 **Author:** [@rudycelekli](https://github.com/rudycelekli) **Created:** 10/9/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/source-map-http-status-20261009` --- ### 📝 Commits (2) - [`1e055a0`](https://github.com/morluto/rea/commit/1e055a0bb06fc9248941fd9174b5484db960c07a) fix(browser): follow only HTTP redirect statuses for source maps - [`7d8b4b8`](https://github.com/morluto/rea/commit/7d8b4b818245d249a9add9a3266c16e9d87be551) test(browser): avoid duplicating source-map listener setup ### 📊 Changes **2 files changed** (+92 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `src/browser/WebSourceMapFetcher.ts` (+3 -1) ➕ `tests/boundary/browser/webSourceMapHttpStatus.test.ts` (+89 -0) </details> ### 📄 Description ## Problem Source-map fetching followed any 3xx response with a Location header. HTTP 300, 304, 305 and 306 are not automatic Fetch redirects, but REA could replace the observed failure with an unrelated map and incorrect source attribution. ## Change Follow only HTTP 301, 302, 303, 307 and 308. Other statuses retain their existing HTTP failure. Redirect chain checks, relative resolution and response cleanup are unchanged. ## Verification - Frozen real HTTP regression failed for all four nonredirect statuses before the fix; all five redirect controls passed. - After: all 67 focused HTTP/cleanup/source-map tests passed, independently rerun by a second reviewer. - Actual Chrome 154 CDP analyzeBundle before/after: HTTP 304 previously fetched/included an unrelated map; after it retains fetch_failed/HTTP 304 and does not request the unrelated URL. - `npm run check`, typecheck and test discovery passed. The final formatted test was refrozen and rerun before/after. - Native proof uses the production CDP provider; any public CLI/MCP parity proof is separately recorded. No Hopper/Ghidra run performed; unrelated provider behavior is unchanged. Hosted checks may still be pending. AI assistance was used for investigation, implementation and verification. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-17 21:10:18 +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#2792
No description provided.