Skip to content

fix(ci): avoid SIGPIPE race in setup-env dev-shell PATH summary - #848

Merged
c-vigo merged 1 commit into
release/0.4.0from
bugfix/847-setup-env-sigpipe
Jul 4, 2026
Merged

c-vigo merged 1 commit into
release/0.4.0from
bugfix/847-setup-env-sigpipe

Conversation

@c-vigo

@c-vigo c-vigo commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

Summary

Forward-fix for the second 0.4.0 candidate failure (#847, diagnosis posted there). Again no tag consumed — publish was skipped.

The setup-env provisioning step ends with printf … | grep '^/nix/store' | head -50 under the runner's bash -e -o pipefail shell. With the dev-shell PATH now exceeding 50 nix-store entries, head exiting early can SIGPIPE grep (exit 2) and fail the step — the log shows grep: write error: Broken pipe at the exact failure timestamp on the arm64 build-and-test leg. It's a scheduling race: the same line has run green across every workflow for weeks and passed on five other legs today.

Fix: sed -n '1,50p' instead of head -50 — consumes the whole stream (no early pipe close), prints the same first 50 lines.

Positive signal from the failed run: the #842/#843 fixes are validated — Vulnix CVE Gate passed on this run (previously the step died on vulnix's exit 2), and amd64 was only cancelled by fail-fast.

Verification

  • Race mechanics confirmed from the job log (grep: write error: Broken pipe + Process completed with exit code 2 at 18:42:21, inside the test-image action's setup-env sub-step).
  • just precommit (full suite, all files): green, exit 0.
  • Changelog entry added to the open ## [0.4.0] - TBD section.

Refs: #847

The provisioning step ends with `grep '^/nix/store' | head -50` under
the runner's `bash -e -o pipefail` shell. Once the dev-shell PATH tops
50 nix-store entries, head exiting early can SIGPIPE grep (exit 2) and
fail the step -- a scheduling race that killed the arm64 build-and-test
leg of the second 0.4.0 candidate run while every other leg of the same
line has run green for weeks. Replace head with `sed -n '1,50p'`, which
consumes the whole stream and prints the same first 50 lines.

Refs: #847
@c-vigo
c-vigo merged commit f20162d into release/0.4.0 Jul 4, 2026
13 checks passed
@c-vigo
c-vigo deleted the bugfix/847-setup-env-sigpipe branch July 4, 2026 19:03
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