You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(api): don't cache failure-fallback HTML on tree/readme partials #53
ww2.nemar.org/dataset/<id> shows "No description available" / "Manifest unavailable" on otherwise-healthy datasets (reproduced on on002778, but the bug is dataset-agnostic).
on every 200 response, including the empty fallback branches (renderNoManifest, renderReadme(null, null, ...)).
When the upstream data.nemar.org/<id>/v<x.y.z>/manifest.json fetch transiently times out from a cold Astro SSR isolate on CF Pages (the slow path is hot for any dataset whose central manifest workflow hasn't generated summary.json), the resulting empty-fallback HTML gets pinned at the CF edge for s-maxage=600 (fresh) + stale-while-revalidate=86400 (stale). Subsequent visitors keep seeing the broken state until the cache rotates.
A single cold-start failure can blank a dataset page for many hours.
Fix
On the empty/failure-fallback branches, send Cache-Control: no-store (or short max-age, no SWR) so a transient failure can't poison the edge. Keep the long s-maxage only on the success branch where the response is deterministic for the (id, version) pair.
Affected paths:
tree.ts line ~88: renderNoManifest(version) branch
readme.ts line ~124: renderReadme(source=null, ...) branch (empty source)
Activity
fix(api): no-store on tree/readme empty-fallback branches
review(#65): fix partial paths in namespace comment