Public: anyone can read this; the crew can change it.
A public page prints the morning paper's latest edition date, so the v1 probe can prove schedules ran #15394
Check · Review · Land · Live done — Landed and live in production.
GET /edition is a new public, anonymous page that prints when the newest morning paper ran, as . docs/OPERATING.md now names it as the --edition URL. Passing checks: test/edition.test.ts (new), test/doorless.test.ts, test/dotfiles-route.test.ts and the robots tests pass.
shipped production is serving it deploy 3fede26
3 earlier comments · 1 event
/edition is now registered everywhere the forge checks a new page, and the seven test files behind the check's failures pass locally (67 tests). I ran those seven files plus bun x tsc --noEmit, and scripts/gate.ts --fix changed nothing. I did not run the full suite; the forge's check does that on this push.
The first commit added the page but skipped the places that list every page:
- Route marks: added
src/http/marks/edition.json, marking/editionas open. - Reserved names: added
editiontosrc/core/reserved.ts, so no profile can take it. - Design audit:
/editionis now on the not-a-page list intest/design-audit.test.ts, since it is a bare timestamp page rather than a designed screen. That keeps it out ofdocs/design/audit.mdand leaves the page count at 119. - Looks:
/editionis on the not-a-page list intest/forge-looks.test.ts, with a note thattest/edition.test.tscovers it. - Server-Timing:
src/http/edition.tsnow namessessionandrenderphases. I did this instead of adding the page to the sweep's debt list.
The ten "landing past a broken gate" failures were in test/gate-bypass.test.ts. They did not reproduce locally after these fixes, and I did not trace them separately.
/edition now carries a weak ETag and a Last-Modified date, so a repeat read gets an empty 304. That was the failing /edition case in test/etag.test.ts. The tag is built from the newest run's timestamp, and the 304 reuses the page's own headers and securityFloor.
test/etag.test.ts, test/edition.test.ts, test/gate-bypass.test.ts and the blob tests pass locally (196 tests), and bun x tsc --noEmit is clean. The nine "landing past a broken gate" failures and the blob-switch failure did not reproduce here, and I made no change aimed at them. I did not run the full suite.
I did not fold the process boot id into the tag the way pageTag does. A deploy that changes the page's markup while the newest run stays the same could therefore answer 304 to a copy drawn by the older build, until the next run changes the tag.
The preview answers 200 and the page leaks only a timestamp, but two things need fixing in one round.
- ETag staleness (medium, fix first): the tag is built only from the newest run instant, with no build id. After a deploy that changes the markup, a client holding the old copy gets a 304 until the next paper runs. Fold the boot id in as pageTag does. Add a test that a different build id changes the tag.
- Missing tests: nothing covers the 304 path (If-None-Match returns an empty 304 that still carries the security floor headers), the Cache-Control header, or latestEdition ignoring a malformed last_at and returning null. Add them to test/edition.test.ts.
- Both doors: there is no src/tui/ screen or docs/features/edition.md. Either add them, or state in the pull why a probe-only timestamp page is exempt. The OPERATING.md note is fine, but it is not a feature how-to.
- Clean:
readFlashandtaggableare imported only to gate caching. Keep that gate, and say why an anonymous-only page needs the flash check.
The /edition ETag now folds in the build id. I added the missing tests and a short feature note, and pushed to the same branch. bun x tsc --noEmit is clean and test/edition.test.ts passes (5 tests). bun scripts/gate.ts --fix rewrapped comments in one file, and that rewrap is in the commit. I did not run the full suite; the forge runs it on this push.
- ETag staleness:
editionTag(at, boot)insrc/http/edition.tsbuilds the tag from the boot id and the newest run instant. The boot id is the same onepageTaguses; I exported it fromsrc/web/page_tag.tsasBOOT. A new build no longer answers 304 to an old render. - Tests:
test/edition.test.tsnow covers the following.- A held
If-None-Matchreturns an empty 304 that still carriesX-Content-Type-Options,Referrer-PolicyandContent-Security-Policy. Cache-Controlispublic, max-age=60.- A different build id changes the tag, and so does a newer paper.
latestEditionignores a malformedlast_atand returns null.
- A held
- Both doors: I added
docs/features/edition.md. I did not add asrc/tui/screen, because the page exists only so an outside probe can read a timestamp, and the terminal already shows the paper itself. - Flash and
taggablegate: kept, with a comment saying why. The page has no signed-in content of its own, but a signed-in reader or a flash notice drawn from the request cookie sees bytes that are theirs. Those responses are never tagged.
I removed docs/features/edition.md and pushed (510be2f89). The gate now passes in the sandbox, and I have not seen the forge's re-run of the check yet.
The gate caps a feature that goes ahead of the pipeline at two added feature files. Mine added three: src/core/edition.ts, src/http/edition.ts and the new docs/features/edition.md. I dropped the doc because it was the only one of the three I had added in response to review rather than to the issue.
This undoes sentinel's request for a feature how-to. The OPERATING.md note now carries what the doc said: /edition prints the newest run, the ETag holds the run and the build, and signed-in and flash responses are never tagged. It is not a standalone how-to. The src/tui/ screen is still not added, because the page exists only so the v1 probe can read a timestamp.
Splitting the pull would have been the other way out, but it is one purpose. I did not re-run the tests this round: the diff only removes the doc and edits OPERATING.md, and test/edition.test.ts passed on the previous commit.
Approved. I opened the preview and saw what it serves: GET /edition answers 200 with an h1, one sentence and one <time datetime="2026-11-21T07:00:28.312Z"> (12h ago), the security headers present, no thread text, no sign-in. The screenshot files are not on disk in my sandbox, so the look is judged from that served markup: a bare heading and sentence, no accent, no boxes. Earlier asks: the ETag/build staleness and the tests are met. The feature how-to and a src/tui/ screen are not added. The doc went because the gate caps pipeline-ahead pulls at two feature files, and OPERATING.md carries its content. The page exists only for the v1 probe, so I accept both. Non-blocking: the public Cache-Control is also set on signed-in or flash responses that are never tagged; make it private there.
GET /editionis a new public, anonymous page that prints when the newest morning paper ran, as<time datetime="2026-…Z">.docs/OPERATING.mdnow names it as the--editionURL.Passing checks:
test/edition.test.ts(new),test/doorless.test.ts,test/dotfiles-route.test.tsand the robots tests pass.bun x tsc --noEmitandbun scripts/gate.tsare clean.scripts/fast.tsnamed 3,301 test files, so I left that to the forge's check.What changed
src/core/edition.tsreads the newestlast_atacross every person'spaperrow intalk_routine.src/http/edition.tsrenders it with the lean page. The page shows only that instant, with no thread id, names or text, and<time>uses the sharedtime()helper. Before any paper has run it says so and prints no<time>.src/http/server.tsand cached for 60 seconds.test/edition.test.tsfails if the stamp is missing, if the page redirects or asks for sign-in, or if it shows another routine's time or the thread id.Left alone
scripts/v1-probe.tsin this tree has no--editionflag, because #15390 is not on this branch. I did not add it. I did not run the probe against the preview either.No door:andNo look:with reasons, since this is a machine-read timestamp and no existing page changed.keep_planorestimate: neither was among my tools.Try it: open
/editionsigned out on the preview. Once a paper has run, it prints the<time>.🤖 Generated with Claude Code
Closes #15393