Repository navigation
fix(wasm): retain glue query and fragment across line terminators - #6802
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. |
[Medium impact] The PR appears safe to merge; no blocking issues were found. SummaryRetains complete
Reviews (2) · Last reviewed commit: "Merge branch 'main' into fix/wasm-glue-u..." · Reviewed by Greptile |
|
Current-head CI is red for reasons outside this diff. On the exact base of this PR ( |
gensokyo-dev
left a comment
There was a problem hiding this comment.
Reviewed updated head 74a59dd8225f99438734d05350e63b91bb0c4c2c; its tree matches my tested integration onto main f2db494bfca6.
The fix belongs in the cooked-literal predicate: test the complete value with dotAll, then let existing association logic preserve the literal and classify local-path versus basename candidates. This removes the last-line representation that discarded valid qualifiers. Source coordinates, candidate uncertainty and existing CLI/MCP Evidence ownership remain intact. I found no further directly related refactor needed; no target execution or URL fetch capability is added.
Independent Linux verification with Node 24.22.1/npm 11.16.0:
- 69 WabtOutput/provider tests passed, including multiline hostile inputs and lifecycle failures; full
npm run checkpassed. - Official WABT 1.0.42 release archive was checked against its GitHub asset SHA-256. The updated real-tool verifier passed 61 cases, exercising CLI/MCP schema/output/cleanup behavior. Sampled process-family peak was 1,573 MiB (30 ms sampling, 2 GiB stop threshold); no stop occurred.
- The real
source-mappackage's unchanged 48,526-bytemappings.wasmwas inspected with its shipped loader plus three explicitly added query/fragment variants. This is a controlled glue derivative, not a claim that those qualifiers ship in source-map. Clean main returned only the original reference and still said complete; this head retained all four exact values/UTF-16 coordinates and their correct candidate classification. Binary/glue digests were preserved. Both runs used filtered compiled CLI output, MCP first-call summary, and two retained-Evidence glue-page reads; CLI and MCP facts agreed and the complete parent remained accessible. - Fresh-process/warm-filesystem application workflow: main/PR elapsed 6.56/6.29 s, CPU 11.71/11.57 s, sampled family peak 517/517 MiB. Warm retained glue access took 6.3/7.2 ms. Selected-delivery tokenx estimates were 8,734/9,895; extra retained references account for the changed answer. These are small observations, not a speedup claim. No OS-cold run or actual whole-model token measurement was made; token estimates exclude initialization, framing, prompts and preknown schemas.
Current CI run 40020767003 is still running; this approval records code review and the independent checks above, not a claim that pending CI passed.
|
CI run 40020767003 failed Source tests (job 120646487849) with 11 failures. I reran the four affected files on clean base Command: These failures are pre-existing on this PR’s current CI base. The independent PR-specific checks passed: 69 source/provider tests, full |
|
CI run 40020767003 is complete with failure. All 15 reported test failures reproduced on clean CI base
Static checks, package build, Windows native controls, Linux native package baseline, PR title/readiness and Greptile passed. Latest Codex review reports no actionable findings and there are no unresolved threads. Main advanced during CI to Applying the maintainer’s explicit authorization to bypass proven pre-existing/unrelated CI failures and merge reviewed head |
|
Post-merge verification on actual merged commit This checked the actual tree, which also contains the independently merged native-export paging capability. A fresh-process/warm-filesystem observation took 6.67 s, 12.18 CPU-s and sampled process-family peak 514 MiB (30 ms samples). No speedup or whole-model token measurement is claimed. The first probe correctly refused because the fresh worktree had no compiled runtime; after |
Summary
Fixes #6639. WASM glue inspection dropped
.wasmstring literals when a query or fragment contained LF, CR, CRLF, U+2028 or U+2029, while still reporting the source parse complete. The same literal values, UTF-16 coordinates and candidate associations now remain visible across those terminators. Bare paths with a trailing terminator remain rejected.Approach and scope
endsWithWasmReferencetests the complete cooked value with dotAll instead of slicing to the last physical line. Existing association logic continues to own local-path versus basename matching and preserves uncertainty. The change touches the predicate, its regressions and the existing real-WABT verifier; there are no schema, dependency, cache or provider-authority changes. Static glue parsing uses the existing WABT analysis workflow;runtime_executionandnetwork_fetchsemantics are unchanged. This is an ordinary correctness fix within existing boundaries; a separate maintainer scope decision is not applicable.Current validation
Updated head
74a59dd8, integrated onto mainf2db494b; Linux, Node 24.22.1/npm 11.16.0:npm run test:focused -- src/wasm/WabtOutput.test.ts src/wasm/WabtArtifactProvider.test.ts: 69 passed, including hostile long literals and lifecycle regressions.npm run check: passed.node scripts/verify-wasm-artifact.mjs --require-tools: 61 cases passed, covering real provider CLI/MCP schemas, output, warnings and cleanup.mappings.wasm(48,526 unchanged bytes) plus its shipped loader and three explicitly added query/fragment variants: clean main retained only the original reference; this head retained all four exact values/coordinates and expected candidate classifications. The added glue is a controlled derivative, not a claim about shipped source-map URLs. Filtered compiled CLI output agreed with MCP summary plus retained-Evidence glue pages. Original digests and access to the complete parent Evidence were preserved.CI run 40020767003 failed with 15 test failures, all reproduced on clean CI base
f2db494b; seven remaining shards were cancelled. Static/build/native-package checks, title/readiness and Greptile passed; latest Codex review reports no actionable findings. Main then advanced tod29ae43a: this unchanged PR was re-integrated there, and 42 producer/MCP tests, full check and the real application workflow passed again. Final baseline and latest-main evidence.Author readiness
Human owner: @gongfpp