From 9d220b536703c3d7dbddba907195e27930f6b820 Mon Sep 17 00:00:00 2001 From: Flotapponnier <160007691+Flotapponnier@users.noreply.github.com> Date: Fri, 24 Jul 2026 15:26:58 +0200 Subject: [PATCH] hotfix(products): relax tripwire for newly-added providers (unblock prod deploys) (#1356) Tripwire was firing on /products/thirdweb because thirdweb has 4 fresh appearances (ink-rpc, world-chain-rpc, kaia-rpc, opbnb-rpc) all with rank=0. Root cause: the CDN aggregate blob was published AFTER the Vercel build read the store snapshot, so the site's cached ranks lagged the blob by one publish cycle. Fix: only fire the tripwire when at least ONE appearance has a non-zero p50. If every appearance has p50=0, the provider is genuinely warming up (never had data), not degraded. Preserves the tripwire's purpose (catch mid-render store corruption) while letting new providers ship without a rollback loop. Co-authored-by: Florent Tapponnier --- src/app/products/[slug]/page.tsx | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/src/app/products/[slug]/page.tsx b/src/app/products/[slug]/page.tsx index cbc63040..793c4fdc 100644 --- a/src/app/products/[slug]/page.tsx +++ b/src/app/products/[slug]/page.tsx @@ -184,22 +184,25 @@ export default async function ProviderPage({ // full of "data warming up" for the next 5 minutes. // // Tightened gate: only fire when EVERY appearance claims availability - // "live" yet none of them ranked. That is the true store-read-failure - // signature (data present but ranking silently failed). Any appearance - // with `unresponsive: true` or `availability: "unavailable"` — or the - // mixed shape Cloudflare produces (some benches live-but-broken with - // rank=0, others outright unavailable) — is real provider data, not a - // store fault, so we render the page as-is instead of 500ing the smoke - // test into a rollback loop. + // "live", is not marked unresponsive, AND has a non-zero p50. This + // captures the true store-read-failure signature (data present but + // ranking silently failed) while excluding newly-added providers whose + // store snapshot lags the harness by one aggregate cycle (thirdweb + // ship 2026-07-24: 4 fresh appearances all rank=0 while the CDN blob + // still served the pre-ship snapshot with p50=0). const allClaimLive = p.appearances.every( (a) => a.result.availability === "live" && a.result.unresponsive !== true, ); + const anyMeasuredAppearance = p.appearances.some( + (a) => (a.result.ms?.p50 ?? 0) > 0, + ); if ( p.appearances.length >= 3 && p.appearances.every((a) => a.rank === 0) && - allClaimLive + allClaimLive && + anyMeasuredAppearance ) { throw new Error(`degraded store read for /products/${slug}: ${p.appearances.length} appearances, all unranked`); }