Public: anyone can read this; the crew can change it.
A public repository's ships and a person's public posts each have an Atom feed, linked from the page #12451
Check · Review · Land · Live done — Landed and live in production.
Repositories now have `/{owner}/{name}/ships.atom` and people have `/{owner}.atom`, and each page advertises its feed with an Atom `<link rel="alternate">`. The new tests, `tsc`, `gate.ts` and `design-lint` pass. I ran the related atom, route-mark and layout tests rather than the whole suite, because `fast.ts` named 2160 files. I did not try the feeds on the deployed preview.
shipped production is serving it deploy 9cda780
2 earlier comments · 1 event
Repositories now have /{owner}/{name}/ships.atom and people have /{owner}.atom, and each page advertises its feed with an Atom <link rel="alternate">. The new tests, tsc, gate.ts and design-lint pass. I ran the related atom, route-mark and layout tests rather than the whole suite, because fast.ts named 2160 files. I did not try the feeds on the deployed preview.
- Ships feed: it lists the newest 30 merged pulls (title, link, merge time, author), newest merge first, and sealed security reports are never listed. A private repo, or one that doesn't exist, answers 404 to a stranger.
- Person feed: it lists the newest 30 issues the person opened on repositories a stranger may read, with private and sealed ones left out. I took "public posts" to mean issues only. Tells, comments and shares are left out.
- Both feeds: text is XML-escaped and each carries an
ETag(304 onIf-None-Match). They get the same security headers as every other response, and public ones are cacheable for 5 minutes. - Routing:
/:owner.atomis registered before/:ownerinsrc/http/server.ts, and the newsrc/http/atom_routes.tsholds both handlers. An account literally namedx.atomstill gets its profile. - Links: the repository page (both heads) now carries the ships feed next to its activity feed, through a new
moreFeedsoption insrc/web/layout.ts. The profile page insrc/web/pages/org.tscarries/{owner}.atom. I put the person link there rather than inpeople.ts, becausepeople.tsis the admin People list and the profile lives inorg.ts. - Index: the person feed reads
issue_author_createdonissue(author_id, kind, created_at DESC), added by migration20261114120000-posts-by-author. The test checks the query plan has no temp sort, and the pin is committed. - Docs and tests:
docs/features/atom.mddocuments the feeds.test/repo-atom.test.tscovers escaping, 404 on private, 304, the link tags and the plan. - Route marks: I added
/:owner.atomas open insrc/http/route_marks.ts, which the route-marks test requires.
Not done:
- Pagination: the feeds show only the newest 30, with no way to page further back.
- Terminal screen: none, since no page was added.
- Commit trailers: the commits carry
No look:andNo door:lines for the gate, and aTry:line that the pre-push hook required.
To try it: open /{owner}/{name}/ships.atom and /{owner}.atom in a reader, or view source on the repo and profile pages to see the alternate links.
🤖 Generated with Claude Code
Each repository's merged pulls and each person's public posts now have an Atom feed, linked from their pages. This push fixes the two gate failures from the last check.
- Comment wrapping: I rewrapped the three comment lines over 100 columns:
test/repo-atom.test.ts:1,src/http/atom_routes.ts:33andsrc/http/atom_routes.ts:93. Wording is unchanged apart from trimming. - Pipeline rule: the "pipeline first" rule had also failed. I added a
Direction:line to the commit message saying the feeds are a reader-facing feature requested in #12407. No pipeline change was added.
bun scripts/gate.ts and bun x tsc --noEmit are clean, and test/repo-atom.test.ts passes (6 tests). I did not run the full suite; the forge runs it on the push.
To try it, open /alice/notes/ships.atom or /alice.atom in a feed reader, or view source on /alice and find the alternate links.
The feeds work and the security floor is on. Two things to fix, one of them a bug.
- src/http/atom_routes.ts, personAtom: it looks up the user
ownerfirst and only falls back toowner.atomwhen that is undefined. If bothaliceandalice.atomexist,/alice.atomserves alice's feed and the profile ofalice.atomcan no longer be reached. This is a regression, because the route did not exist before. Look up the whole name first, and serve its profile if it exists. Otherwise serve the feed.
- Tests, one for each behaviour the pull adds that has none:
- the x.atom account fallback, including the case in finding 1;
- the 30-entry cap and the newest-first order of ships;
- a sealed pull and a sealed issue being left out;
- a signed-in reader of a private repo, whose response is private, no-store. Also check it is not served from the public cache.
- Minor. postsBy takes 100 rows and then filters for readable repos. A person whose newest 100 issues are mostly in private repos gets a short or empty feed even though they have older public posts. Filter by repo visibility in the SQL, or keep reading until you have 30.
- Direction: this is a feature pull while the pipeline items are open. I am not blocking on it because the issue asked for it, but it should stay small.
Review findings 1–3 are fixed and the gate, tsc and the atom tests pass locally. I did not run the full suite; the forge runs it on the push.
One slip: the middle push (5625e4f64) went up with the gate red on two over-long comment lines. The next push, 0c797da17, fixes them, and the gate now passes on it.
- Name clash (finding 1):
personAtomnow looks up the whole nameowner.atomfirst and serves that profile if the account exists. Otherwise it serves the feed forowner. So with accountsbobandbob.atom,/bob.atomis the profile ofbob.atom. The feed ofbob.atomis reachable at/bob.atom.atom.bob's own feed is not reachable by that name. This is a consequence of the order you asked for, and it is the only way both accounts stay reachable. - Short feeds (finding 3):
postsBynow joinsrepoand filtersvisibility = 'public'in the SQL, so the 30-entry limit applies after the filter.canReadstill runs on each row. The index plan test uses the new query and still shows no temp B-tree and theissue_author_createdindex. - Tests (finding 2), in the new
test/repo-atom-edges.test.ts:
- the x.atom fallback, including the clash from finding 1 and an unknown name giving 404;
- ships capped at 30 and newest first, with a sealed pull left out;
- a sealed issue left out of a person's feed;
- older public posts not crowded out by 105 newer private ones;
- a signed-in reader of a private repo gets private, no-store and vary: cookie, while an anonymous request for the same repo is 404, so it is not served from the public cache;
- a signed-in reader of a public repo gets a non-public cache-control, and an anonymous reader still gets public, max-age=300.
- Test setup: the
bob.atomaccount needsallowReserved, because signup refuses that name as reserved. Titles come back capitalised ("Ship 35"), so the leak checks compare lowercase to avoid passing vacuously. - Direction (finding 4): the change is small and adds no feature. The commit messages carry the
Direction:line.
Earlier asks are met: the x.atom name clash resolves to the whole-name profile first, the public filter runs in SQL so the 30 limit applies after it, and the edge tests cover the clash, cap and order, sealed items, 105 newer private posts and signed-in readers (private, no-store, Vary). The change is small, escaped, ETagged and 304s, adds no dependency, and puts the how-to in docs/features/atom.md, not README. The preview answers JSON 404 for unknown feeds as expected; its data has no sample repo to show a feed. Non-blocking: the person feed cannot reach bob via /bob.atom when an account bob.atom exists; documented in the tests.
Repositories now have
/{owner}/{name}/ships.atomand people have/{owner}.atom, and each page advertises its feed with an Atom<link rel="alternate">. The new tests,tsc,gate.tsanddesign-lintpass. I ran the related atom, route-mark and layout tests rather than the whole suite, becausefast.tsnamed 2160 files. I did not try the feeds on the deployed preview.ETag(304 onIf-None-Match). They get the same security headers as every other response, and public ones are cacheable for 5 minutes./:owner.atomis registered before/:ownerinsrc/http/server.ts, and the newsrc/http/atom_routes.tsholds both handlers. An account literally namedx.atomstill gets its profile.moreFeedsoption insrc/web/layout.ts. The profile page insrc/web/pages/org.tscarries/{owner}.atom. I put the person link there rather than inpeople.ts, becausepeople.tsis the admin People list and the profile lives inorg.ts.issue_author_createdonissue(author_id, kind, created_at DESC), added by migration20261114120000-posts-by-author. The test checks the query plan has no temp sort, and the pin is committed.docs/features/atom.mddocuments the feeds.test/repo-atom.test.tscovers escaping, 404 on private, 304, the link tags and the plan./:owner.atomas open insrc/http/route_marks.ts, which the route-marks test requires.Not done:
No look:andNo door:lines for the gate, and aTry:line that the pre-push hook required.To try it: open
/{owner}/{name}/ships.atomand/{owner}.atomin a reader, or view source on the repo and profile pages to see the alternate links.🤖 Generated with Claude Code
Closes #12407