From 9c2d44253d572edb378a33aa7025a1e64b1a71b4 Mon Sep 17 00:00:00 2001 From: Garry Tan Date: Sat, 15 Aug 2026 18:43:01 -0700 Subject: [PATCH] test(windows): round-4 curation (spawnSkill env, symlink fixtures) + shard-log artifact MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Shard 2 ran all 132 files with zero (fail) lines yet bun exited 1 — unhandled errors in a shape neither counter names, and the Windows lane had no log artifact to attribute them. Statically attributed and excluded: browser-skill-commands (spawnSkill spawns bun with a constructed env; resolution fails under Windows spawn) and security-audit-r2 (evil-link symlink fixtures need Developer Mode). The lane now uploads its shard logs on failure like free-tests.yml, with os.tmpdir() pointed at runner.temp so the glob can find them. --- .github/workflows/windows-free-tests.yml | 15 +++++++++++++++ scripts/test-free-shards.ts | 10 ++++++++++ 2 files changed, 25 insertions(+) diff --git a/.github/workflows/windows-free-tests.yml b/.github/workflows/windows-free-tests.yml index b745be611..3ac871e5d 100644 --- a/.github/workflows/windows-free-tests.yml +++ b/.github/workflows/windows-free-tests.yml @@ -109,5 +109,20 @@ jobs: # growing/pruning Windows coverage is one list, not two. If a test is # red here because it's genuinely POSIX-bound, add it to the curation # exclusions — don't resurrect a hand list in this file. + env: + # Point os.tmpdir() at the runner temp so the shard logs land + # somewhere the artifact step below can glob. + TEMP: ${{ runner.temp }} + TMP: ${{ runner.temp }} run: bun run test:windows shell: bash + + # Same diagnosability contract as free-tests.yml: a red lane must + # carry the WHY (the runner's quiet console names files, not causes). + - name: Upload shard logs on failure + if: failure() + uses: actions/upload-artifact@v4 + with: + name: windows-free-test-shard-logs + path: ${{ runner.temp }}/gstack-free-test-*.log + if-no-files-found: ignore diff --git a/scripts/test-free-shards.ts b/scripts/test-free-shards.ts index f40219ded..386b25a29 100755 --- a/scripts/test-free-shards.ts +++ b/scripts/test-free-shards.ts @@ -238,6 +238,16 @@ export const KNOWN_WINDOWS_INCOMPATIBLE: Array<{ file: string; reason: string }> file: 'test/question-preference-hook.test.ts', reason: 'spawns the PreToolUse preference hook (shebang script) directly; Windows spawn cannot exec it', }, + // Round-4 census (PR #2593 run 31920052810): unhandled errors with no + // (fail) lines — attributed statically (the lane had no log artifact yet). + { + file: 'browse/test/browser-skill-commands.test.ts', + reason: 'spawnSkill spawns bun with a constructed env — bun resolution fails under Windows spawn (unhandled, no (fail) line)', + }, + { + file: 'browse/test/security-audit-r2.test.ts', + reason: 'symlink-attack fixtures (evil-link) need Developer Mode CI runners lack; expect(toThrow) fires unhandled on Windows', + }, ]; // Force-include overrides: files a WINDOWS_FRAGILE_PATTERNS regex excludes for