[PR #518] [MERGED] fix(browser): resolve redirected source map paths from final URL #2044

Closed
opened 2026-10-16 21:13:39 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/518
Author: @rudycelekli
Created: 10/5/2026
Status: ✅ Merged
Merged: 10/5/2026
Merged by: @morluto

Base: main ← Head: fix/source-map-redirect-base-20261004


📝 Commits (2)

  • 1d9719b fix(browser): resolve redirected source map paths from final URL
  • 6225ae4 test(browser): separate redirected source map boundary cases

📊 Changes

2 files changed (+84 additions, -7 deletions)

View changed files

📝 src/browser/WebSourceMapFetcher.ts (+10 -7)
📝 tests/boundary/browser/webSourceMapFetcher.test.ts (+74 -0)

📄 Description

Change

Summary

Resolve relative source-map sources against the final approved fetch URL after redirects. Keep the originally declared URL in the observation metadata.

A map requested at /maps/current and delivered at /assets/v2/app.js.map currently reports ../src/main.ts as /src/main.ts, including its mappings and original import edges. The source-map base should be the delivered map URL, so those paths resolve under /assets/src/.

Verification

  • Actual owned loopback HTTP server and production fetchWebSourceMaps: before 1 failed / 8 passed; after 9 passed.
  • Both redirected and direct-map paths assert original sources, mappings, import edges, and retained declared URL.
  • Existing unauthorized-origin, redirect-chain, malformed map, and collection controls remain green.
  • TypeScript check passes with the pinned Node 24.18.0 environment.
  • Full repository/package gates are recorded separately before publication.

This verifies the HTTP source-map boundary; it does not claim a real Chromium observation run.

Reproduction and verification

Actual loopback HTTP fetch: before redirected-map regression failed while direct-map and7existing controls passed; after9passed.

  • npm run check:pr: passed (Test Files 352 passed (352); Tests 1800 passed | 2 skipped (1802)).
  • npm run check:ci: passed.
  • npm run verify:package: passed installed-tarball CLI/MCP verification, including optional-dependency degradation.
  • npm pack --dry-run: passed.
    Matching npm run verify:browser: passed the native verification lane.
  • Exact lockfile installation on Node 24.18.0 and npm 11.16.0.

actual HTTP source-map boundary; no real Chromium or Linux sandbox claim

Prepared with AI assistance; the reproductions and verification commands above were executed locally.


🔄 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/518 **Author:** [@rudycelekli](https://github.com/rudycelekli) **Created:** 10/5/2026 **Status:** ✅ Merged **Merged:** 10/5/2026 **Merged by:** [@morluto](https://github.com/morluto) **Base:** `main` ← **Head:** `fix/source-map-redirect-base-20261004` --- ### 📝 Commits (2) - [`1d9719b`](https://github.com/morluto/rea/commit/1d9719b6abdce10a7a7add901d917dc337f5750f) fix(browser): resolve redirected source map paths from final URL - [`6225ae4`](https://github.com/morluto/rea/commit/6225ae49dc59d7e96669b1b85a6dfbf13746da3d) test(browser): separate redirected source map boundary cases ### 📊 Changes **2 files changed** (+84 additions, -7 deletions) <details> <summary>View changed files</summary> 📝 `src/browser/WebSourceMapFetcher.ts` (+10 -7) 📝 `tests/boundary/browser/webSourceMapFetcher.test.ts` (+74 -0) </details> ### 📄 Description ## Change ## Summary Resolve relative source-map sources against the final approved fetch URL after redirects. Keep the originally declared URL in the observation metadata. A map requested at `/maps/current` and delivered at `/assets/v2/app.js.map` currently reports `../src/main.ts` as `/src/main.ts`, including its mappings and original import edges. The source-map base should be the delivered map URL, so those paths resolve under `/assets/src/`. ## Verification - Actual owned loopback HTTP server and production `fetchWebSourceMaps`: before 1 failed / 8 passed; after 9 passed. - Both redirected and direct-map paths assert original sources, mappings, import edges, and retained declared URL. - Existing unauthorized-origin, redirect-chain, malformed map, and collection controls remain green. - TypeScript check passes with the pinned Node 24.18.0 environment. - Full repository/package gates are recorded separately before publication. This verifies the HTTP source-map boundary; it does not claim a real Chromium observation run. ## Reproduction and verification Actual loopback HTTP fetch: before redirected-map regression failed while direct-map and7existing controls passed; after9passed. - `npm run check:pr`: passed (Test Files 352 passed (352); Tests 1800 passed | 2 skipped (1802)). - `npm run check:ci`: passed. - `npm run verify:package`: passed installed-tarball CLI/MCP verification, including optional-dependency degradation. - `npm pack --dry-run`: passed. Matching `npm run verify:browser`: passed the native verification lane. - Exact lockfile installation on Node 24.18.0 and npm 11.16.0. actual HTTP source-map boundary; no real Chromium or Linux sandbox claim Prepared with AI assistance; the reproductions and verification commands above were executed locally. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-16 21:13:39 +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#2044
No description provided.