Skip to content

PR 404 follow-ups: generated publication cover + review-app env vars#405

Merged
byte-the-bot merged 2 commits into
implement/BLOG-b31d0c4d3b164931from
pr404-generic-og-and-review-app
Jun 5, 2026
Merged

PR 404 follow-ups: generated publication cover + review-app env vars#405
byte-the-bot merged 2 commits into
implement/BLOG-b31d0c4d3b164931from
pr404-generic-og-and-review-app

Conversation

@byte-the-bot

Copy link
Copy Markdown
Collaborator

Stacked on top of #404 (implement/BLOG-b31d0c4d3b164931). Three independent fixes flagged after reading PR 404:

1. Use the generated OG card for the publication cover

PR 404 currently uploads a static static/opengraph.png as the cover blob on the site.standard.publication record. This swaps that out for the same branded OG card system you already added in #399/#400/#401.

  • New SVG route: /og/publication/{key} — renders the publication's branded card using existing render_card_svg infra (new `render_publication_card_svg` helper, same template, no date).
  • Publication card stubs are read from publications.toml at compile time (mirrors the pattern in blog/mod.rs). Card tag is keyed off publication.key (`blog` → `POSTS`, with podcast/notes/newsletter mappings ready for future publications).
  • `standard_site init` now fetches the rasterized PNG via imgproxy (`{IMGPROXY_URL}/.../format:png/plain/{APP_BASE_URL}/og/publication/{key}.svg`) and uploads the bytes as the cover blob.
  • Dropped `cover_image` from `PublicationConfig` + `publications.toml`.

Sequencing note

The bluesky workflow `workflow_run`-chains off Fly Deploy, so on merge the new SVG route is live BEFORE init runs. Inline comment in `bluesky.yml` spells this out. `IMGPROXY_URL` is now passed to the init step.

2. Cross-check review-app boot env vars

`AppState::from_env` requires these at boot, but the review-app secrets line didn't pass them — so review apps would crash inside `*Config::from_env()` before serving any request:

  • `ANTHROPIC_API_KEY`
  • `LINEAR_CLIENT_ID` / `LINEAR_CLIENT_SECRET` / `LINEAR_WEBHOOK_SECRET`

All four added as `"FAKE"` to match the existing pattern.

3. (Reverted) Review-app memory bump

Originally bumped memory `512 → 2048`. Reverted after realizing the boot crashes were the env-var gap, not OOM. Keep at 512MB; revisit only if we see actual OOM signal.

Tests

  • 46/46 targeted tests pass (`og::`, `commands::standard_site::`, `templates::og::`)
  • New `og_publication_svg_returns_svg_for_known_key` + `og_publication_svg_404s_for_unknown_key` route tests
  • New `publication_cover_imgproxy_url_format` + trailing-slash test
  • `clippy -D warnings` clean, `rustfmt` clean

🤖 Generated with Claude Code

byte-the-bot and others added 2 commits June 4, 2026 07:46
- standard_site init now fetches the publication's branded OG card as a
  PNG through imgproxy (`/og/publication/{key}.svg` → imgproxy 1200×630
  PNG → upload as blob) instead of reading a static `opengraph.png`
  from disk. New `/og/publication/{key}` SVG route on the server owns
  the rendering; the CLI just wraps it in the same imgproxy URL format
  used by per-post cards. `publications.toml` loses the `cover_image`
  field; `PublicationConfig` no longer exposes it.

- Sequencing: the bluesky workflow `workflow_run`-chains off Fly
  Deploy, so on merge the new SVG route is live before init runs.

- Bump review-app memory 512MB → 2048MB and add the env vars currently
  missing from review-app secrets (boot-time required by
  `AppState::from_env`): `ANTHROPIC_API_KEY`, `LINEAR_CLIENT_ID`,
  `LINEAR_CLIENT_SECRET`, `LINEAR_WEBHOOK_SECRET`. Without these the
  app crashes during `*Config::from_env()` before serving any request.

- Wire `IMGPROXY_URL` secret into the bluesky workflow init step so
  init can rasterize the SVG card.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Boot crashes were the env-var gap (LINEAR_*, ANTHROPIC_API_KEY), not
OOM. Keep memory at 512MB; revisit only if we see actual OOM signal.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@byte-the-bot byte-the-bot merged commit 90c8d23 into implement/BLOG-b31d0c4d3b164931 Jun 5, 2026
6 checks passed
@byte-the-bot byte-the-bot deleted the pr404-generic-og-and-review-app branch June 5, 2026 11:18
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