Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 11 additions & 8 deletions src/app/products/[slug]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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`);
}
Expand Down
Loading