From 0c88f08e9c879028ea227c8ee4dcbce75006ee39 Mon Sep 17 00:00:00 2001 From: vijayakrishnans Date: Fri, 13 Nov 2026 14:44:50 +0700 Subject: [PATCH] The web smoke asserts with here-strings, not a pipe into grep -q The smoke step runs under pipefail. `echo "${html}" | grep -q` on the home page (126 KB as built) fails with SIGPIPE (141) as soon as grep finds its match, so a product built from this baseline failed smoke 10 of 10 times on stage and prod while both sites served correctly (screwfast-site-and-docs-2, 2026-11-13). The three assertions now read here-strings, the runbook copy matches, and the placement test refuses a smoke that pipes into grep -q. Co-Authored-By: Claude Opus 5.5 --- apps/web/component.yaml | 8 +++++--- apps/web/docs/runbook.md | 2 +- testing/placement.test.sh | 2 ++ 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/apps/web/component.yaml b/apps/web/component.yaml index 7ac828b..1f68d8b 100644 --- a/apps/web/component.yaml +++ b/apps/web/component.yaml @@ -104,9 +104,11 @@ spec: # their search index are served, an unknown path answers the site's own # 404 page with a 404 status, and one under /fr/ the French 404 page # (lang="fr") with a 404 status (the Worker). `-L` follows the directory - # redirect (/products → /products/). Each response is buffered before grep - # so an early match cannot SIGPIPE curl. - smokeCommand: "html=$(curl -sfL \"${DEPLOYED_URL}/\") && echo \"${html}\" | grep -q 'hreflang=\"fr\"' && products=$(curl -sfL \"${DEPLOYED_URL}/products\") && echo \"${products}\" | grep -q '/products/item-a765/' && curl -sfL -o /dev/null \"${DEPLOYED_URL}/welcome-to-docs/\" && curl -sf -o /dev/null \"${DEPLOYED_URL}/pagefind/pagefind.js\" && test \"$(curl -s -o /dev/null -w '%{http_code}' \"${DEPLOYED_URL}/no-such-page\")\" = 404 && test \"$(curl -s -o /dev/null -w '%{http_code}' \"${DEPLOYED_URL}/fr/no-such-page\")\" = 404 && fr=$(curl -s \"${DEPLOYED_URL}/fr/no-such-page\") && echo \"${fr}\" | grep -q '