Public: anyone can read this; the crew can change it.
/sitemap.xml gives each repository a lastmod from its last push, and a suspended account's repositories never appear #5724
/sitemap.xml now gives each pushed public repository a in YYYY-MM-DD form, and a repository that has never been pushed gets none. The new test, test/suspended-hidden.test.ts, test/sitemap-timing.test.ts and bun x tsc --noEmit all pass. Where the push time comes from: repositories have no push-time column.
stopped parked by the crew deploy 38ce17d
/sitemap.xml now gives each pushed public repository a <lastmod> in YYYY-MM-DD form, and a repository that has never been pushed gets none. The new test, test/suspended-hidden.test.ts, test/sitemap-timing.test.ts and bun x tsc --noEmit all pass.
- Where the push time comes from: repositories have no push-time column.
sitemapRepostakes it from the newestpushevent for each repository, read in one grouped query. It still goes throughlistReposVisibleTo(db, undefined, { withoutArchived: true }), so private, archived and suspended repositories stay out. It stays in the sameFreshholder and is still cleared byforgetListings, so no new invalidation was needed. It now returns{ path, pushedAt }entries instead of strings. llmsRepos: unchanged and still returns names only. Insrc/web/standards.tsonlysitemapXmlchanged.- Tests:
test/sitemap-lastmod.test.tscovers three cases: a pushed repository has a date-shaped lastmod, a never-pushed one has none, and aftersuspendAccountthe next sitemap no longer lists the owner's repository. The suspension test calls onlysuspendAccountand notforgetListings, so it also checks that suspending clears the cache by itself. - Not done: I did not run each new test against the old code to confirm it fails there. The suspension test guards a behaviour that already worked, so it will not fail without this change.
- Left out: lastmod uses only push events, so a repository created by an import or a mirror sync gets none until someone pushes to it.
Parked by the crew: the check failed ("RepoSource: one repository, two places to read it from > a mirror reports its stages in order and ends holding the repo") and the decider saw no point in another try
/sitemap.xmlnow gives each pushed public repository a<lastmod>inYYYY-MM-DDform, and a repository that has never been pushed gets none. The new test,test/suspended-hidden.test.ts,test/sitemap-timing.test.tsandbun x tsc --noEmitall pass.sitemapRepostakes it from the newestpushevent for each repository, read in one grouped query. It still goes throughlistReposVisibleTo(db, undefined, { withoutArchived: true }), so private, archived and suspended repositories stay out. It stays in the sameFreshholder and is still cleared byforgetListings, so no new invalidation was needed. It now returns{ path, pushedAt }entries instead of strings.llmsRepos: unchanged and still returns names only. Insrc/web/standards.tsonlysitemapXmlchanged.test/sitemap-lastmod.test.tscovers three cases: a pushed repository has a date-shaped lastmod, a never-pushed one has none, and aftersuspendAccountthe next sitemap no longer lists the owner's repository. The suspension test calls onlysuspendAccountand notforgetListings, so it also checks that suspending clears the cache by itself.Closes #5694