store: catalog fetch uses force-cache, so a rebuild can verify against a stale catalog #64
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Surfaced by
Author44band flagged for propagation byReviewer56r1during PR #62. Filed because it generalises well beyond that PR.The trap
apps/store/lib/catalog.tsfetches the catalog withcache: "force-cache". So a rebuild can serve a stale catalog and render a previous run's data.That is fine — arguably correct — for production builds, where the catalog is fetched once per deploy. It is a problem for verification, because it silently invalidates a check that looks conclusive.
Why it matters more than it sounds
Most PRs in this session's three waves were verified, at least in part, by reading storefront output:
/products.In every one of those, the reviewer or author changed a fixture, rebuilt, and read the result. With
force-cache, the first such rebuild after a fixture change can render the previous fixture — and the check passes or fails for the wrong reason. It fools you exactly once, which is the worst frequency: often enough to matter, rare enough to look like a flake.No agent was caught by it in a way that changed a verdict, as far as I can tell. That is luck, not process.
What to do
This is not obviously a code bug — the caching may be exactly what production wants. The deliverable is that the verification procedure stops being silently wrong. Options, in rough order of preference:
generatedAt, a build id, or an explicit revalidate), a stale read becomes impossible rather than merely unlikely..next/cache, vary the fixture URL, or set the relevant env). Any agent or human verifying storefront output needs this before they trust a rendered result.Option 2 is the minimum and should happen regardless of whether 1 or 3 is adopted.
Scope note
Do not change caching behaviour purely to make verification easier without confirming what production needs.
force-cacheon a static export fetched once per deploy is a reasonable choice; the defect is that nothing warns a verifier about it.Acceptance
The verification path is either provably fresh or explicitly documented as needing a cache defeat; anyone reading storefront output to verify a change can tell which fixture produced it.
yuris referenced this issue2026-08-28 01:53:47 +00:00
yuris referenced this issue2026-08-29 06:25:36 +00:00