Repository navigation
fix(cli): init creates its files where hard links are refused, with no Developer Mode needed - #6463
Merged
Merged
Conversation
…o Developer Mode needed
miguel-heygen
force-pushed
the
fix/cli-win-create-file
branch
from
October 26, 2026 18:14
b6231d7 to
ea99169
Compare
Contributor
Edit accuracy: accurate 271 (base branch 271), smooth 113 of thoseThe gate passes. Quarantined, measured but not gated (0) Unstable (3)
|
Contributor
There was a problem hiding this comment.
Verdict: APPROVE · 0 blocker · 0 important · 0 nits
Scope
Read both files and core's createFileAtomically. It keeps the old guarantees: link and the fallback's open("wx") both refuse an existing entry and don't follow a dangling link, and EEXIST is still swallowed. Temp siblings match isAtomicTempPath, so the studio watcher skips them. Checked all four writeNewFileSync callers. With main's writeNewFile.ts the new EPERM test fails; at this head it passes locally, along with projectConfig.test.ts. All Actions runs on this head are green.
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.
What
writeNewFileSync(the helperinituses to createhyperframes.jsonand its other new files) now publishes through core'screateFileAtomically, which already falls back to an exclusive create when hard links are refused.Why
initfailed on Windows with EPERM on link creation.writeNewFileSyncpublished each file withlinkSyncand only tolerated EEXIST, so a volume or sandbox that refuses hard links (FAT/exFAT, restricted workspaces) stopped the scaffold. The fallback already existed in core; this was a second, weaker copy of it. No Developer Mode or admin needed.Why under 100 lines
Windows launch fix, asked for directly; it deletes a copy of existing logic.
Tests
New case: a
linkSyncthat throws EPERM still createshyperframes.jsonwith the right bytes and leaves no staging files. It fails on main (Error: operation not permitted) and passes here; the 90 tests inprojectConfig.create,projectConfigandinitpass.Not run on a real Windows machine: none was reachable.