agent-orchestrator/packages/cli/__tests__/commands
Priyanshu Choudhary 7f1cb8a92a ci(windows): matrix Linux+Windows + close coverage gaps
Adds windows-latest to typecheck/test/test-web matrices (lint stays
Linux-only; nothing ESLint catches differs by OS). fail-fast: false
so one OS's failure never masks the other's. tmux install steps gate
on runner.os == 'Linux' since Windows uses runtime-process. test job
adds a node-pty prebuild smoke step on Windows so a future ABI break
fails fast with a clear message. test-web is broadened from
server/__tests__/ to the full vitest suite — closes a pre-existing
Linux-too gap and ensures component/hook/lib tests run on Windows.

Closes three completeness gaps where Windows code paths existed but
no test exercised them:

1. session.test.ts (5 tests): "tests Windows behavior, skips on
   Windows" defensive pattern. Tests fully mock isWindows + net.connect
   + child_process — flipping skipIf(win32) to plain it() runs them on
   both OSes. All 45 tests pass on Windows.

2. dashboard.test.ts (+2 tests): findRunningDashboardPidsForWebDir
   has parallel POSIX (lsof + cwd verification) and Windows
   (findPidByPort, no cwd check) implementations. Existing tests
   asserted lsof; new runIf(win32) tests assert findPidByPort path
   plus dedup across multiple ports.

3. start.test.ts (+1 test): port-scan fallback for orphaned
   dashboards skips ps cmdline verification on Windows by design.
   Existing test asserted ps was called; new runIf(win32) parallel
   asserts ps was NOT called and the kill still fires.

Adds first PS1 script test coverage (previously zero):

4. update-ps1.test.ts (4 tests): argparse — --help/-h, unknown flag,
   conflicting --skip-smoke + --smoke-only.

5. doctor-ps1.test.ts (4 tests): argparse + full check pipeline
   smoke. The pipeline test runs every Check-* function against an
   empty repo and asserts the script exits cleanly with a "Results: N
   PASS, N WARN, N FAIL, N FIXED" summary line — catches PS1 syntax
   errors and crashes mid-pipeline.

Net effect: CLI suite went from 622 -> 630 passing tests on Windows
(5 unskipped + 8 new); skipped count dropped from 25 -> 20. All other
suites unchanged.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-05 02:03:17 +05:30
..
completion.test.ts refactor(core): storage redesign — projectId-based paths, JSON metadata (#1466) 2026-04-28 17:55:53 +05:30
dashboard.test.ts ci(windows): matrix Linux+Windows + close coverage gaps 2026-05-05 02:03:17 +05:30
doctor.test.ts feat(cli): install-aware ao update, startup notifier, doctor version check (#1156) 2026-04-13 11:46:26 +05:30
init.test.ts Resolve remaining PR review comments 2026-03-17 15:51:02 +05:30
open.test.ts Add multi-project storage, resolution, and project settings support (#1343) 2026-04-21 17:45:55 +05:30
plugin.test.ts feat: add $schema support to agent-orchestrator.yaml (#1373) 2026-04-26 19:42:45 +05:30
project.test.ts fix(cli): register project command (#1576) 2026-04-30 20:34:30 +05:30
report.test.ts refactor(core): storage redesign — projectId-based paths, JSON metadata (#1466) 2026-04-28 17:55:53 +05:30
review-check.test.ts Add multi-project storage, resolution, and project settings support (#1343) 2026-04-21 17:45:55 +05:30
send.test.ts Merge origin/main into feat/windows-platform-adapter 2026-04-29 04:37:04 +05:30
session.test.ts ci(windows): matrix Linux+Windows + close coverage gaps 2026-05-05 02:03:17 +05:30
setup.test.ts feat: add $schema support to agent-orchestrator.yaml (#1373) 2026-04-26 19:42:45 +05:30
spawn.test.ts refactor(spawn): plugin-owned preflight + collapse project resolution (#1622) 2026-05-04 14:03:26 +05:30
start.test.ts ci(windows): matrix Linux+Windows + close coverage gaps 2026-05-05 02:03:17 +05:30
status.test.ts feat(cli): filter terminated sessions from ao session ls / ao status by default (#1340) 2026-04-20 13:05:34 +05:30
update.test.ts fix(cli): avoid missing repo scripts on global installs (#1252) (#1277) 2026-04-26 16:47:49 +05:30