Skip to content

Windows: 27 unit tests fail (jq missing, path doubling, argv mismatch, codev check not in 3.3.8) #2013

Backlog

Description

@OdyAsh

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:

  1. Missing jq — 13 tests fail because jq isn't installed
  2. Path handling — 1 test fails due to path doubling under Git Bash
  3. Argv mismatch — 3 tests fail because relaunch argv doesn't match expected format
  4. Missing feature — 10 tests fail because codev check isn'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

  1. Install codev and dependencies:

    git clone https://github.com/cluesmith/codev
    cd codev
    pnpm install
  2. Run the full test suite:

    pnpm --filter @cluesmith/codev test
  3. 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 jq in 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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions