Public: anyone can read this; the crew can change it.
The rosters: generate the route table roster from one file per member (child of #14248) #14439
Merged 14d 0h ago, live in production
The route marks, which are the forge's roster of its route table, are now built from a directory, one file per head. They're in src/http/marks/, 171 files. The tests I ran pass and tsc is clean.
-
Reviews
ApprovedClean. The route-mark tables move to one JSON file per head with no behaviour change. The preview boots, / answers 200, and an admin route (/settings/trusted) still redirects an unauthenticated caller. The roster test covers the heads, the routes, and hidden or non-json files. Admin and open marks are carried over entry for entry, and the readers only touch repo files, with no user text. Two small non-blocking notes: the ROLES.md line is now very long and could be rewrapped, and the dropped comment on /api/v1/runner could live in the ROLES.md or the test.
-
Checks
shipped production is serving it deploy 010904c
-
History
- Try: open /settings/tokens as the admin; the page still opens and an everyday account is still refused /settings/crew 61bd445
- Route marks: one file per head in src/http/marks/, HEADS and ROUTES built from the directory (child of #14248, #14437) 70dc803
- Every page's `rel=alternate` link to /api/v1/here answers, not 404 (#14426) e8a2a93
- Red after landing: test/llms-budget.test.ts fails on main (#14430) 5d56100
- A cross-origin write is refused in words that name the cause, not 'your credentials lack the scope' (#14427) fa0d888
- /api/v1/here says who a start token is, and says a token it does not know is not recognised (#14425) 257cdfc
- /api/v1/user/repos refuses a bad limit or page with 422 instead of quietly using the default (#14424) f1bb0c5
- The MCP list tools refuse a bad limit with one code and the maximum their schema promises (#14423) df35f72
- /system lists the child forges the host adopted after a restart, with when, and the terminal's system screen the same (#14377) 5ed51fb
- small: a not-found page is small: the 404 answer weighs under 3 KB, not 10.7 KB (#14332) f6d530e
- small: the docs say only what is true: the one OpenAPI URL, and billing's Stripe receiver and checkout as built (#14416) 66ebb55
- The forge can be restored when the forge is gone: the bucket's credentials are not only inside the database being backed up (#14246) c1f7ebf
- Cloning from outside is slow enough to fail: serve the bulk of a clone from object storage, not the home uplink (#14410) 1b8007e
- 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
The route marks, which are the forge's roster of its route table, are now built from a directory, one file per head. They're in src/http/marks/, 171 files. The tests I ran pass and tsc is clean. I did not run bun scripts/fast.ts.
What moved where
HEADSandROUTESinsrc/http/route_marks.tswere two hand-edited tables of about 400 lines. They now come fromreadMembers(), which readssrc/http/marks/*.jsonin file-name order.- Each file holds
{ head, mark }. Where the mark ismixed, it also holds that head'sroutes, with each route's mark. Every entry of the oldROUTESsits in the file of its own head. - I checked that the rebuilt
HEADSandROUTESequal the old literals entry for entry. Matching,markOf,isAdminRouteand the admin gate are unchanged, so no behaviour moved. - A pull that adds a route head now adds one file. It no longer edits a shared list.
docs/ROLES.mdpoints at the directory.
Test
test/route-marks-roster.test.tschecks thatHEADSequals the directory's heads, each once. It checks thatROUTESequals the directory's routes, each under its own head. It also checks that amixedhead lists routes and that no file is hidden or not.json.test/route-marks.test.ts,open-routes-floor,security-floor-routesandmutations-same-originpass unchanged.
What I left out
- The route table in
server.tsstill has its 608router.addcalls. Route order there matters, because the first match wins, so I did not split it. The marks were the roster pulls collide on. - I dropped the one inline comment on
/api/v1/runner("A runner's own door…"). The JSON files have no comment field. - Two file names are not obvious from the head:
/__forgeisforge.jsonand/-isdash.json./isroot.jsonand the trailing-slash/api/v1/isapi-v1-slash.json. The files are keyed by theirheadfield, not their name.
How to try it
Add src/http/marks/<name>.json with {"head":"/new","mark":"open"}. A route under /new is then marked, and test/route-marks.test.ts stops reporting it as unmarked.
I pushed an empty "Try:" commit because the pre-push hook asked for one. The pull is the one the forge opens from this branch.
The route marks, which are the forge's roster of its route table, are now built from a directory, one file per head. They're in
src/http/marks/, 171 files. The tests I ran pass andtscis clean. I did not runbun scripts/fast.ts.What moved where
HEADSandROUTESinsrc/http/route_marks.tswere two hand-edited tables of about 400 lines. They now come fromreadMembers(), which readssrc/http/marks/*.jsonin file-name order.{ head, mark }. Where the mark ismixed, it also holds that head'sroutes, with each route's mark. Every entry of the oldROUTESsits in the file of its own head.HEADSandROUTESequal the old literals entry for entry. Matching,markOf,isAdminRouteand the admin gate are unchanged, so no behaviour moved.docs/ROLES.mdpoints at the directory.Test
test/route-marks-roster.test.tschecks thatHEADSequals the directory's heads, each once. It checks thatROUTESequals the directory's routes, each under its own head. It also checks that amixedhead lists routes and that no file is hidden or not.json.test/route-marks.test.ts,open-routes-floor,security-floor-routesandmutations-same-originpass unchanged.What I left out
server.tsstill has its 608router.addcalls. Route order there matters, because the first match wins, so I did not split it. The marks were the roster pulls collide on./api/v1/runner("A runner's own door…"). The JSON files have no comment field./__forgeisforge.jsonand/-isdash.json./isroot.jsonand the trailing-slash/api/v1/isapi-v1-slash.json. The files are keyed by theirheadfield, not their name.How to try it Add
src/http/marks/<name>.jsonwith{"head":"/new","mark":"open"}. A route under/newis then marked, andtest/route-marks.test.tsstops reporting it as unmarked.I pushed an empty "Try:" commit because the pre-push hook asked for one. The pull is the one the forge opens from this branch.
Closes #14437