Skip to content

ci(release): wait for the installer fixture server to actually serve - #9

Merged
jiunbae merged 1 commit into
mainfrom
fix/release-fixture-server
Sep 22, 2026
Merged

jiunbae merged 1 commit into
mainfrom
fix/release-fixture-server

Conversation

@jiunbae

@jiunbae jiunbae commented Sep 22, 2026

Copy link
Copy Markdown
Member

Why

The v0.1.13 release run failed on package (x86_64-pc-windows-msvc), and failed again identically on re-run — so not a flake:

Invoke-WebRequest: install.ps1:43
No connection could be made because the target machine actively refused it.

Both installer rehearsals background a http.server and then sleep 1 before pointing the installer at it. Two problems:

  1. The wait is a guess. One second races the interpreter's startup.
  2. A dead server is invisible. Windows hides the server's output (-WindowStyle Hidden, no redirect), POSIX sends it to /dev/null. A server that never came up is indistinguishable from a broken installer — which is exactly how this presented.

Change

Wait for the port to accept, with a 30s budget, and fail with the server's captured output when it never does. Applied to both rehearsals; the POSIX one carries the same race and has simply been luckier.

On Windows, also refuse the Microsoft Store alias stub. It is named python, it sits on PATH, and it starts — so Start-Process succeeds and $server.HasExited stays false — while serving nothing. That matches the observed failure precisely. Resolving python/python3 past WindowsApps and capturing stderr turns it into a named error instead of a refused connection six seconds later.

Note on v0.1.13

The tag is already pushed and its release never published. Once this is on main, the release is re-run via workflow_dispatch with tag: v0.1.13 — that path takes the workflow definition from the default branch while still checking out the tag (RELEASE_REF), so the fix applies without moving or re-cutting the tag.

actionlint clean.

🤖 Generated with Claude Code

Both installer rehearsals start `http.server` in the background and then
`sleep 1` before pointing the installer at it. The Windows rehearsal
failed twice in a row on v0.1.13 with

  Invoke-WebRequest: No connection could be made because the target
  machine actively refused it.

and nothing else: the server's own output went to a hidden window, so a
server that never came up looked exactly like a broken installer.

Wait for the port to accept instead of guessing, and fail with the
server's output when it never does. Both rehearsals get it; the POSIX
one has the same race and has simply been luckier.

On Windows, also refuse the Microsoft Store alias stub. It is named
`python`, it is on PATH, and it starts — so `Start-Process` succeeds and
`$server.HasExited` stays false — while serving nothing, which matches
the failure exactly. Resolving `python`/`python3` past `WindowsApps` and
capturing stderr turns that into a named error rather than a refused
connection six seconds later.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@jiunbae
jiunbae merged commit 05c2a06 into main Sep 22, 2026
6 checks passed
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