Skip to content

fix(smoke): a pipe into grep -q no longer fails a check that passed (0.23.0) - #24

Merged
vijayakrishnans merged 1 commit into
mainfrom
claude/smoke-no-pipefail
Nov 13, 2026
Merged

vijayakrishnans merged 1 commit into
mainfrom
claude/smoke-no-pipefail

Conversation

@vijayakrishnans

Copy link
Copy Markdown
Contributor

Why

screwfast-site-and-docs-2 deployed fine to stage and prod, and both sites serve correctly, but smoke failed 10 of 10 times on two separate attempts.

The cause is not propagation. The smoke step runs with set -uo pipefail, and screwfast's smoke command asserts with echo "${html}" | grep -q 'hreflang="fr"'. The home page is 126 KB. grep -q exits at the first match in <head>, echo dies of SIGPIPE writing the rest (exit 141), and pipefail fails the check. It fails on every attempt, so the retry budget only delays the red.

About 30 baselines' component.yaml files use | grep -q. Each one breaks as soon as the page it checks passes 64 KiB.

What

In cloudflare-worker, cloudflare-worker-turbo and cloudflare-workers-assets-turbo verify-deploy:

  • Each smoke attempt runs in a subshell with set +o pipefail. A failed fetch still fails, because grep gets no input.
  • Each failed attempt logs its exit code and names SIGPIPE when the code is 141. Before this change the log said only "failed".
  • Stack version bumped to 0.23.0.

The cloudflare-pages and cloudflare-pages-turbo smoke steps don't set pipefail and are unchanged.

Verified

  • scripts/verify.sh passes.
  • The patched wrapper with screwfast's real smoke command against the live prod site passes. The same command under the old wrapper exits 141 every time.
  • A broken assertion (grep -q no-such-text) still fails: failed (exit 1).

Consumers pick this up by bumping their stack-tectonic OCI ref to 0.23.0 after the release.

🤖 Generated with Claude Code

…0.23.0)

The worker, worker-turbo and workers-assets-turbo verify-deploy jobs ran the
product's smokeCommand under `set -o pipefail`. Every baseline asserts with
`echo "$html" | grep -q x` or `curl | grep -q x`; grep -q exits at its first
match, the writer dies of SIGPIPE (141), and pipefail turns that into a
failure. Once the page outgrows the 64 KiB pipe buffer this fails on every
attempt, so the retry budget only delays the red: screwfast's 126 KB home
page failed smoke on stage and prod while both sites served correctly.

Each attempt now runs in a subshell with pipefail off (a failed fetch still
fails: grep sees no input), and every failed attempt logs its exit code,
naming SIGPIPE when it is 141.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-13T07:45:40.628024Z c0f6d84 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c0f6d846e2

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

# attempt, once the page outgrows the 64 KiB pipe buffer. Without pipefail
# a failed fetch still fails: grep sees no input and finds nothing.
smoke() (
set +o pipefail

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve upstream failures when suppressing SIGPIPE

When a supplied smokeCommand pipes a fetch into grep -q, a fetch that emits matching content and then fails can be treated as successful: this disables pipefail, so grep's zero status hides the fetch failure and the deployment passes smoke. Preserve non-SIGPIPE producer failures while ignoring the expected broken-pipe status; the same change appears in the turbo and assets-turbo jobs.

Useful? React with 👍 / 👎.

This was referenced Nov 13, 2026
This was referenced Nov 13, 2026
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