Rotate every card URL past the corrupt ones

c1f17ef8fb68 · AtlantisPleb · · parent bfb558a956ba

Rotate every card URL past the corrupt ones

Fixing the rasterizer fixed the origin and changed nothing anyone had already
fetched. The version segment is a digest of the card's content, so a renderer
fix produces the identical URL, and the corrupt response was served with
`max-age=21600, immutable` -- which a browser will not revalidate and Slack
will not re-fetch. The site was correct and every reader still saw the break.

`template_revision` exists for exactly this and had never moved. Bumping it to
2 changes every card URL, so the next fetch is a miss everywhere at once
rather than a wait for six hours of TTL to drain.

The comment now says what the constant is for, because the failure was not
knowing there was a knob.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016o8HwTaqLKEWCHTjsjFtrB
Co-Authored-By
Claude Opus 5 (1M context) <noreply@anthropic.com>

Deploy story

What this commit did to the running system — joined from the forge receipt chain, the part a commit page elsewhere cannot show.

Not deployed through the forge lane

No push, promotion, build, or deploy receipt references this commit (receipts are scanned over a bounded recent window). Changes shipped by full node replacement carry their proof in the release gate receipt instead.

Changed files

  • modified lib/openagents_web/og.ex

Diff

1 file changed, +7 -1

lib/openagents_web/og.ex modified +7 -1

@@ -364,7 +364,13 @@ defmodule OpenAgentsWeb.OG do

364 364
    :crypto.mac(:hmac, :sha256, secret, "openagents-og-cards-v1")
365 365
  end
366 366
367
  defp template_revision, do: "1"
367
  # Bump when the rendering changes, not only when a card's content does. The
368
  # version segment is a content digest, so a fix to the renderer produces the
369
  # same URL as the bug did -- and every cache holding the bad bytes, including
370
  # Slack's and a reader's browser, keeps serving them under a `max-age=21600,
371
  # immutable` response that will not revalidate. Revision 2 is the corrupt-PNG
372
  # fix: cards rendered before it carried librsvg's stderr ahead of the image.
373
  defp template_revision, do: "2"
368 374
369 375
  defp base_url, do: String.trim_trailing(OpenAgentsWeb.Endpoint.url(), "/")
370 376

This page updates live while a promote is in flight · changelog