fix(release_radar): prevent 300s timeout and match site output schema - #4
Merged
Conversation
Bug 1 (timeout): the daily cron made ~220 sequential OpenAI calls
(22 techs x up to 5 releases x 2 prompts) and hit the 300s Lambda
timeout, so it never uploaded. Now summarize only the latest release
per technology and collapse the summary+details prompts into a single
OpenAI call (split on a delimiter), cutting calls from ~220 to ~22.
Bug 2 (schema): emit the shape the site renders —
{updated_at, categories: [{name, icon, category, releases}]} with each
release {version, date, summary, details} where details is a
newline-joined STRING, not a list. Map published_at -> date. The site
resolves the icon as categoryIcons[icon] ?? categoryIcons[name], so
icon is a KEY string (per-tech legacy key like 'nodejs'/'react', else
the category name) — not an emoji literal.
Add offline unit tests (mocked OpenAI/S3) asserting the schema.Uh oh!
There was an error while loading. Please reload this page.
2 tasks
datj9 added a commit
that referenced
this pull request
Jul 11, 2026
Bug 1 (timeout): the daily cron made ~220 sequential OpenAI calls
(22 techs x up to 5 releases x 2 prompts) and hit the 300s Lambda
timeout, so it never uploaded. Now summarize only the latest release
per technology and collapse the summary+details prompts into a single
OpenAI call (split on a delimiter), cutting calls from ~220 to ~22.
Bug 2 (schema): emit the shape the site renders —
{updated_at, categories: [{name, icon, category, releases}]} with each
release {version, date, summary, details} where details is a
newline-joined STRING, not a list. Map published_at -> date. The site
resolves the icon as categoryIcons[icon] ?? categoryIcons[name], so
icon is a KEY string (per-tech legacy key like 'nodejs'/'react', else
the category name) — not an emoji literal.
Add offline unit tests (mocked OpenAI/S3) asserting the schema.
Co-authored-by: Dat <dat.nguyen@ringkas.co.id>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two bugs (both make this daily cron effectively broken)
Discovered while re-invoking the Lambdas to verify #3.
Bug 1 — times out every run, never uploads
release_radar processed ~22 technologies × up to 5 releases × 2 sequential OpenAI calls each ≈ 220 calls. CloudWatch shows it hitting the 300s Lambda timeout (
Duration: 300000ms) every invocation — killed before the S3 upload. This is why it "never produced output."---DETAILS---delimiter, split deterministically.Bug 2 — output schema didn't match the site
Emitted
{generated_at, categories: {dict}, technologies, details: [list]}, butsite/src/pages/index.astroreads{updated_at, categories: [array of {name, icon, category, releases}], release.details: string, release.date}.updated_at+categoriesas a list of{name, icon, category, releases}.release.detailsis now a string (newline-joined bullets);datemapped frompublished_at(YYYY-MM-DD).iconis the correct key string into the site'scategoryIconsmap (e.g.nodejs,react, or the category name likeBuild Tools) — verified against the site'scategoryIcons[category.icon] ?? categoryIcons[category.name] ?? '📋'lookup and the seed file convention. NOT an emoji literal.Test plan
data/release-radar.jsonwith the correct shapeBuilds on #3 (S3 key now
data/release-radar.json). No infra change.