Repository navigation
fix(canvas): preserve Windows pnpm shim arguments - #133395
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs real behavior proof before merge. Reviewed August 31, 2026, 3:58 AM ET / 07:58 UTC. ClawSweeper reviewWhat this changesThis PR makes Canvas’s pnpm build runner preserve literal arguments through Windows Regression provenancePossible regression — probable (reproduction; reviewed change). No predecessor PR is attributed. Merge readiness⛔ Blocked until stronger real behavior proof is added - 3 items remain Keep open: the Canvas-owned repair is a focused match for the known Windows quoting failure and is not on current main, but the supplied native after-trace predates the reviewed head. A final-head native Windows result is still required before merge. Priority: P2 Review scores
Verification
How this fits togetherCanvas’s A2UI bundle script resolves pnpm and launches it to build web assets. Windows pnpm shims insert flowchart LR
A[Canvas A2UI bundle] --> B[pnpm runner]
B --> C{Windows cmd shim}
C -->|Yes| D[Quoted command line]
C -->|No| E[Direct executable]
D --> F[pnpm shim]
E --> G[Build process]
F --> G
Before merge
Agent review detailsSecurityNone. PR surfaceSource 0, Tests +43, Config 0, Other 0. Total +43 across 5 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Retain the Canvas-local serializer and merge only after a redacted native Windows run at the reviewed head shows the exact argv regression passing and the attached Windows CI completes. Do we have a high-confidence way to reproduce the issue? Yes: the supplied native Windows baseline records corrupted child argv, and the current source exposes the same Canvas resolver-to-cmd invocation path. The after-result is not yet tied to the reviewed head. Is this the best way to solve the issue? Yes: this is the appropriate owner-local repair because Canvas has its own build runner and cannot import the core-private serializer; the implementation matches the current shared Windows quoting pattern. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against e7bacb6e552a. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (3 earlier review cycles)
|
|
Exact-head Windows behavior proof for The regression creates and launches an actual @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
Route the Canvas pnpm runner and its real child-process regression through the existing Windows test inventory. Temporarily retain the upstream serializer to capture the regression failure before restoring the reviewed repair. This proof baseline is not a landing candidate. Co-authored-by: ben.li <[email protected]>
Preserve the contributor branch and current upstream Windows test entries while adding the Canvas argument round-trip regression exactly once. Keep the original serializer temporarily for native Windows failure proof before publishing the reviewed repair. Co-authored-by: ben.li <[email protected]>
Use the existing cmd.exe and CRT quoting contract, preserving empty arguments, carets, trailing backslashes and embedded quotes. Keep the unsafe-character guard and direct executable path while removing conditional quoting. The original serializer reproduced exact argv corruption on the native Windows regression. Co-authored-by: ben.li <[email protected]>
|
@clawsweeper re-review The original serializer failed the real Windows argv regression at baseline30afa0; ordinary native executable controls passed. Published the reviewed repair on the same contributor ancestry. The regression is now in the existing Windows inventory and must pass at the final head before landing; no workflow or runner policy was added. |
|
🦞🧹 I asked ClawSweeper to review this item again. |
Route the Canvas pnpm runner and its real child-process regression through the existing Windows test inventory. Temporarily retain the upstream serializer to capture the regression failure before restoring the reviewed repair. This proof baseline is not a landing candidate. Co-authored-by: ben.li <[email protected]>
Use the existing cmd.exe and CRT quoting contract, preserving empty arguments, carets, trailing backslashes and embedded quotes. Keep the unsafe-character guard and direct executable path while removing conditional quoting. The original serializer reproduced exact argv corruption on the native Windows regression. Co-authored-by: ben.li <[email protected]>
8d2667a to
4cd37ac
Compare
Preserve the verified serializer and native argv regression while retaining upstream Windows test inventory additions. Co-authored-by: ben.li <[email protected]>
Merge the contributor update without replacing either history. Keep the reviewed Windows serializer, native regression, and complete test inventory. Co-authored-by: ben.li <[email protected]>
|
Merged via squash.
|
* fix(canvas): preserve Windows pnpm shim arguments * test(canvas): exercise cmd arguments on native Windows CI Route the Canvas pnpm runner and its real child-process regression through the existing Windows test inventory. Temporarily retain the upstream serializer to capture the regression failure before restoring the reviewed repair. This proof baseline is not a landing candidate. Co-authored-by: ben.li <[email protected]> * fix(canvas): preserve literal arguments through Windows pnpm shims Use the existing cmd.exe and CRT quoting contract, preserving empty arguments, carets, trailing backslashes and embedded quotes. Keep the unsafe-character guard and direct executable path while removing conditional quoting. The original serializer reproduced exact argv corruption on the native Windows regression. Co-authored-by: ben.li <[email protected]> * fix(canvas): preserve Windows pnpm shim arguments * test(canvas): exercise cmd arguments on native Windows CI Route the Canvas pnpm runner and its real child-process regression through the existing Windows test inventory. Temporarily retain the upstream serializer to capture the regression failure before restoring the reviewed repair. This proof baseline is not a landing candidate. Co-authored-by: ben.li <[email protected]> * fix(canvas): preserve literal arguments through Windows pnpm shims Use the existing cmd.exe and CRT quoting contract, preserving empty arguments, carets, trailing backslashes and embedded quotes. Keep the unsafe-character guard and direct executable path while removing conditional quoting. The original serializer reproduced exact argv corruption on the native Windows regression. Co-authored-by: ben.li <[email protected]> * fix(ci): route Canvas regression to Windows --------- Co-authored-by: Peter Steinberger <[email protected]> Co-authored-by: ben.li <[email protected]>
What Problem This Solves
Canvas builds launched through Windows pnpm
.cmdshims could receive corrupted arguments: empty arguments disappeared, carets doubled, and quoting changed argument boundaries. The Canvas resolver supplies this command line to the A2UI bundler's real child process.Why This Change Was Made
Apply the existing cmd.exe/CRT quoting contract at the Canvas runner: quote each token, preserve caret characters inside quotes, and handle backslash runs before embedded quotes and closing quotes. Keep unsafe-character rejection and the direct executable path. Remove the old conditional quoting helper. The implementation remains within the Canvas plugin boundary and is net-neutral in production (+14/-14).
The real Windows regression launches a spaced-path pnpm.cmd shim and checks the captured child argv for all four values in one invocation:
The existing Windows CI inventory and selector now cover this owner and regression; upstream entries are preserved. Tests are +43 lines; CI tooling is +2/-2. Thanks @ly85206559.
Evidence
Native baseline job 99406726086 on
30afa0c65bc229102ca7e5607d7e93e32c8fcdc3reproduced the exact argv corruption: the child exited 0, but its captured arguments were wrong. Three existing controls passed, and five POSIX-only cases skipped.Final Windows job 99424485674 on
e08ab3578f742d84b7f3044e4ee58f1974a07957passed the unchanged real argv regression in 38 ms. All three controls also passed: native pnpm, native pnpm-native, and native PATH/spaced wrappers with unsafe-character rejection. The file finished with four passing cases, five platform skips, and no failures. Both runs used Windows 2025 and Node 22.23.2.The final job executed GitHub merge
9f70e484544d41ba3cefeecc80bbb95b26c41adc, whose parents are main65bb866a548a9499b893db3fb15818c358593490and the published head. All five executed candidate files hash-match the complete reviewed candidate. The published tree also equals contributor refresh4cd37ac23d41fc9c0ba02b85e3385bbb285fed57, covered by the latest ClawSweeper review; both contributor and maintainer histories are preserved.Full exact-head CI 33371704201 succeeded. The final rollup had 237 successful checks, 41 skips, one neutral result, and no failures or pending checks. Complete independent Codex P0 review, targeted formatting, private staged scan, and source binding passed. Contributor source executed only in secretless hosted CI. This final native result supplies the proof requested by ClawSweeper.
Follow-up
The separate repository-script serializer in
scripts/windows-cmd-helpers.mjsretains its older quoting path and remains a named follow-up. This PR repairs and proves the Canvas-owned build runner.