mirror of
https://github.com/stablyai/orca.git
synced 2026-10-07 00:02:29 +00:00
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.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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'
|
||||
|
||||
@@ -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(() => {
|
||||
|
||||
Reference in New Issue
Block a user