From c32d84622fb3952823c6cfc25c557aec08c1788c Mon Sep 17 00:00:00 2001 From: pablodiazjorge <102741971+pablodiazjorge@users.noreply.github.com> Date: Sun, 11 Oct 2026 20:14:55 +0200 Subject: [PATCH] test(clients): verify native Claude Code integration on Windows (#1926) The Claude Code client lane asserted POSIX, although nothing in it depends on it. Remove the assertion, tell Windows users to select claude.exe when the default command cannot be spawned (npm installs put only a claude.cmd shim on PATH), and record 2.1.296 as verified on native Windows in docs/testing.md. Fixes #1923 Co-authored-by: Claude Opus 5.5 --- docs/testing.md | 11 +++++++---- scripts/verify-claude-client.mjs | 11 ++++++----- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/docs/testing.md b/docs/testing.md index e8a02713a..1e56a0348 100644 --- a/docs/testing.md +++ b/docs/testing.md @@ -139,8 +139,11 @@ directory, so default OS-home discovery remains unverified. Live model APIs and native Windows are also unverified. `verify:claude-client` requires installed Claude Code (verified with -`@anthropic-ai/claude-code@2.1.296`); select it with `REA_VERIFY_CLAUDE_COMMAND`. -The optional POSIX lane uses native `CLAUDE_CONFIG_DIR` discovery, an independent +`@anthropic-ai/claude-code@2.1.296` on POSIX and native Windows); select it +with `REA_VERIFY_CLAUDE_COMMAND`. On Windows, select +`claude.exe`: npm installs put only a `claude.cmd` shim on `PATH`, and the real +executable is under `node_modules/@anthropic-ai/claude-code/bin`. +The optional lane uses native `CLAUDE_CONFIG_DIR` discovery, an independent Git workspace, user settings and default built-in tools. It preserves caller preferences and backups, checks idempotent setup, waits through the native `WaitForMcpServers` tool when discovery is pending, and validates the complete @@ -149,8 +152,8 @@ native `Skill`, checks its full body and verifies named-schema JavaScript Eviden for a Unicode path. Use `-- chat` for ordinary chat with REA enabled, or `REA_VERIFY_RUNTIME_ROOT` for a production-only installed package. The local Anthropic Messages/SSE fixture preserves native resource-hint envelopes in its -request artifacts. Usage is synthetic; live Anthropic API, native Windows and -bare-mode personal-skill activation remain unverified by this lane. +request artifacts. Usage is synthetic; live Anthropic API and bare-mode +personal-skill activation remain unverified by this lane. `verify:copilot-client` requires installed GitHub Copilot CLI (verified with `@github/copilot@1.0.95`); select it with `REA_VERIFY_COPILOT_COMMAND`. diff --git a/scripts/verify-claude-client.mjs b/scripts/verify-claude-client.mjs index d1b7aa933..30bc66ba7 100644 --- a/scripts/verify-claude-client.mjs +++ b/scripts/verify-claude-client.mjs @@ -13,10 +13,6 @@ import { exec } from "./lib/verify-package-core.mjs"; import { createVerifierRun, completeVerifierRun } from "./lib/verifier-run.mjs"; import { createAnthropicModelFixture } from "./verify/clients/anthropic-model-fixture.mjs"; -assert( - process.platform !== "win32", - "Native Claude Code verifier requires POSIX; Windows is unverified", -); const repo = fileURLToPath(new URL("..", import.meta.url)); const runtimeRoot = process.env.REA_VERIFY_RUNTIME_ROOT ?? repo; const command = process.env.REA_VERIFY_CLAUDE_COMMAND ?? "claude"; @@ -46,8 +42,13 @@ try { await exec(command, ["--version"], { env: environment, timeout: 30_000 }) ).stdout.trim(); } catch (cause) { + // npm installs put only a claude.cmd shim on PATH, which Node does not spawn without a shell. + const windowsHint = + process.platform === "win32" + ? " On Windows, select claude.exe; npm installs provide it under node_modules/@anthropic-ai/claude-code/bin." + : ""; throw new Error( - `Claude Code preflight failed for ${command}; install Claude Code or set REA_VERIFY_CLAUDE_COMMAND. ${String(cause)}`, + `Claude Code preflight failed for ${command}; install Claude Code or set REA_VERIFY_CLAUDE_COMMAND.${windowsHint} ${String(cause)}`, ); } const target = join(lab, "fixture α测试");