Skip to content

fix(firewall): cache the Windows binary as sfw.exe so the shims can run it - #24

Draft
Julian Gruber (juliangruber) wants to merge 1 commit into
ci/simulation-results-via-annotationsfrom
fix/windows-exe-binary
Draft

Julian Gruber (juliangruber) wants to merge 1 commit into
ci/simulation-results-via-annotationsfrom
fix/windows-exe-binary

Conversation

@juliangruber

@juliangruber Julian Gruber (juliangruber) commented Sep 30, 2026 •

Copy link
Copy Markdown
Member

Why

Found by the first dispatch of the CI simulation on main (run 36721798455): every Windows install through the current action failed, deterministically, while the pre-shim v1.3.2 action passed.

Runner Variant Runs OK
ubuntu-26.04 candidate (main) 10 10
ubuntu-26.04 baseline (v1.3.2) 10 10
windows-2025 baseline (v1.3.2) 10 10
windows-2025 candidate (main) 10 0
windows-11-arm candidate (main) 10 0

The install log:

'"C:\hostedtoolcache\windows\socket-firewall-free\1.15.3\x64\sfw"' is not recognized as an internal or external command,
operable program or batch file.

The binary is cached as sfw with no suffix. The .cmd shims the action writes run it through cmd.exe, which does not execute a suffix-less file, and neither does PowerShell. Bash on a Windows runner does, which is why sfw npm install typed in a workflow started fine: it then resolved npm to the shim, and the shim failed. So with the default shims: true, every Windows install via main has been broken since the shims landed in bad87d6 on Aug 4. Nobody hit it because no release has been tagged since March and current customer pins predate the shims.

What

Cache the file under FIREWALL_EXEC_FILE, sfw.exe on Windows and sfw elsewhere, the way PATCH_EXEC_NAME already does, and point the binary path (and therefore the shims) at it. FIREWALL_EXEC_NAME stays the bare name the release asset names are built from. One unit test. dist/ rebuilt.

Stacked on #23 so that dispatching the simulation on this branch produces a report.

Verification

Run 36723011554, the simulation dispatched on this branch, 3 iterations per runner:

Runner Variant Runs OK
windows-2025 candidate (this fix) 3 3
windows-11-arm candidate (this fix) 3 3
windows-2025 baseline v1.3.2 3 3
ubuntu-26.04 candidate 3 3
ubuntu-26.04 baseline v1.3.2 3 3

Windows goes from 0 of 10 on main to 3 of 3 here with only the file-name change.

🤖 Generated with Claude Code

…un it

Since the shims landed (bad87d6, Aug 4) every Windows install through
this action with the default `shims: true` has failed: the binary is
cached as `.../sfw` with no suffix, and the `.cmd` shims run it through
cmd.exe, which does not execute a suffix-less file ("is not recognized
as an internal or external command"). Bash on a Windows runner does, so
`sfw npm install` typed in a workflow started fine; it then resolved
`npm` to the shim, and the shim failed. The CI simulation on main showed
0 of 10 installs succeeding on windows-2025 and windows-11-arm against
10 of 10 for the pre-shim v1.3.2 action.

Cache the file under FIREWALL_EXEC_FILE, `sfw.exe` on Windows and `sfw`
elsewhere, the way PATCH_EXEC_NAME already does, and point the binary
path and therefore the shims at it. FIREWALL_EXEC_NAME stays the bare
name the release asset names are built from.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant