Skip to content

test: make tooling fixtures portable on macOS - #57

Merged
wolfiesch merged 3 commits into
mainfrom
codex/macos-headless-test-portability
Jul 18, 2026
Merged

test: make tooling fixtures portable on macOS#57
wolfiesch merged 3 commits into
mainfrom
codex/macos-headless-test-portability

Conversation

@wolfiesch

Copy link
Copy Markdown
Collaborator

What changed

  • create canonical, short-lived test directories across macOS and Linux
  • keep realistic OMP socket names without exceeding the macOS UNIX socket path limit
  • make maintainer preflight fixtures reach their intended assertions on macOS
  • preserve production-root and symlink-escape security coverage

Root cause

macOS exposes its default temporary directory through a noncanonical /var/folders path, 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:tooling now 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 skips
  • mise exec node@24.17.0 -- pnpm check
  • mise exec node@24.17.0 -- pnpm test
  • git diff --check

@wolfiesch
wolfiesch marked this pull request as ready for review July 18, 2026 23:05
Copilot AI review requested due to automatic review settings July 18, 2026 23:05

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread scripts/t4-maintainer-contract.test.mjs Outdated

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread scripts/test-temporary-directory.mjs
Comment thread scripts/t4-maintainer-contract.test.mjs Outdated
@wolfiesch
wolfiesch merged commit 734c335 into main Jul 18, 2026
4 checks passed
@wolfiesch
wolfiesch deleted the codex/macos-headless-test-portability branch July 18, 2026 23:41
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.

2 participants