Skip to content

test: fix macOS portability failures in CSO and PTY suites (#2908-#2911) - #2932

Closed
furuchanchan wants to merge 1 commit into
garrytan:mainfrom
furuchanchan:fix/macos-test-portability
Closed

furuchanchan wants to merge 1 commit into
garrytan:mainfrom
furuchanchan:fix/macos-test-portability

Conversation

@furuchanchan

Copy link
Copy Markdown

Summary

Running the free test suite on macOS surfaced four classes of failures in the CSO/PTY test harness — all portability issues in test infrastructure, not product bugs. Fixes for #2908, #2909, #2910, #2911.

Test plan

Verified on macOS (Bun 1.3.11):

  • bun test test/cso-git-hardening.test.ts — 10/10 pass
  • bun test test/plan-count-file-permission.test.ts — 13/13 pass (previously 5 timeouts)
  • bun test browse/test/chromium-profile-isolation.test.ts — 9/9 pass
  • bun test test/spec-quality-gate-secret-sink.test.ts — 12/12 pass
  • bun test test/regression-issue2091-bsd-mktemp.test.ts test/gen-skill-docs.test.ts — 444/444 pass (mktemp sweep + freshness gate)
  • bun run gen:skill-docs — no drift; generated .md and golden fixtures consistent
  • bun run test (full free suite) — my changed files all pass; remaining failures are pre-existing macOS issues in untouched fixtures (same /var symlink class in other CSO suites — happy to follow up separately)

Generated with Devin

@trunk-io

trunk-io Bot commented Sep 22, 2026

Copy link
Copy Markdown

Merging to main in this repository is managed by Trunk.

  • To merge this pull request, check the box to the left or comment /trunk merge below.

After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here

…2908-garrytan#2911)

Running the free suite on macOS surfaced four classes of failures,
all test-harness portability issues rather than product bugs:

- garrytan#2908: chromium-profile-isolation teardown kills the daemon's whole
  process group; on macOS a group whose members already exited fails
  EPERM (not ESRCH), which safeKill rethrows. Tolerate EPERM in this
  best-effort test teardown only.
- garrytan#2909: the case-collision fixture cannot create TRACKED.ts beside
  tracked.ts on case-insensitive APFS; assert the variant only when
  the volume actually preserved it.
- garrytan#2910: BSD mktemp ignores TMPDIR for bare mktemp; give the
  redact/PR-body scratch files an explicit TMPDIR-anchored template
  (placeholder still at end, per garrytan#2091). Regenerated outputs and
  golden fixtures match.
- garrytan#2911: plan-count file-permission tests timed out for two reasons:
  spawned children report process.cwd() kernel-resolved
  (/var -> /private/var) while fixtures kept the symlinked spelling, so
  transcript/hook records never matched; and the default 120-col PTY
  wrapped long per-user TMPDIR paths mid-string. Resolve the fixture
  cwd, let runPlanSkillCounting forward cols, and let the recorder's
  tmpdir containment fall back to canonical paths (identity checks stay
  exact-string).
- pty-screen: importing the bundled xterm headless build via a data:
  URL exceeds the module-specifier length cap on newer Bun
  (NameTooLong); spool it to a temp file instead. This was masking the
  real garrytan#2911 symptoms behind "PTY screen unavailable".

Verified on macOS (Bun 1.3.11): cso-git-hardening 10/10,
plan-count-file-permission 13/13, chromium-profile-isolation 9/9,
spec-quality-gate-secret-sink 12/12, regression-issue2091-bsd-mktemp +
gen-skill-docs 444/444.

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@devin-ai-integration
devin-ai-integration Bot force-pushed the fix/macos-test-portability branch from 10f15ed to a72d830 Compare October 3, 2026 00:07
@capy-ai

capy-ai Bot commented Oct 3, 2026

Copy link
Copy Markdown
Contributor

Thanks for this, @furuchanchan. The fix is now on main: the EPERM teardown and TRACKED.ts case-fixture fixes are both on main (fixed in v1.91.16.0, #3014). Closing as superseded; if you still see the problem on the latest gstack, please open an issue with ./setup --status output.

@capy-ai capy-ai Bot closed this Oct 3, 2026
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