fix(ci): stop summary bookkeeping from making a tui release unpublishable

Merged
TE
2mo ago
+125-4

cmux-tui v0.13.0 was built, packaged, verified and attested, and never reached npm or PyPI. Neither registry has it today — I checked both directly:

registry.npmjs.org/cmux   0.13.0 published? False
pypi.org/pypi/cmux/json   0.13.0 published? False

What happened

In run 32998045028 every build, package, verify and attest job succeeded. The dispatch step then ran 18:31:03 → 18:35:50 and failed. After dispatching both publishers it looked up their run ids for the step summary, with a 300s budget each, and return 1 when a lookup timed out — under set -euo pipefail that fails the step, so the run's conclusion became failure.

Both publishers had already started. Each gives the dispatching run 120s (for _ in {1..24} × sleep 5) to reach completed, then refuses to publish unless its conclusion is success:

if [[ "$artifact_conclusion" != "success" ]]; then
  echo "artifact run $ARTIFACT_RUN_ID concluded $artifact_conclusion" >&2
  exit 1

So the dispatcher held itself open for longer than the publishers were willing to wait, and then concluded in the one state they reject.

runstepwindowresult
32998045028 releaseevery build/package/verify/attest job—success
32998045028Dispatch registry publishers18:31:03 → 18:35:50 (287s)failure → run failure
33000114554 npmRequire successful verified artifact run18:33:05 → 18:35:17 (132s)failure, publish skipped
33000117175 pypisame18:33:05 → 18:35:16failure, publish skipped
33000849343 npm retry @18:39same1 secondfailure — the run was red by then, so the conclusion gate rejected it instantly

The one-second retry is the part worth internalising: once the artifact run is red, those artifacts are permanently unpublishable through this path. They cut v0.13.1 eleven minutes later.

This was half-fixed already

The workflow carries a comment about it:

Discovery only — NEVER wait for the publisher's conclusion here: each publisher's validate-version step waits for THIS run to conclude successfully, so a dispatcher that watches the publisher deadlocks the release (both sides poll each other; the publisher's shorter timeout loses). Broke 0.13.0

The wait on the publisher's conclusion was removed. The 300s wait for its mere existence was left in, and it is long enough to lose the same race by itself — twice over, since it is 300s per publisher and there are two.

Resulting behavior

Discovery only decorates this run's summary. It now shares one 45s budget across both lookups instead of 300s each, and a lookup that gives up emits a ::warning::, notes it in the summary, and continues rather than failing the step. The publishers were dispatched either way and validate themselves — same artifact run id, same tag and SHA checks, same gated environments.

Nothing about what gets published, or the conditions under which it is published, changes.

Validation

Two commits, per the repository's regression policy:

  1. b1f0cb3 adds tests/test_tui_publish_dispatch_budget.py only — 5 assertions fail against the current workflow.
  2. 137ca70 applies the fix — all pass.

The test pins the invariant, not the constants: it parses the publishers' {1..N} × sleep M wait out of their own files and requires the dispatcher's shared budget to fit inside the shortest one twice over, so changing either side re-checks the relationship. It also asserts the lookup cannot return non-zero and that giving up is still reported.

shellcheck --shell=bash on the rewritten step is clean, and the workflow parses.

Not verified by me: a real release. That needs a cmux-tui-v* tag cut, so the first true proof is the next one.

Related, not fixed here

sdk-release-cut.yml gates crates.io, npm and PyPI publication on verify-go-tag, which resolves a module through proxy.golang.org — so three registries block on Go module-proxy indexing. That workflow has never run (total_count: 0), so it is a design risk rather than an observed failure, and it belongs in its own change.

🤖 Generated with Claude Code


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.


Summary by cubic

Fixes a race in the cmux-tui release workflow that made cmux-tui v0.13.0 permanently unpublishable even though every build, package, verify, and attest job succeeded. The dispatcher waited up to 300s per publisher to look up their run IDs for the step summary, while each publisher gives the dispatcher only 120s to complete and then refuses to publish unless its conclusion is success; a timed-out lookup failed the step under set -euo pipefail, reddening the run and blocking publication of already-built artifacts.

Bug Fixes

  • Discovery now shares one 45s budget across both lookups instead of a 300s per-publisher budget.
  • A lookup that times out emits a ::warning::, notes it in the step summary, and continues instead of failing the step.
  • Adds a regression test that the budget must fit inside the shortest publisher wait even if both lookups use it, and that losing a lookup must not fail the run.

Publication conditions themselves are unchanged: publishers are dispatched as before and validate themselves.