Skip to content

fix(browser): identify NodeNext TypeScript original source artifacts - #811

Merged
N0zoM1z0 merged 1 commit into
morluto:mainfrom
rudycelekli:fix/source-map-typescript-media-20261006
Oct 7, 2026
Merged

N0zoM1z0 merged 1 commit into
morluto:mainfrom
rudycelekli:fix/source-map-typescript-media-20261006

Conversation

@rudycelekli

Copy link
Copy Markdown

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.

@N0zoM1z0 N0zoM1z0 left a comment •

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed head83b2e595fd. The classifier extends the existing original-source TypeScript label to .mts/.cts, without changing source bytes, digests, map resolution, request authority or supported parsing. Real owned HTTP source-map tests cover all seven TS/JS module suffixes. Local production build and all39 source-map fetcher tests passed; all20 hosted checks are green, including the exact-head real-browser lane. The previously reported popup timeout has a green hosted browser verification on this head. No blocking findings.

@N0zoM1z0
N0zoM1z0 merged commit e84ad86 into morluto:main Oct 7, 2026
20 checks passed
@morluto

morluto commented Oct 7, 2026

Copy link
Copy Markdown
Owner

Thanks, @rudycelekli, for your work on “fix(browser): identify NodeNext TypeScript original source artifacts.” I appreciate your contribution to REA.

darsrc pushed a commit to darsrc/rea that referenced this pull request Oct 10, 2026
@morluto morluto added bug Something isn't working area: native Native analysis and decompilation, including Ghidra, IDA, and Hopper analysis behavior labels Oct 14, 2026
@morluto morluto added the area: evidence Evidence, artifacts, and reconstruction label Nov 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: evidence Evidence, artifacts, and reconstruction area: native Native analysis and decompilation, including Ghidra, IDA, and Hopper analysis behavior bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants