Repository navigation
Conversation
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
13 of 19 tasks
Contributor
|
12 tasks done
Owner
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #2821.
Retain original source declarations and available embedded text when
sourcesContenthas a different length fromsources, in local application reconstruction and browser source-map collection.Problem and expected behavior
With
sources: ["a.ts", "b.ts"]andsourcesContent: ["export const answer = 42;"], local CLI/MCP analysis discarded both originals; browser collection rejected the entire map. Padding the content array withnullmade the same declarations work.ECMA-426 DecodeSourceMapSources reads content by source ordinal only when an entry exists. Missing content is unavailable, and excess entries do not introduce sources. This corrects the cardinality assumption retained by #2034; malformed field/element types remain invalid.
Change and scope
Remove source-count equality from the local content admission helper and its obsolete parameter/error wording. Remove the redundant browser-profile content check: the existing leaf schema already validates every supplied content entry, and raw content records are still budgeted before schema parsing. Both existing collectors continue iterating source declarations, preserving section-local and flattened ordinals without padding, compacting, or mutating raw map evidence.
Contract and boundary impact
finally.Expected workflow effects:
Evidence and regression coverage
Added compiled CLI and stdio MCP regressions for indexed leaves with short/empty/excess content arrays, explicit null and empty text, source ordinals and exact map/content digests.
Added real loopback HTTP collection coverage asserting retained raw map evidence, content availability and generated/source mapping ordinals across sections.
Kept scalar/non-string rejection and changed the obsolete empty-array rejection cases to malformed excess-element cases. Existing omitted/null content and resource-budget regressions pass.
Base reproduction: at
9680da76c84a6833635dc7a5df607806d899f804, all 3 new regression cases failed while the other 79 cases in the two files passed. CLI/MCP returned 0 instead of 5 originals; HTTP returnedinvalidinstead ofincluded.Public CLI reproduction from [Bug] Short sourcesContent arrays discard valid source-map originals #2821: short and padded arrays now both produce
coverage: "complete", originals: 2(short previously producedpartial, 0).Remaining proof gaps: no live CDP browser session was run; the production source-map HTTP fetch/parse boundary and public local CLI/MCP were exercised. No native engine is involved.
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
npm ci --prefer-offlineandnpm run build:cached— passed with Node 24.18.0 / npm 11.16.0 on WSL Ubuntu x86_64.npm run test:focused -- src/domain/sourceMapContents.test.ts src/javascript/sourceMaps/TraceSourceMap.test.ts src/application/javascript/JavaScriptArtifactAnalysis.sourceMaps.test.ts tests/acceptance/applications/sourceMapPrefixCli.test.ts tests/boundary/browser/webSourceMapFetcher.test.ts tests/boundary/filesystem/javascriptArtifactReconstruction.test.ts— 121 passed across 6 files.npm run test:focused -- tests/boundary/browser/webSourceMapFetcher.test.ts— final test-scope cleanup verified, 74 passed.npm run typecheck,npm run knip,npm run verify:module-boundaries,npm run verify:architecture-guards,npm run verify:test-discovery— passed; all 1078 test files discovered exactly once.npx oxfmt --checkandnpx oxlintover all 7 changed files — passed (no lint errors);git diff --checkpassed.npm run check— blocked by unrelated baseline formatting intests/fixtures/javaClassFile.tsand existingmax-lines-per-functionerrors intests/boundary/providers/ghidra/ghidraLauncher.test.ts:431,src/ghidra/GhidraFunctionValues.test.ts:46, andsrc/domain/webBundleAnalyzer.test.ts:224. Those files are unchanged here; the individual checks above completed separately because Turbo cancels peer tasks after failure.Compatibility, safety, and release
Before merge
type(scope): outcome.The same formatting failure and three lint errors were independently reproduced on a clean checkout of base
9680da7. The normal pre-push hook failed on those same lint errors; after the checks above, this branch was pushed with that local hook disabled for the push only.Integration note
Related independent fix: #2831. Both PRs target
mainand fix separate issues. Their deletions touch adjacent validation blocks inSourceMapFormat.ts; a local three-way merge reports a textual conflict between them. Once either merges, the other needs a small rebase retaining both removals. There is no semantic dependency, and the regression additions merge cleanly.