Repository navigation
Description
Test Suite Failures on Windows
Context
Codev has a comprehensive test suite (9,618+ tests). When we ran the full suite on Windows, 27 tests failed across 6 files. These failures are Windows-specific — the tests pass on Linux/Mac CI.
The failures fall into three categories:
- Missing jq — 13 tests fail because jq isn't installed
- Path handling — 1 test fails due to path doubling under Git Bash
- Argv mismatch — 3 tests fail because relaunch argv doesn't match expected format
- Missing feature — 10 tests fail because
codev checkisn't in the 3.3.8 release
Environment
- OS: Windows 11 (build 22631)
- Node: v22.23.3
- pnpm: 10.33.0
- codev: 3.3.8
- Shell: Git Bash
Steps to Reproduce
-
Install codev and dependencies:
git clone https://github.com/cluesmith/codev cd codev pnpm install -
Run the full test suite:
pnpm --filter @cluesmith/codev test -
Observe failures:
Test Files 6 failed | 142 passed (148) Tests 27 failed | 9618 passed (9645)
Expected Behavior
All tests should pass on Windows, just like on Linux/Mac CI.
Actual Behavior
27 tests fail across 6 files:
Category 1: Missing jq (13 tests)
Files: forge-jira-preset.test.ts (12), windows-launch-resolvers.test.ts (1)
Tests fail with exit code 127 (command not found) because jq isn't installed:
Error: spawnSync jq ENOENT
Category 2: Path doubling (1 test)
File: air-1474-sanitize-ordering.test.ts
Path gets doubled under Git Bash:
Expected: /path/to/sanitize.py
Actual: /path/to/packages/codev/D:\path\to\sanitize.py
Category 3: Argv mismatch (3 tests)
File: pir-1233-session-launch-loop.test.ts
Relaunch argv is the spawn prompt text instead of --session-id:
Expected: --session-id <uuid>
Actual: You are a Builder. Read codev/roles/builder.md...
Category 4: Missing feature (10 tests)
Files: check-cli.test.ts (2), check-pr-readonly.test.ts (8)
codev check command is unknown in 3.3.8 (it's a post-3.3.8 feature from Spec 1951):
Error: Unknown command 'check'
Root Cause
Category 1: jq not installed
The tests use jq to parse JSON in test fixtures. Windows doesn't have jq by default.
Category 2: Path handling under Git Bash
Git Bash on Windows uses MSYS2 path translation, which can double paths when Node.js passes Windows-style paths to shell scripts.
Category 3: Session launch loop argv
The test expects --session-id <uuid> but gets the spawn prompt text. This is a test fixture issue — the relaunch command construction changed but the test wasn't updated.
Category 4: codev check not in 3.3.8
The codev check command was added in a post-3.3.8 spec (Spec 1951). The tests exist in source but the command isn't in the 3.3.8 release.
Possible Fix
Category 1: Install jq or mock it in tests
- Add jq to CI requirements for Windows
- Or mock
jqin tests with a Node.js JSON parser
Category 2: Fix path sanitization
Normalize paths before passing to shell scripts:
const sanitized = path.normalize(filePath).replace(/\\/g, '/');Category 3: Update test fixture
Update the test to expect the new argv format, or fix the relaunch command construction.
Category 4: Release codev check
Include the codev check command in the next release, or mark the tests as skipped for 3.3.8.
Evidence
Test output summary
Test Files 6 failed | 142 passed (148)
Tests 27 failed | 9618 passed (9645)
jq failure
Error: spawnSync jq ENOENT
Path doubling
Expected: /path/to/sanitize.py
Actual: /path/to/packages/codev/D:\path\to\sanitize.py
Argv mismatch
Expected: --session-id <uuid>
Actual: You are a Builder. Read codev/roles/builder.md...
Missing command
Error: Unknown command 'check'
Impact
- CI is red on Windows — can't distinguish real regressions from known failures
- New contributors see failures — bad first impression
- Workarounds exist — install jq, skip specific tests
Related
- Findings IDE Loop Misunderstanding - AI Doesn't Understand Phase Repetition #5, Defense Phase Confusion - Misinterpreted as Justification vs Testing #6, High-Risk Change Management - Need for Selective Manual Review #7 in the Windows findings artifact
- Issue #1945 for script-shell (related to Category 1)
- Spec 1951 for
codev check(Category 4) - Test baseline: 27 failed / 9618 passed
Activity