Skip to content

The CLI, updater, agent-device, console and remaining folders pass their unit tests on Windows #1709

Open

Description

@V3RON

Part of #1693.

Scope

The unit tests of src/cli/, src/updater/, src/agent-device/, src/instructions/, ui/ and of every folder no other task names (src/simlock-client/ among them) run on the Windows job and pass, and their files come off the list. The CLI's auto-start, the updater's restart and agent-device's install path are then checked on Windows on every PR. A Windows-only defect they show is fixed here.

If it goes wrong, a Windows user's simlock command fails to start the daemon or to update it.

Technical spec

Commit 2df19f8.

Rows

  • Behaviours: B7
  • Interfaces: I1, I3 (used)
  • Existing code: X10, X20

Facts

# Fact Source
F1 At this commit, 16 files of this group fail on Windows (about 70 tests), among them src/updater/index.test.ts (18: Unexpected process invocation: C:\Program Files\nodejs\node.exe \global\node_modules\simlock\dist\cli\main.js daemon start), src/cli/index-device-config.test.ts (11), src/cli/index-daemon-service.test.ts (5, timeouts), src/instructions/setup.test.ts (6), src/agent-device/local-profile.test.ts, ui/src/ds/contrast.test.ts and src/simlock-client/no-core-leak.test.ts (its beforeAll fails). pnpm exec vitest run --project unit --project ui-dom --reporter=json on DesktopWindows (Windows 11 23H2), 2026-11-18
F2 no-core-leak.test.ts runs node_modules/.bin/tsc with execFileSync and no shell. src/simlock-client/no-core-leak.test.ts:53-54

Modules touched

Searches: rg -ln "daemon\.sock|execFileSync|process\.execPath" src/cli src/updater src/agent-device src/instructions src/simlock-client ui --glob '*.test.*'.

  • The failing test files of the group, and their helpers.
  • Product code in those folders only where a test shows a Windows-only defect; a change to what a command prints updates its website page (documentation rule 9).
  • src/test-support/windows-skipped.ts: this group's files removed.
  • A conflict in src/test-support/windows-skipped.ts with a sibling task of CI: run the tests on Windows #1693 (neighbouring lines removed) is resolved by keeping both sides' removals.

Rules in play

  • ADR 0087 §2, §3, §5.
  • CLI manual: no state beyond the lease; auto-launch rules unchanged.
  • docs/internal/agent-rules/documentation.md rule 9, if a printed line changes.

Tests

The seam is the Windows job (B1) running the group's existing test files; model a host-built command on src/updater/index.test.ts.

  • B7: every file of the group passes on the Windows job and none is on the list: the updater expects the host's node and host-joined path; CLI tests reach a real daemon on its pipe; tsc from node_modules/.bin started the way Windows can; POSIX-only facts skipped on win32; any product fix pinned by its test

Done when

  • pnpm test:changed passes on the branch.
  • The PR's Unit tests (Windows) job passes, and no file of the group is left in src/test-support/windows-skipped.ts.

Out of scope

Depends on

Written by an agent.

Metadata

Metadata

Assignees

Labels

os:windowsRuns on, or affects, Windows hoststask:readySpec checked. An agent may implement it once its Depends on allow.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions