Skip to content

test: normalize macOS temporary paths - #8

Merged
pppolf merged 1 commit into
mainfrom
agent/fix-macos-temp-path-tests
Aug 12, 2026
Merged

pppolf merged 1 commit into
mainfrom
agent/fix-macos-temp-path-tests

Conversation

@pppolf

@pppolf pppolf commented Aug 12, 2026

Copy link
Copy Markdown
Member

What

  • resolve security-sensitive test fixture roots before exercising no-indirection path checks
  • cover browser discovery/profile fixtures, sandbox Workspace fixtures, and Workspace write resolution
  • keep production path validation unchanged and fail closed

Why

On macOS, testing.T.TempDir() may return /var/... while the filesystem resolves it through the system /var to /private/var alias. Tests that intentionally reject indirect paths then reject their own trusted fixture roots. This caused the full local Go suite to fail consistently across browser runtime, sandbox, and Workspace path tests despite the production boundary behaving as designed.

Impact

The security tests now supply canonical direct fixture paths on macOS without weakening any production validation. Linux and Windows retain the same effective test paths.

Checks

  • go mod verify
  • go test -timeout 20m -count=1 ./...
  • go vet ./...
  • focused affected packages
  • 20 repetitions of affected browser/sandbox/Workspace cases
  • git diff --check

All Go checks used Go 1.25.12.

@pppolf
pppolf marked this pull request as ready for review August 12, 2026 14:07
@pppolf
pppolf merged commit c0baeed into main Aug 12, 2026
4 checks passed
@NanaseInori
NanaseInori deleted the agent/fix-macos-temp-path-tests branch September 16, 2026 09:08
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.

1 participant