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. |
|
Own service-worker CDP registrations and retry failed teardown. Admit redaction and network metadata against remaining capture capacity, retain explicit omission reasons, and preserve source URL, redirect ancestry, caller-selected content, and historical capture values. Forward CLI cancellation through provider cleanup. Reviewed fixes: #2263, #2637, #2767, #2845, #2859, #2863, #2872, #2874, #2876, #2879, #2955, #2957, #2961, #3033. Validation: 25 current event/network source tests passed; earlier focused browser lanes passed 201 source tests and 176 boundary tests with two skips, plus 35 Python tests. Real browser/Windows lanes were not rerun. Playwright allocation before admission remains unbounded by these retention limits.
# Conflicts: # src/browser/WebSourceMapFetcher.ts
|
CI-fix track: the failing shards were |
|
Thanks for merging main and preserving the broader regression coverage. I've retained your merge and brought the branch up to main I updated the PR title and description to describe the remaining test contribution. The ordinary and indexed HTTP map cases check filename-dependent completeness and dependency edges, All 156 tests passed across the parser-mode, fetcher, optional-require, source-mode, and reconstruction suites, and the complete |
Summary
Add production-boundary regression coverage for filename-dependent parser modes in browser source maps. The source-map implementation from #2954 is already on main in f6905719c. The remaining change is one test file,
tests/boundary/browser/webSourceMapParserModes.test.ts, which exercises that implementation through actual HTTP source-map fetching.The tests cover ordinary and indexed maps, TypeScript and CommonJS originals,
webpack://source identities, and query/fragment suffixes that resemble other filename extensions. They verify both parser completeness and retained dependency edges while checking that the complete original source URL remains present in the returned evidence.Related issue: #2954, already resolved by the implementation on main.
Problem and expected behavior
An original filename is part of the parser's input semantics. For example,
main.tscan containconst value = <number>1, while a CommonJSmain.cjscan contain a top-levelreturn. Parsing either without the appropriate filename mode can mark a valid original as incomplete and discard its dependency edges. Conversely, enabling permissive syntax for every source would make genuinely invalid module input appear complete.Source-map source identities also contain information that is unrelated to the parser mode.
main.cts?revision=2#view.tsxstill names a.ctspathname; the fragment must not enable JSX. Likewise,main.mjs?view=main.cjsmust remain an ES module and reject a top-level return. The URL pathname selects the mode, while the full URL remains the source identity published in the map, original-source record, and dependency edges.The existing implementation supplies that pathname to the shared filename-aware parser. This PR checks the complete producer/consumer boundary around it rather than adding a second interpretation of filenames.
Change and scope
One parameterized test runs the same seven original-source cases against ordinary maps and indexed maps with a section offset. A real loopback HTTP server serves source-map JSON, and
fetchWebSourceMapsreceives schema-validated input with the explicit allowed origin.The valid cases include
.ts,.cts,.cjs,webpack:///src/main.ts, and.tsx. Each must retain its source text, reportincludedwithout a limitation, and publish the expected static-import or require edge for./dep.js. The test checks the edge's completefrom_sourceidentity and resolved dependency URL as well as the original-source and mapping identities.Two deliberately invalid cases check the complementary rule: an angle-bracket assertion in
.mtsand a top-level return in.mjsremainpartial, with an explicit parsing limitation. A query string that names a more permissive extension must not change those results.The server is closed in
finally, including active connections, so the fixture owns its network resources throughout the test. Both map formats run through the same production fetcher and parser path. The PR adds no source production changes, parsing options, request fields, dependencies, or browser operations.Contract and boundary impact
Verification reads fixture data, serves it over a local HTTP connection, and runs the production fetcher/parser. It does not launch Chromium, inject page code, alter a caller's browser state, or contact an external application.
Evidence and regression coverage
The new file contains two parameterized test executions, each checking seven source variants. It complements the existing fetcher regression with indexed-map, webpack URL, TSX, strict module, and suffix-handling coverage. Assertions inspect returned production facts rather than stubbing the parser's answer.
The historical defect and its reproduction remain documented in #2954. The current test-only diff is validated against the implementation already present on main; it does not claim to introduce that implementation again. Running the fetcher without the original-path parser input would violate the completeness and dependency-edge assertions for valid TypeScript/CommonJS cases.
Validation performed
The branch normally merges main
f75b1a416ba67b8421e7dbd248160afedb79581fand retains the maintainer's previous merge. Verification used Node.js 24.18.0 and npm 11.16.0 on Windows x64.npm run test:focused -- tests/boundary/browser/webSourceMapParserModes.test.ts tests/boundary/browser/webSourceMapFetcher.test.ts tests/boundary/browser/optionalSourceMapRequire.test.ts tests/boundary/process/javascriptSourceModes.test.ts src/domain/reconstructionVerification.functionSources.test.ts— all 156 tests passed across five files, including the reconstruction suite discussed in review.npm run check— passed typechecking, lint and resolved module boundaries, formatting, unused-code checks, package metadata checks, and architecture guards.npx --no-install lint-staged --diff origin/main...HEAD— formatting and lint passed for the single changed file without further edits.git diff --check origin/main...HEAD— passed; the working tree is clean and the maintainer's prior head remains an ancestor.The regression uses actual HTTP fetching and the production parser on Windows x64. It does not establish an installed Chrome workflow or new direct CLI/MCP source-map coverage. No performance change is claimed for this test-only contribution.
The current-head GitHub
CI requiredcheck has passed, including the source tests, build, static checks, and portable test suite.Compatibility, safety, and release
There is no runtime behavior change or migration in the remaining diff. The tests protect the current behavior of the implementation on main. No dependency, installation, release metadata, or target authority changes are included.
Author readiness
Human owner: @dakjdakd
Before merge