WIP: fix: make static export paths portable on Windows #195

Draft
KofTwentyTwo wants to merge 2 commits from fix/windows-export-1309 into release/collab-rc37
pull from: fix/windows-export-1309
KofTwentyTwo commented 2026-10-22 21:40:22 +00:00 (Migrated from github.com)

The Windows export command failed before Next started because it used POSIX environment assignment. After invoking Next natively, public route prefetch fragments were still written under nested backslash-derived paths instead of the flat filenames requested by browsers.

Use a portable Node launcher and a pinned two-line patch to Next16.3.8's CommonJS/ESM exporters. Normalize native separators before segment filename encoding. Every export now verifies all public prerendered segment paths and exact source bytes. The lockfile only adds the patch hash and corresponding peer references; dependency versions are unchanged.

Windows verification: original launcher reproduced failing; clean export reproduced25 missing public-route fragments. Patched export and the complete pnpm build:export command pass78 segment checks. Syntax, diff and license checks pass. Linux export parity and real browser diagnostics remain pending on this PR's own CI.

Related: QRun-IO/qqq#1309. Stacked on release/collab-rc37 to keep the already-verified RC37 branch unchanged. Keep draft pending Linux/browser qualification; no merge or release. Details: docs/WINDOWS-STATIC-EXPORT.md.

The Windows export command failed before Next started because it used POSIX environment assignment. After invoking Next natively, public route prefetch fragments were still written under nested backslash-derived paths instead of the flat filenames requested by browsers. Use a portable Node launcher and a pinned two-line patch to Next16.3.8's CommonJS/ESM exporters. Normalize native separators before segment filename encoding. Every export now verifies all public prerendered segment paths and exact source bytes. The lockfile only adds the patch hash and corresponding peer references; dependency versions are unchanged. Windows verification: original launcher reproduced failing; clean export reproduced25 missing public-route fragments. Patched export and the complete pnpm build:export command pass78 segment checks. Syntax, diff and license checks pass. Linux export parity and real browser diagnostics remain pending on this PR's own CI. Related: QRun-IO/qqq#1309. Stacked on release/collab-rc37 to keep the already-verified RC37 branch unchanged. Keep draft pending Linux/browser qualification; no merge or release. Details: docs/WINDOWS-STATIC-EXPORT.md.
KofTwentyTwo commented 2026-10-22 21:45:21 +00:00 (Migrated from github.com)

Linux acceptance build120105016937 passed the new export integrity check: all78 public segment paths and bytes verified. Full workflow39859146757 remains live; no rerun/cancellation/push yet.

Both dashboard image jobs failed during dependency installation because the new pinned patch was not copied before pnpm install. Local signed follow-up ecbe9fcc adds COPY patches ./patches before the frozen install. The corrected Linux Docker frontend stage builds successfully locally, including production compilation. This commit is intentionally not pushed until the running workflow finishes so its browser results are retained. Both architecture jobs must then revalidate the new head.

Linux acceptance build120105016937 passed the new export integrity check: all78 public segment paths and bytes verified. Full workflow39859146757 remains live; no rerun/cancellation/push yet. Both dashboard image jobs failed during dependency installation because the new pinned patch was not copied before pnpm install. Local signed follow-up ecbe9fcc adds COPY patches ./patches before the frozen install. The corrected Linux Docker frontend stage builds successfully locally, including production compilation. This commit is intentionally not pushed until the running workflow finishes so its browser results are retained. Both architecture jobs must then revalidate the new head.
You are not authorized to merge this pull request.
This pull request can be merged automatically.
This pull request is marked as a work in progress.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin fix/windows-export-1309:fix/windows-export-1309
git checkout fix/windows-export-1309
Sign in to join this conversation.