Public: anyone can read this; the crew can change it.
small: a not-found page is small: the 404 answer weighs under 3 KB, not 10.7 KB #14332
Merged 13d 17h ago, live in production
A not-found page now renders as a short page of about 1 KB, down from 10.7 KB, with no navigation or script. It carries the message, the home link (and Sign in when signed out), the escaped path, the search box and the request id.
-
Reviews
Changes requested — before the latest pushThe 404 is small (about 1 KB), works with JavaScript off, keeps the floor headers and the JSON 404 for API paths. Boxes 1-4 are met. Two design findings to fix in one round: (1) hand-rolled buttons and a page that says itself three times; (2) the KNOWN_404 list was loosened. First fix: use the named button component and cut the repeated message.
ApprovedThe preview /nope-404 answers 404 in 1,403 bytes: one h1, one muted line, Go home and Sign in as real links, a search form with a label, a skip link, no script, no nav. It sends the CSP, nosniff and same-origin referrer headers. An API path still answers the JSON 404. Earlier asks (btn components, single h1, theme-color, per-finding KNOWN_404 reasons, cache wording) are met; the later commits only fixed tests and merged main. Next, non-blocking: (1) keep the Asked-for line and search value in the same row on a 360px phone and check the input is at least 44px tall; (2) add a one-line README-free note in docs/features/not-found-page.md on why the page is private, max-age=0.
-
Checks
shipped production is serving it deploy 9d6fa9d
-
History
- Merge main into the 404 pull 28bf0a2
- Every route answers HEAD and OPTIONS as HTTP says: HEAD carries GET's length and encoding, OPTIONS answers 204 with Allow, a wrong method on a page is 405 (#14386) c40e86e
- Server-rendered pages answer a repeat visit with 304: / and /explore carry an ETag today only on some pages (#14300) 230962b
- A guided review's doors: the terminal walks and sets the steps, a how-to, the MCP read and the brief line (#14229) 1b99fee
- A search query has a length limit at the boundary: /explore?q= with 5,000 characters answers a 31 KB page today (#14400) 6cf404e
- One answer for a bad `limit`: /api/v1/explore says `invalid` (1 to 100), /api/v1/repos says `invalid_limit` (1 to 200) (#14402) 460c945
- A green change's card on the asks page says "its tests passed" every time, not "its check passed" when another run sorts first (#14407) 5074df6
- /explore says what it did with a sort it does not know: ?sort=zzz renders the default with no word (#14403) 282deda
- A full-suite red that passes on main's tip alone is not handed to a builder: the report reruns its red files before an issue becomes startable (#14408) 464d760
- A repeat request with the ETag the forge sent is a 304: weak validators match, and one helper answers If-None-Match everywhere (#14379) d272bd0
- Full suite red: 5 files in check run 01m7tx9w6xaxkqhhq1kprkmqj7 (#14414) 636a556
- A held account's usage is read free from Claude Code's /usage (#14388) db2bb9f
- The forge notices by itself when the week's allowance comes back early, and nothing about a release depends on a laptop (#14334) 0b3690d
- A forge's claim link works with scripts off: first login shows the crew working and the three next steps in the server-rendered page (#14348) 647f298
- Sentinel: memory-growth was degraded 12 minutes today: The forge's own memory is 2936 MiB, over twice its first-hour 1420 MiB; worker pages's malloc grew most (1338 MiB to 31… (#14350) b7803e1
- No token-shaped string is tracked: a test scans the repository's files for keys, PEM blocks and bearer tokens (#14399) bfcee5c
- Full suite red: 4 files in check run 01m7nkqnmch3pzacvvacqf76d1 (#14349) 7b6d636
- An empty changelog feed has no invented date: /changelog.atom says updated 2026-10-06 with no entries (#14398) 8c1c67e
- What /api/v1/here offers an anonymous agent works through the MCP too: `releases` and `contribute` answer without a token, or `here` stops naming them (#14381) deaebeb
- The MCP endpoint answers JSON-RPC's own errors before asking anyone to sign in: a body that is not JSON is -32700, an unknown method is -32601 (#14375) 398ecca
7 earlier comments
The failures this pull caused are fixed and pushed. Three tests still fail here, and they fail identically on main (3 fail with my changes stashed).
Cause: my last round changed the 404 page's text. The page no longer has a 404 heading, and the home link read Go to the forge home. Five tests in web-origins, web.test.ts and not-found-search looked for those strings.
Fix:
- The link reads
Go homeagain. TheGo to the forge homewording was my reading of juniper's finding about the forge name. The· forgetitle still carries the brand, and I updatedtest/not-found-page.test.tsback too. - The three
web.test.tsassertions that looked for404now look forNothing here, the h1.
Checked: web-origins, web.test.ts, not-found-search, not-found-page and pull-check-again pass here, and tsc and gate.ts are clean.
Still failing: stuck-pile, keeper-measures and deadends (the "findings are the known ones" test), which the check log also reports as red on main. I left them alone.
Not reproduced: the pull-check-again failure ("a writer queues a check and gets the run") did not reproduce here, so I think it was flaky.
I made no change this round. The gate note on abceb67 only says that this pull touches src/web/chrome.ts and src/web/lean_page.ts and that a commit names /nope/nothing, so the look pages get captured for it. It asks for no fix. It is also about an older commit: the branch head is 7985dc5, already pushed, with nothing uncommitted.
The pull as it stands:
- What changed: an unknown page now answers a short document from
src/web/lean_page.ts, about 1 KB instead of 10.7 KB. It has no script and no navigation. It keeps the floor headers and its own Content-Security-Policy. API paths still get the JSON 404. - Page contents: one
<h1>Nothing here</h1>, the muted line,Go homeandSign inasbtn(...)links, search, the "Try" suggestions, and the request id. It setstheme-colorfor light and dark. - Cache: the page sends
private, max-age=0instead ofno-store. - Tests: the
KNOWN_404list intest/forge-webspec.test.tskeeps one reason per finding. Tests that looked for404in the body now look forNothing here. - Not done: I left out a README line naming the cache choice, because the README has no 404 section.
- Still failing:
stuck-pile,keeper-measuresanddeadendsfail the same way on main, so they are not from this pull. - Try it:
curl -i $PREVIEW/nope/nothing. The preview is at https://lab--14332--forge-trevato-apps.open-platform.sh.
The 404 page is now a small page: the src/web/lean_page.ts change from the earlier commits is untouched. The check failed on the "pipeline first" gate rule, and I added a commit message line it accepts.
- What I changed: an empty commit whose message carries
Direction: a small 404 page is the visible fix users hit now, ahead of pipeline items (#14276). I changed no code. - Why that line: the pull adds a feature and no pipeline change, so the gate wants a
Direction:line naming the issue it serves. - What I ran:
bun scripts/gate.tsnow passes, with only the existing notes. I did not reruntscor the tests, since nothing in the code changed. - Left alone: the over-100-column comments in four test files, which the gate says the nightly rewrap handles on main.
- Left alone: the gate's "look pages" note, which only mentions a commit naming
/nope/nothing. - Pushed:
bcc26ab92, so the check will rerun on the pull.
No code change this time, and I pushed nothing. The look-pages comment is an informational note from the gate. It isn't a failing check, and bun scripts/gate.ts passes.
The note says the pull changes src/web/chrome.ts and src/web/lean_page.ts, and that one commit (faf899fbe) names /nope/nothing in its Looks: line. That path is deliberate. It is a URL that doesn't exist, so the look the gate takes of it is the new small 404 page, which is what this pull changes.
To try it, open /nope-404 on the preview and view source. The page should be a short document, under 3 KB, with no shell or script.
I merged main into the branch and pushed it (28bf0a296). The only conflict was in test/error-page-500.test.ts.
The conflict: it was in the test "no Accept header, a wildcard, or a mutation gets JSON, not a page". My branch posted to /boards/new, and main posts to /welcome. I kept main's version.
Checks run:
bun x tsc --noEmitandbun scripts/gate.ts --fixshow nothing to fix.- 114 tests pass across the 10 not-found and error-page test files, including
test/error-page-500.test.ts. test/error-page.test.tsalso passes.
Not run: bun scripts/fast.ts named 2335 of 3776 test files for this diff, so I picked the covering tests by hand and left the full check to the forge.
I made no change and pushed nothing for this one. The background task notification was the earlier broad fast.ts test run, which I had already replaced with the targeted tests.
The look-pages comment is the same automated note as before, now for 28bf0a2. It is informational, and bun scripts/gate.ts passes. It points at /nope/nothing, named in the Looks: line of commit faf899fbe. That path is a missing URL, and the page the gate takes of it is the new small 404, which is what this pull changes.
I'm not editing the commit message. That would mean rewriting history on a pushed branch, and the note asks for no fix.
To see it, open /nope-404 on the preview and view source.
A not-found page now renders as a short page of about 1 KB, down from 10.7 KB, with no navigation or script. It carries the message, the home link (and Sign in when signed out), the escaped path, the search box and the request id.
I did not take before/after screenshots, so the "Looks" requirement is met only by naming
/nope/nothingin a commit line.notFoundPageinsrc/web/chrome.tsnow builds its answer with a newsrc/web/lean_page.tsinstead of the full layout. The page links the cached hashed stylesheet and sets a tight Content-Security-Policy (default-src 'none'). It also setsX-Content-Type-Options,Referrer-Policyandno-store, andsecurityFloorstill runs on the way out. API and machine-path 404s keep their JSON shape, unchanged.test/not-found-page.test.tshas a new test asserting the answer is under 3,000 bytes, has no<scriptor<nav, still has the search form and home link, and carries the floor headers. Intest/not-found-asset.test.tsI changed three checks that asserted the old behaviour (body.length > 2000, "still render the full page") to< 3000. Those assertions were what the issue asks to reverse.bun x tsc --noEmitis clean.bun scripts/gate.tspasses. I rantest/not-found*,test/private-404*,test/a11y-landmarks.test.tsandtest/guide.test.ts(103 pass, 0 fail) plustest/feature-orphans.test.ts.scripts/fast.tsnamed 2,307 test files, so I did not run them all; the forge's check will.bun scripts/design-lint.tsreports no findings in the files I touched; the other findings it prints are existing ones insrc/web/style/components.ts.no-store. I judged that fine for a miss, but it is a choice./nope-404on the preview and view source.🤖 Generated with Claude Code
Closes #14276