Skip to content

fix(util): canonicalize Windows paths with native realpath - #56734

Draft
changazo wants to merge 1 commit into
anomalyco:devfrom
changazo:canonicalize-windows
Draft

changazo wants to merge 1 commit into
anomalyco:devfrom
changazo:canonicalize-windows

Conversation

@changazo

@changazo changazo commented Oct 18, 2026 •

Copy link
Copy Markdown

Issue for this PR

Closes #53508

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

FSUtil.resolve now calls native realpath directly on Windows. Readable workspace
paths no longer fail because the JS implementation walks an ungranted ancestor.
Actual Windows permission denials propagate; missing paths and POSIX optional-path
handling retain their behavior. Alias/cycle/containment tests and a minimal
AppContainer repro are included.

How did you verify your code works?

Core filesystem tests: 8 pass, 1 host-inapplicable denial skip. Util suite: 95 pass.
Both affected package typechecks pass. Compiled actual-helper AppContainer controls
resolve both path forms and aliases, preserve missing fallback and reject the
denied root. A separate unmodified-helper control still reproduces the failure
with released Bun 1.4.3; it sends no model prompt. The root check is blocked by this Windows checkout's unmaterialized
packages/app/src/custom-elements.d.ts symlink (Windows error 1314).

The complete Beam ACP journey additionally passes on a separate 1.19.3 backport
with the Effect callback correction in Effect-TS/effect#9489.
Full ACP still needs that dependency correction; this is not a current-dev
end-to-end claim.

Screenshots / recordings

No UI change.

Checklist

  • Tested locally within the scopes above.
  • No unrelated changes included.

@github-actions

Copy link
Copy Markdown
Contributor

The following comment was made by an LLM, it may be inaccurate:

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Windows: startup fails with EPERM lstat 'C:\' when the drive root is unreadable (AppContainer)

1 participant