From b9fa4932b951b886b8be97e8b6ee657457116edb Mon Sep 17 00:00:00 2001 From: Ben Brown Date: Thu, 16 Jul 2026 08:20:49 -0400 Subject: [PATCH] ci: the Windows refusal test failed because the refusal succeeded MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit GitHub's PowerShell step wrapper appends 'exit $LASTEXITCODE', so the inner preflight's deliberate exit 1 — the exact outcome the step had just asserted — leaked out as the step's own failure. Clear it with an explicit exit 0 once the refusal is verified. The 5.1 log from the failing run shows the ps1 behaving perfectly: STATUS=refuse, correctly composed em dash, 'unsupported host Windows' reason. Co-Authored-By: Claude Fable 5 --- .github/workflows/ci.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 98b4c55..7b62164 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -245,6 +245,10 @@ jobs: $joined = $out -join "`n" if ($joined -notlike "*STATUS=refuse*") { throw "no STATUS=refuse in output" } if ($joined -notlike "*unsupported host 'Windows'*") { throw "missing refusal reason" } + Write-Output "native refusal verified (5.1)" + # the runner appends `exit $LASTEXITCODE`; the refusal's exit 1 is + # the EXPECTED outcome we just asserted, so clear it explicitly + exit 0 - name: ps1 refuses natively (pwsh) shell: pwsh run: | @@ -252,6 +256,8 @@ jobs: $out | Write-Output if ($LASTEXITCODE -eq 0) { throw "preflight did not refuse under pwsh" } if (($out -join "`n") -notlike "*STATUS=refuse*") { throw "no STATUS=refuse in output" } + Write-Output "native refusal verified (pwsh)" + exit 0 # clear the asserted refusal's exit 1 (runner appends exit $LASTEXITCODE) - name: sh entry point also refuses here (Git Bash) shell: bash run: |