Skip to content

fix(windows): unblock lifecycle builds and native-hook setup - #3405

Draft
bohe76 wants to merge 2 commits into
Yeachan-Heo:devfrom
bohe76:agent/windows-install-setup
Draft

fix(windows): unblock lifecycle builds and native-hook setup#3405
bohe76 wants to merge 2 commits into
Yeachan-Heo:devfrom
bohe76:agent/windows-install-setup

Conversation

@bohe76

@bohe76 bohe76 commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

Summary

Windows source installs and updates were blocked in sequence by three POSIX assumptions: direct npm.cmd spawning returned EINVAL, directory-handle fsync returned EPERM, and fresh native-hook files requested as 0600 were reported by NTFS as 0666 and rejected as concurrent mutations.

Changes

  • Resolve the lifecycle-provided npm CLI to an absolute path and launch it through the current Node executable, with a Windows runtime-relative npm CLI fallback.
  • Tolerate only structured code === "EPERM" from directory fsync on Windows; every other platform/error pair remains fatal.
  • Compare native-hook modes on Windows by the writable/read-only distinction that Node and NTFS can represent, while keeping exact POSIX mode checks on other hosts.
  • Add focused regression coverage for lifecycle npm invocation and Windows directory durability boundaries.

Validation

  • npm ci
  • npm run build
  • npm run lint
  • npm run check:no-unused
  • npx tsc --noEmit
  • npm run prepack
  • Focused tests: prepare-build 1/1, file-durability 13/13, native-hook claim journal 8/8, fresh Windows native-hook setup 1/1
  • Real Windows omx setup --scope user --legacy
  • omx doctor: 16 passed, 3 non-blocking warnings, 0 failed
  • npm test — the unmodified upstream/dev baseline reproduces the same Windows failures in package-bin-contract.test.js, setup-install-mode.test.js, and update.test.js; ask.test.js also uses POSIX advisor stubs and is not a safe Windows full-suite gate. The changed-file and real setup paths above pass.

Checklist

  • PR is focused and avoids unrelated changes
  • Docs updated when needed — not needed; this is an internal portability repair with no operator contract change
  • Backward-compatibility impact considered — POSIX behavior and non-EPERM failures remain unchanged

Review

Independent OMX review completed:

  • code-reviewer: APPROVE, 0 Critical/High/Medium/Low findings
  • architect: WATCH, no merge blocker; only broader directory-only durability observability and optional fallback-branch coverage remain outside this focused repair
  • code-simplifier: no-change; current diff is already the smallest clear boundary

bohe76 added 2 commits August 2, 2026 00:50
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
@github-actions github-actions Bot added the size/M label Aug 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant