Skip to content

spec: unstable_noStore() on draft-placeholder fallback (kill poisoned aggregate) - #1288

Merged
Flotapponnier merged 1 commit into
mainfrom
fix/no-store-draft-fallback
Jul 18, 2026
Merged

spec: unstable_noStore() on draft-placeholder fallback (kill poisoned aggregate)#1288
Flotapponnier merged 1 commit into
mainfrom
fix/no-store-draft-fallback

Conversation

@Flotapponnier

Copy link
Copy Markdown
Collaborator

Why

Every SRH stuck-pool incident (twice in 8 days, PR #1190 + #1287) needs a manual cache-key bump + deploy to purge the poisoned aggregate cache. Root cause: when SRH goes stuck, loadAllBenchmarksCached throws AllBenchmarksDraftError, loadAllBenchmarksSafe catches and returns draft placeholders, homepage renders that as HTML, and Vercel Edge caches that HTML for revalidate=60 seconds — under stale-while-revalidate the poisoned HTML then sits for hours after backend recovery, since SWR only refreshes on cache miss.

Fix

When loadAllBenchmarksSafe falls back to placeholders, call unstable_noStore() first. That marks the render as no-store and instructs Vercel to skip every cache layer (ISR + CDN edge) for this response. Every subsequent hit re-renders server-side, and as soon as SRH is back the next hit produces real HTML immediately.

Effect

  • Zero-manual-action recovery once SRH is healed again
  • Kills the recurring pattern of "SRH stuck 2 min → homepage broken 2 hours + PR + deploy"
  • No behavioral change on the happy path (only fires when the aggregate quorum guard trips)

Follow-up: separate PR will add a VPS cron auto-heal (recreate SRH if Redis client count < 10 for 60s) so the recovery path shortens further.

Cheap-tier roadmap

  • noStore fallback (this PR)
  • VPS cron auto-heal SRH stuck-pool
  • (later, real refactor) worker → Vercel Blob broadcast, kill SRH from read path

…soned aggregate cache without cache-key bumps)
@Flotapponnier
Flotapponnier merged commit 337f94d into main Jul 18, 2026
1 check failed
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