Skip to content

Commit 345cf04

Browse files
committed
fix(ci): the Windows gate failed on its own cleanup after its verdict agreed
The gate did its job — "Windows agrees: all 11 mutations caught, each by the catcher its definition names" — and then failed the step after it, on git checkout -- docs/evidence/p022-stage2-1.result.json because at that commit the recorded result was not tracked yet, and `git checkout --` on an untracked pathspec is an error rather than a no-op. A job whose measurement had already succeeded reported red for a housekeeping line. Restore-or-remove now, so the step is correct whether or not the file is tracked at the commit under test, and the cleanup is turned into the assertion it was always meant to be: the step fails if this gate left a recorded result behind. That is the invariant worth having — one campaign, one recorded provenance — and it was previously implied by a command rather than checked. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CYLNQy6tLXqsV1CbuNqsSb
1 parent 060fbec commit 345cf04

1 file changed

Lines changed: 17 additions & 1 deletion

File tree

‎.github/workflows/ci.yml‎

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -393,9 +393,25 @@ jobs:
393393
# Left uncommitted on purpose: one campaign has one recorded provenance,
394394
# and it is the Linux run. A second file claiming the same campaign name
395395
# would make "which tree was measured" ambiguous.
396+
#
397+
# Restore-or-remove, because the recorded result is tracked at some
398+
# commits and not at others, and `git checkout --` on an untracked path
399+
# is an error rather than a no-op — which is exactly how the first
400+
# version of this step failed a job whose verdict had already agreed.
401+
# The assertion is the point, not the cleanup: the step fails if this
402+
# gate left a result behind.
396403
- name: Confirm nothing was recorded from this run
397404
if: always()
398-
run: git checkout -- docs/evidence/p022-stage2-1.result.json
405+
run: |
406+
f=docs/evidence/p022-stage2-1.result.json
407+
if git ls-files --error-unmatch "$f" >/dev/null 2>&1; then
408+
git checkout -- "$f"
409+
else
410+
rm -f "$f"
411+
fi
412+
test -z "$(git status --porcelain -- "$f")" \
413+
|| { echo "FAIL: the Windows gate left a recorded result behind"; exit 1; }
414+
echo "OK: the Windows verdict recorded nothing"
399415
400416
# P-022 step 7a (#260) — COMPARE MODE over the committed corpus: the FAST half
401417
# of #260's test matrix, and one leg of it. The five pinned OSS repositories,

0 commit comments

Comments
 (0)