Files
Garry TanandClaude Fable 5 9c7e020d20 fix(sync): separator-agnostic path containment — unblock sync on Windows (#3057)
isPathSafe's inline `startsWith(rootReal + '/')` was always false on
Windows (realpathSync returns backslash separators), so every in-repo
file was recorded SYMLINK_NOT_ALLOWED and the sync bookmark froze.
Same separator class as #2828/#2836.

Root cause is the shared idiom: isPathContained in path-confine.ts
carried the same hardcoded '/'. Fixed there via a pure, path-module-
injectable isResolvedContained (relative-path idiom, matching
isWriteTargetContained); isPathSafe and the NAV-1/NAV-2 scope-entry
guard in sync.ts now delegate to it. win32 semantics are pinned on
POSIX CI by injecting path.win32 in the regression test.

Fixes #3057

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-23 11:03:35 -07:00
..