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 #5760
Check · Review · Land · Live done — Landed and live in production.
`/sitemap.xml` now gives each repository a `<lastmod>` from its last push. A suspended account's repositories are left out.
shipped production is serving it deploy f18c0e5
/sitemap.xml now gives each repository a <lastmod> from its last push. A suspended account's repositories are left out.
The branch already held this change. The earlier check failure was in RepoSource … a mirror reports its stages in order and ends holding the repo, a test this change doesn't touch. I made no new code changes and re-ran only the issue's checks, which pass. I did not re-run the RepoSource test, and the push was a no-op because the branch was already up to date. The forge will run the full check on it again.
- What changed:
sitemapReposinsrc/core/listings.tsreturns each repository's last push time beside itsowner/name. It is still held in the sameFreshholder, cleared byforgetListings, and read throughlistReposVisibleTo(db, undefined, { withoutArchived: true }), which already hides private, archived and suspended repositories.llmsReposstill returns names only.sitemapXmlinsrc/web/standards.tswrites<lastmod>asYYYY-MM-DD, and a repository with no push gets none. - Tests: the new
test/sitemap-lastmod.test.tscovers three cases: a pushed public repository has its lastmod, a never-pushed one has none, and after its owner is suspended the next/sitemap.xmlno longer lists it. It,test/suspended-hidden.test.tsandtest/sitemap-timing.test.tspass together (13 tests), andbun x tsc --noEmitis clean. - Left out:
llmsTxtand its timing (#5376), as the issue asked. - Try it:
bun test test/sitemap-lastmod.test.ts, or fetch/sitemap.xmlon the preview and look for<lastmod>under each<url>.
/sitemap.xml now gives each repository a <lastmod> taken from its last push (date only). A repository that has never been pushed to gets no <lastmod>.
I merged main into the branch and pushed it. The only conflict was in src/web/standards.ts, in the sitemap's URL list. I kept both sides: the /explore entry that main added and the <lastmod> rows from this branch.
The type check is clean, and the 54 tests in the 7 files that mention the sitemap pass. The full bun test run hit my 120-second limit and I did not wait for it to finish, so the forge's check on this push is the first full run.
Approved. sitemapRepos now returns path plus last-push time, still cached in the same Fresh holder, and still reads through listReposVisibleTo, so private, archived and suspended repositories stay out. The lastmod is date-only and omitted for never-pushed repositories. The three tests cover pushed, never-pushed and suspended, and each would fail without the change. No web UI, tty or security surface is touched. The preview has no public repositories, so the lastmod could not be seen there; the tests cover it. Two things I would do next: (1) the push-time query scans the whole event table once a minute, so add an index on event(kind, repo_id, created_at) if that table grows large; (2) mention lastmod in the README section that describes the sitemap.
/sitemap.xmlnow gives each repository a<lastmod>from its last push. A suspended account's repositories are left out.The branch already held this change. The earlier check failure was in
RepoSource … a mirror reports its stages in order and ends holding the repo, a test this change doesn't touch. I made no new code changes and re-ran only the issue's checks, which pass. I did not re-run theRepoSourcetest, and the push was a no-op because the branch was already up to date. The forge will run the full check on it again.sitemapReposinsrc/core/listings.tsreturns each repository's last push time beside itsowner/name. It is still held in the sameFreshholder, cleared byforgetListings, and read throughlistReposVisibleTo(db, undefined, { withoutArchived: true }), which already hides private, archived and suspended repositories.llmsReposstill returns names only.sitemapXmlinsrc/web/standards.tswrites<lastmod>asYYYY-MM-DD, and a repository with no push gets none.test/sitemap-lastmod.test.tscovers three cases: a pushed public repository has its lastmod, a never-pushed one has none, and after its owner is suspended the next/sitemap.xmlno longer lists it. It,test/suspended-hidden.test.tsandtest/sitemap-timing.test.tspass together (13 tests), andbun x tsc --noEmitis clean.llmsTxtand its timing (#5376), as the issue asked.bun test test/sitemap-lastmod.test.ts, or fetch/sitemap.xmlon the preview and look for<lastmod>under each<url>.Closes #5694