test: make tooling fixtures portable on macOS - #57
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 342da56d0d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
Pull request overview
Improves cross-platform reliability of the tooling/maintainer test fixtures by creating canonical temporary directories (especially on macOS) and adjusting fixtures to avoid macOS UNIX socket path-length and host-tooling assumptions.
Changes:
- Added a shared helper to create short, canonical, realpathed temporary directories across platforms.
- Updated tailnet gateway and maintainer tests to use the canonical temp helper and to better align with macOS constraints.
- Adjusted maintainer fixtures to use the test proc-root environment variable expected by maintainer scripts and to avoid relying on Linux-only host commands.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| scripts/test-temporary-directory.mjs | Introduces a helper to create canonical temp directories for tests (macOS-friendly). |
| scripts/tailnet-gateway.test.mjs | Uses canonical temp directories for gateway fixtures to keep socket paths within macOS limits. |
| scripts/t4-maintainer-integration.test.mjs | Uses canonical temp dirs for deploy fixtures; canonicalizes production-root temp path; uses test proc-root env var. |
| scripts/t4-maintainer-contract.test.mjs | Uses canonical temp dirs and adds stubs/PATH adjustments to keep preflight assertions portable on macOS. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
What changed
Root cause
macOS exposes its default temporary directory through a noncanonical
/var/folderspath, and its UNIX socket path limit is shorter than the generated gateway fixture path. Several Linux-focused preflight fixtures also assumed Linux-only commands were installed on the host.Impact
pnpm test:toolingnow runs cleanly on macOS without changing production gateway or maintainer behavior.Verification
mise exec node@24.17.0 -- pnpm test:tooling— 292 passed, 2 platform skipsmise exec node@24.17.0 -- pnpm checkmise exec node@24.17.0 -- pnpm testgit diff --check