Repository navigation
fix(seo): cache the sitemap for hours and close the games launch review - #62
Merged
Merged
Conversation
…hour cache rule The list now holds IGDB game ids, so a days lifetime outlived the Twitch Developer Services Agreement's 24 hour caching clause that spec 0032 AC-11 applied to every other IGDB read. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The game page passes IGDB art to catalogMetadata and shareMetadata, so the comments on their image fields no longer name TMDB alone. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…d accept 0032 The sitemap holds IGDB ids, so a complete list lives hours to stay inside the 24 hour caching clause; 0016 notes the change to its AC-8. G10 is done, so 0032 moves to Accepted. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
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 free
to 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.
What
This follows up on the fresh model review of the games launch (PR #61). A complete sitemap is now cached for
hours, notdays, so the IGDB game ids in it stay within Twitch's 24 hour caching limit. The share image doc comments now say the image can come from TMDB or IGDB. G10 and spec 0032 are marked done and accepted.Why
The review in docs/reviews/2026-10-27-feat-games-launch.md raised two minor findings:
hoursbecause the Twitch Developer Services Agreement limits a cached copy of IGDB data to 24 hours (spec 0032, AC-11). But the sitemap's outer cached scope, which now holds IGDB ids, still lived fordays.imagedoc comments inlib/seo/metadata.tsstill said TMDB only, though the game page passes IGDB art.Spec 0032 AC-7 is amended to record the
hourslifetime, and spec 0016 (which first setdays) carries a matching amendment.Changes
Sitemap cache lifetime
app/sitemap.ts: when every read succeeds,cacheLife("hours")replacescacheLife("days"). A partial list still lives forminutes. The JSDoc says why.app/sitemap.test.ts: the AC-8 test now expects[["hours"]]and points to spec 0032 AC-11. This also fills the coverage gap the review named (nothing asserted the outercacheLifefor a complete list).Doc comments
lib/seo/metadata.ts:SITE_CARD_PATH,CatalogMetadataInput.image,siteCardUrlandshareMetadatanow say "TMDB or IGDB" or "catalog image".lib/seo/AGENTS.md: the sitemap cache rule sayshoursand gives the reason.Specs, scope and records
doneanchor.dayschanged tohoursin AC-8, the response table, the value sourcing table and build plan step 6.verify.md: the AC-12 (no flag) and AC-15 (production launch) checks are ticked.docs/scope/games.md: G10 set todone, with Build, Verify and Review ticked.docs/reviews/2026-10-27-feat-games-launch.md.How to test / verify
pnpm test. Thenapp/sitemap.test.tsshould pass "keeps a complete list for hours" (cacheLifecalled once with"hours") and the existing "minutes" case on a failed read.pnpm typecheckandpnpm lint.VERCEL_ENV=production NEXT_PUBLIC_SITE_URL=<url> pnpm buildand open/sitemap.xml. It should still list games in the same order. Only the cache lifetime changes.Risk & rollout
Low risk, no migrations, no flags. The only runtime change is a shorter cache on
/sitemap.xml, so it is rebuilt more often. That means a few more TMDB and IGDB reads per day, which share cache entries with the landings. The other review nits (metadata.ts:114wording, the footer logoalt, theparseSearchParamsJSDoc, thenavbar-search.tsxcomment wrap) are left as they are.Notes for reviewers
lib/seo/AGENTS.md.popularTitleIdsJSDoc inapp/sitemap.ts, one line runs past the usual wrap width. A rewrap would be a cosmetic follow up.🤖 Generated with Claude Code