fix(windows): unblock lifecycle builds and native-hook setup - #3405
Draft
bohe76 wants to merge 2 commits into
Draft
fix(windows): unblock lifecycle builds and native-hook setup#3405bohe76 wants to merge 2 commits into
bohe76 wants to merge 2 commits into
Conversation
Windows Node 22 rejects direct spawnSync of npm.cmd with EINVAL, blocking npm ci and the OMX dev updater. Resolve the lifecycle-provided npm CLI and execute it with the current Node binary, with a runtime-relative Windows fallback. Add a subprocess regression test that proves prepare-build forwards npm run build through the resolved CLI. Document-refresh: not-needed | internal package lifecycle portability fix with no operator contract change
Treat only structured Windows EPERM from directory fsync as an unsupported filesystem capability while preserving all other errors as fatal. Normalize native-hook mode comparisons to Windows' writable/read-only semantics so fresh setup does not reject its own 0600 files when NTFS reports 0666. Validation: npm run build; npm run lint; npm run check:no-unused; npx tsc --noEmit; targeted prepare/durability/claim-journal/setup tests; global omx setup --scope user --legacy; omx doctor. Document-refresh: not-needed | internal Windows portability repair with no operator contract change
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Windows source installs and updates were blocked in sequence by three POSIX assumptions: direct
npm.cmdspawning returnedEINVAL, directory-handlefsyncreturnedEPERM, and fresh native-hook files requested as0600were reported by NTFS as0666and rejected as concurrent mutations.Changes
code === "EPERM"from directoryfsyncon Windows; every other platform/error pair remains fatal.Validation
npm cinpm run buildnpm run lintnpm run check:no-unusednpx tsc --noEmitnpm run prepackomx setup --scope user --legacyomx doctor: 16 passed, 3 non-blocking warnings, 0 failednpm test— the unmodifiedupstream/devbaseline reproduces the same Windows failures inpackage-bin-contract.test.js,setup-install-mode.test.js, andupdate.test.js;ask.test.jsalso uses POSIX advisor stubs and is not a safe Windows full-suite gate. The changed-file and real setup paths above pass.Checklist
Review
Independent OMX review completed: