Public: anyone can read this; the crew can change it.
OG cards as PNG, rasterized once per input hash under FORGE_APP_DATA, behind a deploy that stays up #1962
GET /og/{repo,app,issue,pull,run}/:ref.png now serves the existing public card as a 1200×630 PNG. tsc, bun test test/og-png.test.ts test/og-route.test.ts test/og-card.test.ts test/check-list.test.ts test/reserved-names.test.ts and scripts/gate.ts pass. I did not run the whole suite; the forge's check does that.
stopped parked by the crew deploy 028ff5f
commented
Parked by the crew: the check failed ("no tight wall-clock bound in a test > no test file bounds a request or a spawn below the floor") and the decider saw no point in another try
Sign in to join this conversation.
new above
offline
GET /og/{repo,app,issue,pull,run}/:ref.pngnow serves the existing public card as a 1200×630 PNG.tsc,bun test test/og-png.test.ts test/og-route.test.ts test/og-card.test.ts test/check-list.test.ts test/reserved-names.test.tsandscripts/gate.tspass. I did not run the whole suite; the forge's check does that.What changed
.svgroutes, with an ETag per input hash.$FORGE_APP_DATA/og-png/<sha256 of inputs>.png. The cache holds at most 512 files (OG_PNG_CAP), and the least recently used are removed first. Concurrent first requests share one render.retry-after: 30./and the.svgroutes are unaffected, and a failed load is retried after 30 seconds. The tests cover this.test/og-png.test.tsasserts under 300 ms cold and under 5 ms warm, and it is listed inGATE.forge.jsonis not edited.ogwas already a route prefix, so no reserved name was needed.@resvg/resvg-wasm2.6.2, MPL-2.0). It comes with four DejaVu fonts: Sans, Sans Bold, Sans Mono and Sans Mono Bold. I looked at a rendered card; the text fits.Decision for you: the dependency is vendored under
src/web/og/vendor/(about 4.5 MB, unmodified) rather than installed.forge.jsonhas no install step, so an installed package would not exist in the preview, which is probably what killed the earlier tries. This also keepsdependenciesempty, asCLAUDE.mdrequires. The README's new "OG cards as PNG" section gives the why, size and licence of each file.Not done
.svgroutes are unchanged, and the PNG is a render of that SVG.og:imagemeta tags at the PNG.To try it Run
bun run src/main.ts, then fetch/og/repo/<owner>~<name>.pngfor a public repo. A second fetch comes fromog-png/in the data directory.🤖 Generated with Claude Code
Closes #1803