Skip to content

test(server): Windows paths and settings lookup no longer break server tests - #30984

Closed
juliusmarminge wants to merge 1 commit into
mainfrom
fix/issue-30950
Closed

juliusmarminge wants to merge 1 commit into
mainfrom
fix/issue-30950

Conversation

@juliusmarminge

Copy link
Copy Markdown
Member

Problem

On Windows, 17 server tests fail on main because of three test-side assumptions; production is correct and the same files pass on Linux. Attachment tests search JSON-serialized payloads for raw paths, or expect raw paths where production JSON-quotes them, so Windows backslashes never match. The Claude tool-search settings test assumes the POSIX worktree-to-repository-root lookup of .claude/settings.local.json, while production deliberately reads it from cwd on Windows. A Codex test hard-codes the /-separated suffix providers/codex/<id>/shadow.

Reproduced on main 9e85538535 with the Windows test lane: run 41868132030, 17 failed, 311 passed, 13 skipped.

Change

Test-only; no production file changes.

  • ClaudeAdapterV2.test.ts attachments: a small sdkMessageText helper reads the text blocks of the SDK message, and the five path assertions check that text, where production writes the raw path, instead of JSON.stringify of the whole content.
  • userInputAttachments.test.ts: the four path assertions expect JSON.stringify(path), the form production emits.
  • ClaudeAdapterV2.test.ts tool search: branches on yield* HostProcess.Platform. Off Windows the original assertions are unchanged; on Windows it asserts that the repository-root local file is not read from a worktree or a subdirectory and that a local file in cwd is.
  • CodexDriver.test.ts: the expected suffix is built with NodePath.join.

Scope and approval

Fixes #30950

Verification

Windows (.github/workflows/windows-tests.yml, package=apps/server, the three changed files):

Run Commit Result
Before, 41868132030 9e85538535 17 failed, 311 passed, 13 skipped
After, 41868139348 8ca906a282 328 passed, 13 skipped

The 17 before-failures are the issue's inventory: 12 ClaudeAdapterV2 attachments, 3 userInputAttachments, 1 tool-search settings, 1 Codex managed catalog. The 13 skips are the existing Windows skips in these files.

Linux:

  • vp test run on the three files: 341 passed, before and after.
  • Backslash temp directory (TMPDIR containing \): main fails the 15 JSON-path tests; after the change they pass. Four CodexDriver npm-update tests still fail under that simulation on both sides because POSIX production normalizes \ to /; that does not happen on Windows and is not changed here.
  • Tool-search test with HostProcess.Platform provided as win32 (temporary, not committed): fails at the root-local assertion on main, passes after.
  • vp run check:changed: passed.

No UI or runtime surface changes, so there are no captures.

AI-assisted; verified with the tests and tools listed above.

🤖 Generated with Claude Code

…r tests

17 server tests failed on Windows because of three assumptions that only hold on POSIX.

- Claude attachment tests searched JSON.stringify of the SDK content for raw paths, so
  Windows backslashes appeared doubled. They now read the text blocks, where the
  attachment prompt writes the raw path.
- User-input attachment tests expect the JSON-encoded path that production emits.
- The tool-search settings test reads HostProcess.Platform. POSIX assertions are
  unchanged. On win32 it asserts that the root local file is ignored and a cwd-local
  file applies.
- The Codex shadow home suffix is built with node:path join.

AI-assisted; verified with the tests and tools listed above.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:M 30-99 changed lines (additions + deletions). labels Nov 4, 2026
@macroscopeapp

macroscopeapp Bot commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at 8ca906a

Macroscope's review found this PR approvable — This PR adjusts Windows-specific server test expectations and is confined to ignored test files. No production behavior change or material operational exposure is identified.

Notes:

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

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

@github-actions

github-actions Bot commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

Thread transfer impact

✅ Thread transfer remains within every enforced ceiling.

Provider Metric Main baseline This PR Impact PR ceiling
Codex Total thread wire 5.0 KiB 5.0 KiB 0 B (0.0%) 6.8 KiB ✅
Codex Thread snapshot wire 3.8 KiB 3.8 KiB 0 B (0.0%) 4.9 KiB ✅
Codex Live turn WebSocket wire 1.2 KiB 1.2 KiB 0 B (0.0%) 2.0 KiB ✅
Codex Live turn WebSocket decoded 21.5 KiB 21.5 KiB 0 B (0.0%) 24.4 KiB ✅
Codex Live turn messages 1 1 0 (0.0%) 8 ✅
Claude Total thread wire 5.0 KiB 5.0 KiB 0 B (0.0%) 6.8 KiB ✅
Claude Thread snapshot wire 3.8 KiB 3.8 KiB 0 B (0.0%) 4.9 KiB ✅
Claude Live turn WebSocket wire 1.2 KiB 1.2 KiB 0 B (0.0%) 2.0 KiB ✅
Claude Live turn WebSocket decoded 21.9 KiB 21.9 KiB 0 B (0.0%) 24.4 KiB ✅
Claude Live turn messages 1 1 0 (0.0%) 8 ✅

Baseline: 9e85538 · PR result: 8ca906a · 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: 108.5 KiB
  • Claude decoded thread snapshot: 108.8 KiB

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

@coderabbitai

coderabbitai Bot commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The server tests now check attachment paths at the correct serialization depth, account for platform-specific Claude settings lookup, and build the Codex shadow-home path with NodePath.join.

Changes: Windows server test fixes

Layer / File(s) Summary
Attachment path assertions
apps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.test.ts, apps/server/src/provider/userInputAttachments.test.ts
Claude adapter tests extract message text before checking attachment paths. Attachment tests expect paths encoded with JSON.stringify.
Platform-specific path expectations
apps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.test.ts, apps/server/src/provider/Drivers/CodexDriver.test.ts
Claude settings assertions distinguish Windows lookup from other platforms. The Codex shadow-home expectation uses NodePath.join.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Other · Severity of issue fixed: Low

Suggested reviewers: maria-rcks, t3dotgg

Merge Risk: Minimal · up to 8ca90

The test-only changes correctly account for Windows path and settings behavior without weakening the covered checks.

Pre-merge checks: Passed 4
Check name Status Explanation
Title check Passed The title names the main change: test-side fixes that stop Windows path and settings assumptions from breaking server tests. It follows the conventional commit style of the template. The changeset tou…
Description check Passed The description follows the template sections: Problem, Change, Scope and approval, and Verification. The Problem section states the failing Windows tests and the cause. The Change section lists the t…
Linked Issues check Passed Issue [#30950] requires three test-only corrections. The diff extracts Claude SDK text blocks before checking attachment paths, uses JSON.stringify(path) for serialized attachment references, branches…
Out of Scope Changes check Passed All changed lines support issue [#30950]. The sdkMessageText helper supports the requested attachment assertions, and the platform-specific settings assertions preserve the requested settings-selectio…
Full details: Title check

Explanation

The title names the main change: test-side fixes that stop Windows path and settings assumptions from breaking server tests. It follows the conventional commit style of the template. The changeset touches only test files, and the title says so by referring to server tests.

Full details: Description check

Explanation

The description follows the template sections: Problem, Change, Scope and approval, and Verification. The Problem section states the failing Windows tests and the cause. The Change section lists the test-only edits in each of the three files. Scope links issue #30950. Verification gives before and after Windows CI runs, Linux results, and a backslash-TMPDIR simulation. The author states that no UI changes apply. The template's Scope section asks for explicit maintainer approval or an explanation for a small, obvious fix. The author gives only an issue link and no approval comment or explanation of why the fix qualifies without one. This is a small gap, but the description is otherwise mostly complete.

Full details: Linked Issues check

Explanation

Issue [#30950] requires three test-only corrections. The diff extracts Claude SDK text blocks before checking attachment paths, uses JSON.stringify(path) for serialized attachment references, branches settings assertions on HostProcess.Platform while preserving POSIX checks and testing Windows cwd behavior, and builds the Codex suffix with NodePath.join. The diff changes only the three requested test files. No tests are skipped or weakened.

Full details: Out of Scope Changes check

Explanation

All changed lines support issue [#30950]. The sdkMessageText helper supports the requested attachment assertions, and the platform-specific settings assertions preserve the requested settings-selection coverage. The Codex path change addresses the requested separator assumption. No unrelated production, UI, or runtime changes appear in the reviewed diff.

Finishing Touches
Generate docstrings
  • Commit to this branch
  • Create a new PR
Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info
Run configuration
Commits

Reviewing files that changed from the base of the PR and between 9e85538 and 8ca906a.

Files selected for processing: 3
  • apps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.test.ts
  • apps/server/src/provider/Drivers/CodexDriver.test.ts
  • apps/server/src/provider/userInputAttachments.test.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 4 remain after this review.

@juliusmarminge juliusmarminge added bugfix Fix PR opened by an issue lead; enters the PR loop pr:gate-failed A land gate failed labels Nov 4, 2026
@Yash-Singh1

Copy link
Copy Markdown
Collaborator

Superseded by #30983

@Yash-Singh1 Yash-Singh1 closed this Nov 5, 2026
@juliusmarminge juliusmarminge removed the pr:gate-failed A land gate failed label Nov 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix Fix PR opened by an issue lead; enters the PR loop size:M 30-99 changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Windows server tests assume unescaped paths and POSIX settings lookup

2 participants