test(server): run fake provider CLIs through a Node stub on every host

Seven suites faked a provider CLI with a #!/bin/sh script made executable
by chmod, which Windows cannot run: the shebang is ignored and there is no
extension for PATHEXT to match, so the spawn either failed or fell through
to a real CLI on PATH. CodexTextGeneration's fake was a 120-line sh
argument parser.

Add apps/server/src/testUtils/fakeCli.ts. writeFakeCli writes the CLI's
behaviour as a Node stub and a launcher shaped for the host: a shebang
script on posix, a .cmd shim on Windows, which resolveSpawnCommand already
routes through a shell. execScriptSource covers the common case of handing
over to the mock ACP agent after an argv check. ClaudeTextGeneration, which
had its own .cmd branch, moves onto the shared helper too.

The tests that assert the agent logged SIGTERM on stop are skipped on
Windows, where the child is terminated rather than signalled.

Co-Authored-By: Claude Code <noreply@anthropic.com>
b4e082c2d3Julius Marminge committed on 9/4/2026, 8:26:50 PMparent00bf96a
12 files changedLine totals unavailable