From 94df72d9eb849f83dfe8ca07500df3f165ab1cf9 Mon Sep 17 00:00:00 2001 From: Neil <4138956+nwparker@users.noreply.github.com> Date: Thu, 13 Aug 2026 18:21:48 -0700 Subject: [PATCH] ci(windows): cover the worktree admin fingerprint on the Windows runner (#14378) The fingerprint gate added in #14207 reads Git's administrative layout directly -- `.git` as a file or directory, `commondir`, and per-worktree `HEAD`, `gitdir`, and `locked` -- instead of shelling out to `git worktree list`. That makes it depend on Windows path resolution, CRLF inside those files, and whether `worktree move`/`lock` and deleting a live checkout behave as they do on POSIX. PR CI runs the vitest suite on ubuntu-latest only, so none of that was exercised. Both suites were verified by hand on a real Windows host (Git 2.55.0.windows.3, Node 24.18.0) and pass 25/25, but nothing kept them passing. Add them to the existing curated `Test Windows-specific boundaries` step rather than standing up a new job: the `package (windows)` job already checks out and installs dependencies, so this costs only the tests themselves. --- .github/workflows/pr.yml | 2 ++ src/main/runtime/repo-worktree-admin-fingerprint.test.ts | 3 +++ src/main/runtime/worktree-scan-admin-fingerprint-gate.test.ts | 1 + 3 files changed, 6 insertions(+) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index ceb68feaa17..f36bb405e28 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -434,6 +434,8 @@ jobs: pnpm exec vitest run --config config/vitest.config.ts src/main/cli/wsl-cli-powershell-boundary.test.ts src/main/orca-profiles/profile-index-store.test.ts + src/main/runtime/repo-worktree-admin-fingerprint.test.ts + src/main/runtime/worktree-scan-admin-fingerprint-gate.test.ts src/shared/secure-file-fsync-flags.test.ts - name: Build package inputs diff --git a/src/main/runtime/repo-worktree-admin-fingerprint.test.ts b/src/main/runtime/repo-worktree-admin-fingerprint.test.ts index 15d4aad4484..a8f2fc9d8e4 100644 --- a/src/main/runtime/repo-worktree-admin-fingerprint.test.ts +++ b/src/main/runtime/repo-worktree-admin-fingerprint.test.ts @@ -1,5 +1,8 @@ // Real-binary coverage: the fingerprint's whole job is to predict what `git worktree list` would // report, so a mocked filesystem would only prove the assumptions, not the Git layout they model. +// Also listed in pr.yml's Windows boundary step: reading Git's admin layout directly depends on +// Windows path resolution, CRLF in `HEAD`/`gitdir`/`commondir`, and whether `worktree move`/`lock` +// and deleting a live checkout behave as they do on POSIX. The Linux shards cannot reach any of it. import { execFile } from 'node:child_process' import { mkdir, mkdtemp, realpath, rm, writeFile } from 'node:fs/promises' import { tmpdir } from 'node:os' diff --git a/src/main/runtime/worktree-scan-admin-fingerprint-gate.test.ts b/src/main/runtime/worktree-scan-admin-fingerprint-gate.test.ts index 05c0fe9cd6f..de97e461f8e 100644 --- a/src/main/runtime/worktree-scan-admin-fingerprint-gate.test.ts +++ b/src/main/runtime/worktree-scan-admin-fingerprint-gate.test.ts @@ -1,5 +1,6 @@ // The fingerprint's own behaviour is covered against real Git in repo-worktree-admin-fingerprint.test.ts. // This suite pins the cache wiring: when the probe may skip a `git worktree list`, and when it may not. +// Also listed in pr.yml's Windows boundary step, so the gate's repo-path handling stays honest there. import { beforeEach, describe, expect, it, vi } from 'vitest' const electronMocks = vi.hoisted(() => {