[GH-ISSUE #4134] [Bug] Windows packed-bridge verifier extracts into its leased private root #1629

Closed
opened 2026-10-16 21:08:11 +00:00 by bsakaguchi · 1 comment
Owner

Originally created by @N0zoM1z0 on GitHub (Oct 15, 2026).
Original GitHub issue: https://github.com/morluto/rea/issues/4134

After getting past the independent Windows npm-launch and CRLF tar-listing defects (#4125 and #4128), the real ordinary-user scripts/verify-packaged-wasm-artifact.mjs lane fails when verifyPackedBridge asks external tar to extract into the verifier's leased PrivateRuntimeRoot.

The package verifier deliberately owns that root with a retained Windows delete handle. tar -xf <artifact> -C <private-root> exits 1 with tar: could not chdir to '<private-root>'. This is the same Windows ownership constraint that required WABT child scratch to move outside the private input root in #2950, but scripts/verify-packed-bridge.mjs remains a separate direct consumer of the leased root.

Reproduced from PR #4117 head ecd04eea840385caeb7b595c827845b6ff8c6c88 on Windows 11 x64 with Node 24.18.0 and npm 11.16.0. The lane ran as an ordinary user with two logical CPUs, BelowNormal priority, and a 2 GiB Job limit. It failed cleanly in 87.19 seconds with 366,747,648-byte peak Job commit and Job active-process count zero.

Expected behavior: packed bridge verification must preserve private-root ownership and cleanup while avoiding child writes under the leased directory. Since it only parses one packed Python file, stream that exact member from the tarball into the parser or allocate a separate child-writable root with an explicit owner and cleanup. Inspect other package-verifier child writes for the same brittle boundary. Do not weaken native share/delete semantics.

Local receipts and stderr are retained under /tmp/rea-windows-e2e-20261013/results/issue4109-fix/; no package or binary is published.

Originally created by @N0zoM1z0 on GitHub (Oct 15, 2026). Original GitHub issue: https://github.com/morluto/rea/issues/4134 After getting past the independent Windows npm-launch and CRLF tar-listing defects (#4125 and #4128), the real ordinary-user `scripts/verify-packaged-wasm-artifact.mjs` lane fails when `verifyPackedBridge` asks external `tar` to extract into the verifier's leased `PrivateRuntimeRoot`. The package verifier deliberately owns that root with a retained Windows delete handle. `tar -xf <artifact> -C <private-root>` exits 1 with `tar: could not chdir to '<private-root>'`. This is the same Windows ownership constraint that required WABT child scratch to move outside the private input root in #2950, but `scripts/verify-packed-bridge.mjs` remains a separate direct consumer of the leased root. Reproduced from PR #4117 head `ecd04eea840385caeb7b595c827845b6ff8c6c88` on Windows 11 x64 with Node 24.18.0 and npm 11.16.0. The lane ran as an ordinary user with two logical CPUs, BelowNormal priority, and a 2 GiB Job limit. It failed cleanly in 87.19 seconds with 366,747,648-byte peak Job commit and Job active-process count zero. Expected behavior: packed bridge verification must preserve private-root ownership and cleanup while avoiding child writes under the leased directory. Since it only parses one packed Python file, stream that exact member from the tarball into the parser or allocate a separate child-writable root with an explicit owner and cleanup. Inspect other package-verifier child writes for the same brittle boundary. Do not weaken native share/delete semantics. Local receipts and stderr are retained under `/tmp/rea-windows-e2e-20261013/results/issue4109-fix/`; no package or binary is published.
Author
Owner

@Abdooo2235 commented on GitHub (Oct 15, 2026):

@N0zoM1z0 @morluto I reproduced the retained Windows lease failure and prepared a fix that reads the exact Python member with tarfile instead of extracting the archive. All eight real tar/Python regression cases pass, including the native lease and owner cleanup, and npm run check passes. The branch is https://github.com/Abdooo2235/rea/tree/fix/packed-bridge-read-only (e30ce8bd85804f01b6cb37bb4b4bc42beb5692cd). GitHub rejected CreatePullRequest for my account twice, so no PR has been created yet. Separately, a local integration of this fix, #4154, and #4153 at 2909ca5 passed 24 focused tests and all 42 cases of the complete Windows packaged-WASM lane with official WABT 1.0.42; installation and cleanup completed. This combined result does not claim that either isolated branch fixes the other prerequisites.

<!-- gh-comment-id:6195277480 --> @Abdooo2235 commented on GitHub (Oct 15, 2026): @N0zoM1z0 @morluto I reproduced the retained Windows lease failure and prepared a fix that reads the exact Python member with tarfile instead of extracting the archive. All eight real tar/Python regression cases pass, including the native lease and owner cleanup, and npm run check passes. The branch is https://github.com/Abdooo2235/rea/tree/fix/packed-bridge-read-only (e30ce8bd85804f01b6cb37bb4b4bc42beb5692cd). GitHub rejected CreatePullRequest for my account twice, so no PR has been created yet. Separately, a local integration of this fix, #4154, and #4153 at 2909ca5 passed 24 focused tests and all 42 cases of the complete Windows packaged-WASM lane with official WABT 1.0.42; installation and cleanup completed. This combined result does not claim that either isolated branch fixes the other prerequisites.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
morluto/rea#1629
No description provided.