loopx icon indicating copy to clipboard operation
loopx copied to clipboard

[Bug]: native Windows: remaining 32 host-dependent control-plane TypeScript test failures after #6207

Open JasonBuildAI opened this issue 1 month ago • 0 comments

Preflight

  • [X] I searched existing issues and discussions for this behavior.
  • [X] This report is not an unpatched security vulnerability.
  • [X] The report and attachments contain no credentials or private/internal material.

Issue origin

Observed or reproduced in a real environment (native Windows 11, PowerShell, core.autocrlf=true, no Developer Mode / symlink privilege).

LoopX version or commit

71304fcbd (current main)

Host or runtime surface

Other: native Windows 11 host running the repository Node/TypeScript test lane (npm run -s test:control-plane).

LoopX area

Build, packaging, installer, or CI

Problem

On a native Windows checkout, npm run -s test:control-plane cannot serve as a pass/fail signal: 32 of 4548 tests fail for host-dependent reasons that are not product defects. Every class below is already guarded elsewhere in this suite, or was explicitly declared out of scope by #6207, whose merged criteria table lists "The other 34 Windows failures (symlink privileges, fsync, signals) | out_of_scope". This issue tracks exactly that declared remainder.

Who is affected: Windows contributors following the fast loop in CONTRIBUTING (npm run typecheck:control-plane && npm run test:control-plane) and any CI lane running this suite on Windows. They must triage ~32 red tests unrelated to their change on every run and cannot separate a real regression from known host noise.

Minimal reproduction

  1. On native Windows (with core.autocrlf=true and without symlink privileges), check out 71304fcbd and install dependencies.
  2. Run npm run -s test:control-plane.
  3. Observe exit code 1 with tests 4548 / pass 4456 / fail 32 / skipped 60.

Failing classes:

  • 20 process-death tests in tests/control_plane_ts/canonical_task_lease_renew.test.ts assert child.signal === "SIGKILL" for a child that kills itself with process.kill(process.pid, "SIGKILL"). On Windows the child is terminated via TerminateProcess and the parent observes status: 1, signal: null (no POSIX signals); the sibling tests/control_plane_ts/sqlite_authority_store.test.ts:272 already guards exactly this assertion with if (process.platform !== "win32").
  • 9 tests create file symlinks and fail with EPERM: operation not permitted, symlink ... (errno -4048) because file symlink creation needs Developer Mode or admin: quota_void_commit.test.ts:728, shadow_entry_delivery.test.ts:118, sqlite_backup.test.ts:51, cold_source_import.test.ts:205, coordination_runtime_shadow.test.ts:79/83/88/189, effect_runtime_snapshot.test.ts:27. The suite already skips or substitutes in equivalent spots (effect_runtime_compile_cache.test.ts:121, source_transfer.test.ts:69, junction fallback in configuration_backup.test.ts:65).
  • agent_preferences.test.ts:69 expects permission_denied after chmod(path, 0). Windows ignores POSIX read permission bits, so the call correctly returns observed. The Python twin of this check was already made POSIX-only in #6007 ("mode 000 read denial needs a non-root POSIX host"); the TypeScript lane did not receive the same guard.
  • authority_archive.test.ts:52 simulates process.platform === "linux" on a real Windows kernel, but the store's directory fsync then genuinely fails (EPERM ... fsync) — a POSIX host property that cannot be simulated on Windows.
  • goal_acceptance_authority.test.ts:35 extracts the documented configuration with /```json\n/, which never matches on a core.autocrlf=true checkout (CRLF endings), so it reports the guide as missing a runnable configuration.

Expected behavior

The control-plane TypeScript suite should not report host-dependent false failures on native Windows. Host-specific assertions should be guarded the same way this suite already guards them (skip or platform-appropriate substitute), leaving POSIX/CI behavior unchanged.

Actual behavior

32 tests fail on pristine main (exit code 1).

ℹ tests 4548
ℹ pass 4456
ℹ fail 32
ℹ skipped 60

Representative failures:

✖ file real process death before acquire commit preserves one new generation
  null !== 'SIGKILL'  (canonical_task_lease_renew.test.ts:129)

✖ source admission rejects file_symlink without changing the candidate
  Error: EPERM: operation not permitted, symlink ...  { errno: -4048 }

✖ known filesystem denial is not missing or corrupt preferences
  actual {ok: true, status: 'observed'} vs expected {ok: false, status: 'permission_denied'}  (agent_preferences.test.ts:79)

✖ archive publication preserves the linux directory-sync boundary
  Error: archive requires a committed source head  (authority_archive.test.ts:52)

✖ documented owner configuration satisfies the canonical acceptance contract
  AssertionError: the operation guide must include a runnable configuration  (goal_acceptance_authority.test.ts:35)

Additional context

  • Predecessor: #6207 (merged) made the four POSIX-path-spelling test files host-independent and declared the remaining Windows failures out of scope; this issue is the successor of that declared row.
  • Related precedent: #6234 (tests/architecture host adaptation), #6007 (POSIX-only mode-000 checks), #5781 (umask-independent symlink checks).
  • The intended fix is test-only: guards/skips that keep Linux CI behavior unchanged.

JasonBuildAI avatar Oct 13 '26 04:10 JasonBuildAI