[PR #811] [MERGED] fix(browser): identify NodeNext TypeScript original source artifacts #2258

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

📋 Pull Request Information

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

Base: main ← Head: fix/source-map-typescript-media-20261006


📝 Commits (1)

  • 83b2e59 fix(browser): identify NodeNext TypeScript original source artifacts

📊 Changes

3 files changed (+72 additions, -2 deletions)

View changed files

📝 docs/browser-observation.md (+1 -1)
📝 src/browser/WebSourceMapFetcher.ts (+4 -1)
📝 tests/boundary/browser/webSourceMapFetcher.test.ts (+67 -0)

📄 Description

Summary

Identify .mts and .cts original source artifacts as TypeScript, alongside the existing .ts and .tsx cases. TypeScript's NodeNext compiler emits source maps pointing to these ordinary input files, but their retained artifacts were labeled text/javascript.

Problem and expected behavior

Actual pinned TypeScript7 compilation followed by owned Chrome154 and CdpBrowserProvider.analyzeBundle retained the original .mts/.cts text with the wrong media type. .ts and .js controls were correct. Original TypeScript artifacts should retain their supported language label regardless of the NodeNext module suffix. This is a focused bug fix, so no large-contract issue is needed.

Change and scope

Extend the existing source media classifier to the two NodeNext TypeScript suffixes. Update the owning browser documentation and exercise seven source suffixes through real owned HTTP map responses. Parsing support already exists; this does not add a language or reconstruct missing sources.

Contract and boundary impact

  • Semantic owner and earliest changed stage: browser source-map normalization, original text artifact media type.
  • CLI and MCP/tool-catalog contract: existing result shape unchanged; the corrected artifacts report text/typescript.
  • Provider, bridge, target-format, or platform compatibility: browser source maps only; actual local Chrome verified.
  • Evidence, artifact, provenance, or reconstruction contract: original bytes, hashes, resolved source identities and mappings are retained unchanged.
  • Process execution, authorization, cleanup, or containment impact: none; existing authorization and cleanup behavior unchanged.
  • Generated metadata (docs/product-catalog.json), package, or installation impact: none.

Evidence and regression coverage

  • Tests added or updated: seven native HTTP consumer cases (ts, tsx, mts, cts, js, mjs, cjs); two fail the base classifier.

  • Base reproduction or other evidence: actual TypeScript7 CLI emitted four maps; actual public browser analysis mislabeled both NodeNext inputs before the change and correctly labels all four controls afterward.

  • User-visible CLI/MCP output: .mts/.cts original artifacts change from text/javascript to text/typescript.

  • Remaining proof gaps: one full browser verifier invocation failed in unchanged popup cleanup with its existing1000ms timeout. A subsequent main-baseline full verifier passed; this is not claimed as a baseline failure. The exact candidate's isolated existing popup verifier then passed without timeout or source changes. No full candidate verifier green claim or cross-browser claim.

  • Observed, derived, and inferred claims remain distinguishable.

  • Artifact identity, source provenance, and failed attempts remain preserved.

  • Unsupported, incomplete, unavailable, or uncertain outcomes remain visible.

Validation performed

  • Focused source-map and response-cleanup tests:41passed; base test run reproduced two new failures.
  • npm run check:5tasks passed,129 existing warnings and zero errors.
  • npm run check:fast:2tasks passed.
  • npm run docs:check and npm run build:passed.
  • Actual TypeScript7 compiler + owned HTTP + public Chrome154 analysis:four before/after controls passed after the correction.
  • npm run verify:browser:candidate run failed at unchanged popup cleanup; main baseline passed. Exact candidate verifyPopupEventCoverage passed all network, nested popup, gap, shared-context, CLI and stdio MCP controls afterward. Both original receipts retained.

Compatibility, safety, and release

  • Breaking changes or migration steps: none.
  • Real Hopper/Ghidra, browser, or OS coverage: actual Chrome154 on macOS; no Hopper/Ghidra or other browser claim.
  • Package or release metadata impact: none.
  • Security, privacy, process, or containment review: no authorization or containment changes; owned local fixtures and no paid requests.

Review checklist

  • The PR has one focused outcome and the title follows type(scope): outcome.
  • Related issue is linked, or the reason for not linking one is stated above.
  • Tests cover changed observable behavior and meaningful failure paths.
  • Owning docs, contracts, and generated metadata are updated where needed.
  • User-visible CLI/MCP changes include representative output.
  • I checked the final diff for secrets, unrelated cleanup, and unsupported claims.

AI-assisted implementation and verification; I reviewed the patch and ran the reported checks.


🔄 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/811 **Author:** [@rudycelekli](https://github.com/rudycelekli) **Created:** 10/7/2026 **Status:** ✅ Merged **Merged:** 10/7/2026 **Merged by:** [@N0zoM1z0](https://github.com/N0zoM1z0) **Base:** `main` ← **Head:** `fix/source-map-typescript-media-20261006` --- ### 📝 Commits (1) - [`83b2e59`](https://github.com/morluto/rea/commit/83b2e595fd92864c5cd8c0da78bdd975415b6cd0) fix(browser): identify NodeNext TypeScript original source artifacts ### 📊 Changes **3 files changed** (+72 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `docs/browser-observation.md` (+1 -1) 📝 `src/browser/WebSourceMapFetcher.ts` (+4 -1) 📝 `tests/boundary/browser/webSourceMapFetcher.test.ts` (+67 -0) </details> ### 📄 Description ## Summary Identify `.mts` and `.cts` original source artifacts as TypeScript, alongside the existing `.ts` and `.tsx` cases. TypeScript's NodeNext compiler emits source maps pointing to these ordinary input files, but their retained artifacts were labeled `text/javascript`. ## Problem and expected behavior Actual pinned TypeScript7 compilation followed by owned Chrome154 and `CdpBrowserProvider.analyzeBundle` retained the original `.mts`/`.cts` text with the wrong media type. `.ts` and `.js` controls were correct. Original TypeScript artifacts should retain their supported language label regardless of the NodeNext module suffix. This is a focused bug fix, so no large-contract issue is needed. ## Change and scope Extend the existing source media classifier to the two NodeNext TypeScript suffixes. Update the owning browser documentation and exercise seven source suffixes through real owned HTTP map responses. Parsing support already exists; this does not add a language or reconstruct missing sources. ## Contract and boundary impact - Semantic owner and earliest changed stage: browser source-map normalization, original text artifact media type. - CLI and MCP/tool-catalog contract: existing result shape unchanged; the corrected artifacts report `text/typescript`. - Provider, bridge, target-format, or platform compatibility: browser source maps only; actual local Chrome verified. - Evidence, artifact, provenance, or reconstruction contract: original bytes, hashes, resolved source identities and mappings are retained unchanged. - Process execution, authorization, cleanup, or containment impact: none; existing authorization and cleanup behavior unchanged. - Generated metadata (`docs/product-catalog.json`), package, or installation impact: none. ## Evidence and regression coverage - Tests added or updated: seven native HTTP consumer cases (`ts`, `tsx`, `mts`, `cts`, `js`, `mjs`, `cjs`); two fail the base classifier. - Base reproduction or other evidence: actual TypeScript7 CLI emitted four maps; actual public browser analysis mislabeled both NodeNext inputs before the change and correctly labels all four controls afterward. - User-visible CLI/MCP output: `.mts`/`.cts` original artifacts change from `text/javascript` to `text/typescript`. - Remaining proof gaps: one full browser verifier invocation failed in unchanged popup cleanup with its existing1000ms timeout. A subsequent main-baseline full verifier passed; this is not claimed as a baseline failure. The exact candidate's isolated existing popup verifier then passed without timeout or source changes. No full candidate verifier green claim or cross-browser claim. - [x] Observed, derived, and inferred claims remain distinguishable. - [x] Artifact identity, source provenance, and failed attempts remain preserved. - [x] Unsupported, incomplete, unavailable, or uncertain outcomes remain visible. ## Validation performed - Focused source-map and response-cleanup tests:41passed; base test run reproduced two new failures. - `npm run check`:5tasks passed,129 existing warnings and zero errors. - `npm run check:fast`:2tasks passed. - `npm run docs:check` and `npm run build`:passed. - Actual TypeScript7 compiler + owned HTTP + public Chrome154 analysis:four before/after controls passed after the correction. - `npm run verify:browser`:candidate run failed at unchanged popup cleanup; main baseline passed. Exact candidate `verifyPopupEventCoverage` passed all network, nested popup, gap, shared-context, CLI and stdio MCP controls afterward. Both original receipts retained. ## Compatibility, safety, and release - Breaking changes or migration steps: none. - Real Hopper/Ghidra, browser, or OS coverage: actual Chrome154 on macOS; no Hopper/Ghidra or other browser claim. - Package or release metadata impact: none. - Security, privacy, process, or containment review: no authorization or containment changes; owned local fixtures and no paid requests. ## Review checklist - [x] The PR has one focused outcome and the title follows `type(scope): outcome`. - [x] Related issue is linked, or the reason for not linking one is stated above. - [x] Tests cover changed observable behavior and meaningful failure paths. - [x] Owning docs, contracts, and generated metadata are updated where needed. - [x] User-visible CLI/MCP changes include representative output. - [x] I checked the final diff for secrets, unrelated cleanup, and unsupported claims. AI-assisted implementation and verification; I reviewed the patch and ran the reported checks. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-16 21:16:23 +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#2258
No description provided.