You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(build): follow-ups from the xterm build-cache review (#2138) #2148
Follow-up to #2138 (LOW notes from the merge pass's review; none blocked).
A killed build (SIGKILL, OOM, Ctrl-C) leaves its <key>.tmp-* staging directory behind until node_modules is reinstalled (scripts/build-xterm.ts ~40/52); reproduced with kill -9. Remove old staging siblings when starting a fresh emit.
The published key directory keeps mkdtempSync's 0700 mode; a checkout built by one user and read by another would get EACCES. chmodSync(staging, 0o755) before the rename.
Hash/compile race can publish stale output under a key (Codex MEDIUM, ~34): if the source changes between hashing and TypeScript reading it, the changed output is published under the original key, and restoring the original source reuses it; reproduced with a deterministic compiler-read hook (main rebuilds every time). Compile the bytes that were hashed, or re-hash and discard before publishing.
Package resolution metadata is not in the key (Codex MEDIUM, ~32): changing only xterm's package.jsontypes field selects different declarations without invalidating the cache; reproduced. Hash the manifest's resolution fields.
Activity
fix(build): compile the xterm source that was hashed, and wait for wh…