Repository navigation
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
TL;DR: The fix works. Source maps that start with the This PR closed right after my test finished. #1939 now carries the fix. I'm posting these results here for the record. A rerun on #1939 comes next. ResultsI tested the PR head 851cd98 against its merge base fb94d9d. I built both and ran 17 fixture folders through the CLI and through the stdio MCP server. The two agreed on every folder. The table groups 13 of the 17 folders. The first fold lists all 17.
On every recovered row at the head,
The PR's new test, copied into a build of fb94d9d, fails both cases (CLI and MCP) on Node 24.18.0. It passes on the PR head. Also seen
Not run
Thanks, xu91102, for the fix and for the clear reproduction in the issue. All 17 fixtures
Commands# build each tree (Node 24.18.0)
npm ci && npm run build && npm run test:prepare
# fixtures: scripts/gen-fixtures.mjs makes 17 folders, scripts/run-fixtures.mjs runs each folder
node scripts/rea.mjs analyze-javascript-application <folder> --format json
# MCP: tool analyze_javascript_application, input_path=<folder>, format=directory,
# over stdio against node scripts/rea.mjs mcp from the same tree
# tests
npm run test:focused -- tests/acceptance/applications/sourceMapPrefixCli.test.ts src/javascript/sourceMaps/TraceSourceMap.test.ts tests/boundary/browser/webSourceMapFetcher.test.ts tests/boundary/filesystem/javascriptSourceMapLocations.test.ts src/domain/sourceMapEnvelope.test.ts
node node_modules/vitest/vitest.mjs run <same five files> # Node 22 and 26, by absolute path
npm run test:fastTiming is from a shared box. Other test jobs were running. About 6 jobs wanted a CPU at once, out of 24 threads.
Test setup🤖 Generated with Claude Code (Sonnet 5.5, verified by Opus 5.5) 🦊 |
Summary
Retained source maps with the standard
)]}'response prefix lost their original-source evidence during directory analysis. Apply the existing source-map parsing normalization to retained artifacts, while preserving their original bytes and identity. Fixes #1882.Problem and expected behavior
A
bundle.js.mapcontaining)]}'followed by a valid version-3 map produced partial graph coverage and nooriginal.tssource node. Removing only the prefix produced complete coverage. The same retained map now recovers its original source and embedded content without changing the retained map's digest or provenance.Change and scope
Move the existing
sourceMapJsonTextimplementation, unchanged, to the shared domain source-map envelope module. Application analysis, browser collection, and point tracing use that single parsing view. The application parser now applies it before JSON parsing; package manifests and other JSON inputs keep their existing behavior.Contract and boundary impact
Evidence and regression coverage
New compiled CLI and stdio MCP acceptance coverage uses a retained BOM-prefixed map with response framing and CRLF. It asserts original-source recovery, complete coverage, both digests, provenance, and unchanged retained bytes.
On base
fb94d9dde0ccda83ae520ac6fb22b1d283562cf3, both new surface tests failed because the original-source node was absent. Both pass after the fix.A separate actual CLI control reproduced the loss twice and recovered the original after removing only the prefix.
Existing point-tracing, browser HTTP source-map collection, filesystem source-map locations, and source-map envelope tests pass, including existing malformed-input paths.
Review: independent read-only review of the frozen complete patch passed both standards and issue-contract checks, with no actionable findings.
Remaining proof gaps: full deterministic coverage is left to upstream CI. No live browser or native-provider workflow was run; this report concerns retained local artifacts.
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
All local checks used Node 24.18.0 / npm 11.16.0 on macOS 27.0.1 arm64.
npm run test:focused -- tests/acceptance/applications/sourceMapPrefixCli.test.tsbefore the application fix — 2 expected regression failures.npm run test:focused -- tests/acceptance/applications/sourceMapPrefixCli.test.ts src/javascript/sourceMaps/TraceSourceMap.test.ts tests/boundary/browser/webSourceMapFetcher.test.ts tests/boundary/filesystem/javascriptSourceMapLocations.test.ts src/domain/sourceMapEnvelope.test.ts— 111 tests passed across 5 files, including freshly built CLI/MCP workflows.npm run check— passed typecheck, lint, formatting, knip, metadata, module boundaries, and architecture guards; 758 lint warnings, zero errors.npm run verify:test-discovery— all 843 test files discovered exactly once.git diff --check— passed.action_required); no CI jobs have executed. This is not counted as a passing check.Compatibility, safety, and release
Review checklist