test(server): keep provider fixture directories host-portable#9572

merged1
windows-tests/mode-bits
windows-tests/temp-cleanup
openedSep 4, 2026byJJulius Marminge
View on GitHubTwo-way sync enabledPR last imported 3d ago

The Claude capabilities probe can abort before its child has fully exited. On Windows, keeping that child’s cwd inside the scoped fixture makes cleanup fail with EBUSY. The Codex collaboration fixture also hard-coded /tmp, which does not exist on Windows.

Give the Claude child a separate temporary cwd with retrying final cleanup, and use the host temporary directory for Codex collaboration sessions. The provider behavior and assertions are unchanged.

Part of the Windows test-suite stack rooted at #9564; the manual Windows lane comes from #9538.

Originally prepared with Claude Fable 5 in Claude Code; finalized with GPT-5.6 Sol in T3 Code.


Note

Low Risk Test-only fixture and cleanup changes; no production code paths or assertion changes.

Overview Makes two provider integration tests reliable on Windows by fixing how temporary working directories are created and torn down. Production provider behavior and test assertions are unchanged.

Claude capabilities probe SDK test: The fake child’s workspace cwd is no longer nested inside the scoped fixture directory. It is created as its own temp folder and removed in a finalizer via node:fs/promises rm with retries (instead of Effect scheduling, which would stall under TestClock). That avoids EBUSY when the probe aborts the SDK before the child exits and still holds the directory as cwd.

Codex collab runtime integration tests: Every makeCodexSessionRuntime call that used a hard-coded /tmp cwd now uses os.tmpdir(), so sessions run against the host temp path on Windows and Unix alike.

Reviewed by Cursor Bugbot for commit 81701181474409b87d8050f2836f60bcd152d3cd. Bugbot is set up for automated code reviews on this repo. Configure here.

Synced from GitHub

Thread transfer impact

✅ Thread transfer remains within every enforced ceiling.

ℹ️ No successful main baseline artifact is available yet. This run establishes the initial measurement.

ProviderMetricMain baselineThis PRImpactPR ceiling
CodexTotal thread wire—13.5 KiB—15.1 KiB✅
CodexThread snapshot wire—7.0 KiB—7.3 KiB✅
CodexLive turn WebSocket wire—6.5 KiB—7.8 KiB✅
CodexLive turn WebSocket decoded—57.0 KiB—66.4 KiB✅
CodexLive turn messages—8—21✅
ClaudeTotal thread wire—13.6 KiB—15.1 KiB✅
ClaudeThread snapshot wire—7.0 KiB—7.3 KiB✅
ClaudeLive turn WebSocket wire—6.5 KiB—7.8 KiB✅
ClaudeLive turn WebSocket decoded—57.8 KiB—66.4 KiB✅
ClaudeLive turn messages—9—21✅

Baseline: unavailable · PR result: 8170118 · Source CI: success

Scenario and decoded snapshot size

10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.

  • Codex decoded thread snapshot: 113.8 KiB
  • Claude decoded thread snapshot: 114.5 KiB

Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.

Synced from GitHub

Approvability

Verdict: Not approved

Macroscope's review found this PR not approvable — The runtime changes are confined to test cleanup and host-temporary-directory portability, with no product request-path impact. However, the PR adds a file-level nodeBuiltinImport:off static-analysis suppression, so human review is required.

Notes:

  • No code objects were reviewed. Approvability was decided on eligibility alone.

No code changes detected at 8170118. Prior analysis still applies.

You can add or adjust custom eligibility rules. Learn more.

CcursorBotreviewed · 1 inline threadSep 4, 2026
Synced from GitHub

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix is ON, but a cloud agent failed to start.

Reviewed by Cursor Bugbot for commit bc8fff55c03d5d73d561bbc412409cfe904b4aea. Configure here.

……@@ -51,8 +53,25 @@ it.layer(NodeServices.layer)("Claude capability probe SDK boundary", (it) => {
71+ retryDelay: 250,
72+ }).catch(() => undefined),
73+ ),
74+ );
CcursorBoton line 74Sep 4, 2026

Fake probe never exits after abort

Medium Severity

The fake CLI still keeps the event loop alive after the probe aborts, so it never releases workspaceCwd. On Windows the new retrying rm then fails every attempt, and Node's linear backoff on maxRetries can block teardown for tens of seconds before the leftover directory is ignored.

Additional Locations (1)

Reviewed by Cursor Bugbot for commit bc8fff55c03d5d73d561bbc412409cfe904b4aea. Configure here.

Added 1 commit

  • test(server): keep the fake Claude probe's cwd out of the scoped temp dir8170118