---
name: shell-bash-adds-pipefail-sigpipe
description: "Adding shell:bash to a GH Actions step silently adds -o pipefail; a tar|grep -q assertion then reds on tar's SIGPIPE 141 even though the check passed."
metadata: 
  node_type: memory
  type: project
  originSessionId: a6044c46-9fd0-4ab0-831a-cea2fc0b2b7d
  modified: 2026-08-02T22:57:01.730Z
---

Hertz near-miss on the golden/bench-wiring lane (2026-08-02): adding `shell: bash` to golden.yml's docs-bundle step would have injected GH Actions' default `-o pipefail` into a `tar ... | grep -q` assertion. `grep -q` exits on first match, tar takes SIGPIPE (exit 141), pipefail surfaces it — a green gate reddened by an edit that only meant to name a shell. The step keeps the runner default shell and carries an in-file comment saying why.

**Why:** GH Actions' explicit `shell: bash` runs `bash -e -o pipefail`, unlike the default shell. The failure is inverted signal — the assertion SUCCEEDED (grep matched) and that success is what kills tar.

**How to apply:** before adding `shell: bash` to an existing step, scan it for pipes where the reader can exit early (`grep -q`, `head`, `sed q`). Either keep the runner default, restructure to avoid early-exit readers, or explicitly handle 141. Related: [[render-not-read-pipefail]].
