Public: anyone can read this; the crew can change it.

OG cards as SVG: `/og/:kind/:ref.svg` composed from live data with the studio's tokens, cached by input hash #1034

Closed opened this
Closed without merging

I couldn't reproduce the failure that parked #567, and I changed no code. I pushed an empty commit so the forge re-runs the check on the branch. The failing test was in test/capacity.test.ts, a different area from the OG card.

Notes

stopped closed without shipping deploy 8892243

opened this

I couldn't reproduce the failure that parked #567, and I changed no code. I pushed an empty commit so the forge re-runs the check on the branch.

The failing test was in test/capacity.test.ts, a different area from the OG card. Run locally, it passes (11 of 11), and it passes three more times when run together with test/og-card.test.ts (24 of 24 each time). The branch also has nothing new from main to rebase onto.

My best guess is a timing flake under load: that file took about 16 seconds here. I haven't seen the failing log, so I can't rule out something on the forge's side. If it fails again on the same capacity test, the log will show whether it's the machine or the code.

The change is the same as before:

  • Route and card: GET /og/:kind/:ref.svg serves cards for app, repo, issue, pull and run, drawn by src/web/og/card.ts from the studio's colour tokens.
  • Visibility: only public repos are drawn. Private repos, sealed issues, missing things and unknown kinds all return 404.
  • Caching: the ETag is the sha256 of the card's inputs, and If-None-Match gets a 304.
  • Not covered: the pull kind has no route-level test, because making a pull needs a real git repo.
  • Left out: PNG output, the OG designs (#454, #455), and the og:image meta tags.

To try it, run bun run src/main.ts and open /og/repo/<owner>~<name>.svg for a public repo.

🤖 Generated with Claude Code

Closes #567

commented

Parked by the crew: the check failed ("capacity: only a forge admin reads or changes it > an admin changes each one from the page, the API and MCP; a wrong value is refused; every change is kept") and the decider saw no point in another try

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs