`TestResolveAgentSource_ConfigLocalPath`, `TestContainedLocalPath_Valid`, and `TestContainedLocalPath_DotSegmentsCleaned` in `internal/cli/run_test.go` fail on macOS on a clean checkout of `main`.
`containedLocalPath` returns the `filepath.EvalSymlinks`-resolved path (symlink-escape containment check, introduced in #2769). On macOS `t.TempDir()` lives under `/var/folders/...` and `/var` is a symlink to `/private/var`, so the returned path is canonicalized to `/private/var/...` while the tests build the expected path from the raw `t.TempDir()` value:
expected: "/var/folders/.../TestContainedLocalPath_Valid.../001/harness/agent.yaml"
actual : "/private/var/folders/.../TestContainedLocalPath_Valid.../001/harness/agent.yaml"
CI runs `internal/cli` tests on Linux only, so this never surfaces there. Locally on macOS it makes every `go test ./internal/cli/` run red, masking real failures.
Repro (macOS):
go test -run 'TestResolveAgentSource_ConfigLocalPath|TestContainedLocalPath' ./internal/cli/
Fix: canonicalize the temp dir with `filepath.EvalSymlinks` in the affected tests so expected and actual agree. The production behavior is correct and unchanged.
`TestResolveAgentSource_ConfigLocalPath`, `TestContainedLocalPath_Valid`, and `TestContainedLocalPath_DotSegmentsCleaned` in `internal/cli/run_test.go` fail on macOS on a clean checkout of `main`.
`containedLocalPath` returns the `filepath.EvalSymlinks`-resolved path (symlink-escape containment check, introduced in #2769). On macOS `t.TempDir()` lives under `/var/folders/...` and `/var` is a symlink to `/private/var`, so the returned path is canonicalized to `/private/var/...` while the tests build the expected path from the raw `t.TempDir()` value:
CI runs `internal/cli` tests on Linux only, so this never surfaces there. Locally on macOS it makes every `go test ./internal/cli/` run red, masking real failures.
Repro (macOS):
Fix: canonicalize the temp dir with `filepath.EvalSymlinks` in the affected tests so expected and actual agree. The production behavior is correct and unchanged.