From c194ae1735d9921300f64816e3f0880d6be80013 Mon Sep 17 00:00:00 2001 From: ZeroPoint95 <329227198+ZeroPoint95@users.noreply.github.com> Date: Wed, 30 Sep 2026 19:46:23 -0400 Subject: [PATCH 1/2] session: the standing isolation test compares the canonical repository root TestStandingIsolationRecordsItsCopyBeforeWorkerInitialization compared the recorded Root, which repositoryRoot canonicalizes, against the raw t.TempDir(). On macOS those spell /private/var/folders and /var/folders for the same directory, so a correct record failed. The test now compares against canonicalPath(repo), as its siblings already do. Co-Authored-By: Claude Opus 5.5 --- internal/session/standing_isolation_test.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/internal/session/standing_isolation_test.go b/internal/session/standing_isolation_test.go index 8a30670d37..2ad1e2c80e 100644 --- a/internal/session/standing_isolation_test.go +++ b/internal/session/standing_isolation_test.go @@ -59,8 +59,12 @@ func TestStandingIsolationRecordsItsCopyBeforeWorkerInitialization(t *testing.T) if _, err := runner.Run(context.Background(), item, runDir, ""); !errors.Is(err, want) { t.Fatalf("initialization error changed: %v", err) } + // The record keeps the repository's canonical root ([repositoryRoot]), so + // the comparison resolves symlinks too: on macOS t.TempDir() answers under + // /var/folders while the same directory's canonical spelling is under + // /private/var/folders, and a raw comparison fails a correct record. trees := loadStandingTrees(runDir) - if len(trees) != 1 || trees[0].Root != repo || trees[0].Home == "" || trees[0].HomeSha == "" { + if len(trees) != 1 || trees[0].Root != canonicalPath(repo) || trees[0].Home == "" || trees[0].HomeSha == "" { t.Fatalf("lost recovery identity: %+v", trees) } if got := currentBranch(trees[0].Dir); got != trees[0].Branch { From 7d9bd846898baaa3745ca6436fe645ff425eb331 Mon Sep 17 00:00:00 2001 From: ZeroPoint95 <329227198+ZeroPoint95@users.noreply.github.com> Date: Wed, 30 Sep 2026 19:57:39 -0400 Subject: [PATCH 2/2] changes: entry for #1703 Co-Authored-By: Claude Opus 5.5 --- .../unreleased/1703-standing-isolation-macos-root.md | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 docs/changes/unreleased/1703-standing-isolation-macos-root.md diff --git a/docs/changes/unreleased/1703-standing-isolation-macos-root.md b/docs/changes/unreleased/1703-standing-isolation-macos-root.md new file mode 100644 index 0000000000..a237be0dcd --- /dev/null +++ b/docs/changes/unreleased/1703-standing-isolation-macos-root.md @@ -0,0 +1,10 @@ +--- +kind: fixed +title: the standing isolation test compares the canonical repository root, so it passes on macOS +pr: 1703 +surface: [engine] +invalidates: [] +--- + +The recorded root was right all along; the test compared it with the raw temp +directory, which macOS spells through the /var to /private/var symlink.