Public: anyone can read this; the crew can change it.
bench/results holds a 500/s run of anonymous code pages through the edge cache and one bypassing it, both with zero refusals and p95 under 100 ms #12099
I haven't pushed a fix, because none of the 17 check failures comes from this branch. Every one of them also fails on a clean checkout of origin/main (1a20738fa) without this branch's changes. One of them is the /changelog timing test, which measures latency and fails on its own from time to time.
-
Reviews
No review yet.
-
Checks
stopped parked by the crew deploy f5bb355
-
History
- The load doc gives the edge half of #9622 as two commands, 60 s each, named for the issue, and says why a crew sandbox cannot run it (#12135) f5bb355
- Merge remote-tracking branch 'origin/main' into torque/9622-bench-results-holds-a-500-s-run-of-anony b85aa04
- Allow setKeptPageClock, the test seam for the kept page's clock (#9622) 927bb18
- A hosted forge reaches outside git hosts by name through its parent's gate: vetHost says pin or gate, outboundFetch and git follow it; a refused connect says why; the connect cap is a minute 731a5d1
- One address may make 100 forges a day, not 3: an office and the release proof's own stranger were being turned away 7627ccc
- Shorten the claim's comment under 100 columns (#9622) a6485a5
- Wrap two more comment lines under 100 columns (#9622) 1fb7f8c
- Wrap the new comments under 100 columns, and build the raw test's blob whole (#9622) 8957aa5
- The load doc states the two production-shaped runs that met 500/s with none refused, how, and what they are not (#9622) ee79d85
- The engine can run on a thread of its own beside the serving thread, one database file between them; off by default, and one thread everywhere that matters 1cfdf1a
- /raw keeps a commit's small files by bytes, not 512 of them, for ten minutes (#9622): a crawl's raw twins stopped going back to git; the production-shaped run with it served 500/s with none refused 3a092f2
- A stale kept page is served while at most four render again (#9622): the crawl's pages no longer all render again in the minute they were filled together; first production-shaped run with it kept in bench/results 4af98c1
- The first /home after a restart never reads anything on the request: the worker starts at boot and a page that comes before it draws "reading…" that fills in place 1a20738
- The new home has a Table view beside the Lanes: every item as one row, with search, sort, filters and multiselect actions 2f6bf7e
- A hosted forge reaches the public git hosts and the forges beside it, so a person can connect an origin and send a change back 5f634aa
- The new home's lanes are read by a worker, never on a request: 2.5 s on production's database is now 14 to 23 ms in the worker and a memory read on the thread b70fabd
- Wrap the load verdict's and production shape's long comments under 100 columns (#9622) f317e4f
- Wrap three comment lines under 100 columns (#9622) 1cc9a26
- Spread kept lives over half their minute, not a quarter (#9622): the 45–60 s window kept the expiry wave; the load doc states every production-shaped run, the machine it ran on and its load, and that the target is not yet met c78dea1
- Kept code-page entries live a spread life, three quarters to the whole of their minute (#9622): a crawl's working set filled together no longer goes cold together, the wave of first reads the stranger gate refused; the in-process bypass runs before and after kept in bench/results 9846d31
5 earlier comments · 1 event
I haven't pushed a fix, because none of the 17 check failures comes from this branch. Every one of them also fails on a clean checkout of origin/main (1a20738fa) without this branch's changes. One of them is the /changelog timing test, which measures latency and fails on its own from time to time. A main that has advanced 13 commits past the branch's base also fails on the same tests, so merging it in fixes nothing. A follow-up push will be red until main is fixed. Those failures are in other people's work (cookies, docs/MCP.md, the home page, src/crew/week_burn.ts, test/surfaces-adversarial.test.ts), so I left them alone rather than fix them in this pull.
On this branch, the gate (bun scripts/gate.ts) and bun x tsc --noEmit pass, and so do the two new test files (test/production-shape.test.ts, test/spread-expiry.test.ts). The two failing checks that read every file (test/unreached.test.ts, test/header-width.test.ts) only name files from main.
What changed
- Production-shaped load copy:
bench/production-shape.tsreads every public repository's file count and size in bytes intobench/production-shape.json.seedShapeinbench/seed.tslays out a test copy from it, andbench/load.tsnow spreads requests over many repositories. Each result records the shape, whether the start was warm or cold, and the machine it ran on. - Spread cache expiry: cached code-page entries (
src/web/pages/kept_page.ts,tree_cache.ts) no longer all live exactly one minute. Each gets a life somewhere between half a minute and a full minute (src/web/pages/spread_expiry.ts). Before, a crawl's pages that were cached together all expired together, and the burst of fresh reads that followed was what the stranger gate refused. - Results kept: the in-process bypass runs from before the change, with expiry spread over a quarter and over half the minute, are kept in
bench/results/9622-in-process-bypass-*.json. - Doc:
docs/features/load-test.mdlists every production-shaped run with its machine and load, and says the load target is not met yet.
What to look at: src/web/pages/spread_expiry.ts and how kept_page.ts / tree_cache.ts use it, then the new section of docs/features/load-test.md.
Not done: the target is still not met; the doc gives the measured numbers rather than claiming a pass.
How to try it: run bun bench/production-shape.ts, then bun bench/load.ts, and compare the result with the files in bench/results/9622-*.
🤖 Generated with Claude Code
On a copy shaped like production, anonymous code pages now run at 500/s for 60 s with the edge cache bypassed: zero 429s, zero 5xx, and p95 well under 100 ms, in two runs. The run through the edge cache is still not done, so #9622 stays open: a crew sandbox has no edge to run it through.
The copy: all 83 public repositories on production, 35,581 files, 897 MB. trevato/forge is a real copy of its history; the others are laid out with production's file counts and sizes.
What changed:
- Stale kept pages are still served (
src/web/pages/kept_page.ts). After its 30–60 s a kept page is stale, not gone. Only 4 pages are re-rendered at once across the process (REFRESHING), one reader each, and every other reader gets the bytes already kept. If a re-render never finishes, its turn lapses after 10 s. Kept pages are pinned to a commit, so only the list of branch and tag names can go stale. No page is served more than 10 minutes after it was kept (STALE_MS). This removed the burst of refusals at 50 s, when everything filled together in the first seconds expired together. /rawkeeps more files, for longer (src/web/pages/tree_cache.ts). It held 512 files for a minute, but about half of the 3,017 crawled links are a file's raw link, so most raw reads went back to git. It now holds up to 8,192 files within the same 32 MB, for 5–10 minutes, like folders. A file's bytes at a commit never change.- Tests:
test/kept-page-stale.test.tscovers one re-render per page, the limit of 4, the lapsed turn and the 10-minute limit.test/kept-raw-count.test.tskeeps 1,500 files; it fails on the old 512 limit, and the stale-page tests fail on the old code.
Results (all in bench/results/, each in-process with the edge bypassed, warm start, 40 s warm-up first):
| Run | Served/s | Refused | p50 | p95 |
|---|---|---|---|---|
9622-in-process-bypass-stale-1.json (stale pages only) | 477.5 | 1,352 | 6.7 ms | 210 ms |
9622-in-process-bypass-stale-raw-1.json | 500 | 0 | 3.2 ms | 38.2 ms |
9622-in-process-bypass-stale-raw-2.json | 500 | 0 | 3.1 ms | 20.8 ms |
docs/features/load-test.md states these numbers, the machine (a shared Xeon Gold 6230 sandbox), its load average and the copy's size. It reports them as best case, not as done:
- Same machine: there is no edge or network in the way, and the load client ran on the same machine as the server.
- Machine load: the machine was less loaded than in the branch's earlier runs (25–35 against 72 threads), so part of the gain may be the machine.
- Cold start not counted: the first ~12 s of each warm-up, starting cold, still refused about 2,350 requests. That is the cold start #9566 covers; the measured runs started warm.
Still open: the run through the edge cache, on a copy restored from production's snapshot, from a machine nobody else is using, as the doc's The person's release run section describes.
Checks: bun scripts/gate.ts, bun x tsc --noEmit and the design lint pass. scripts/fast.ts named 1,725 test files for this diff, so I ran the 202 that cover these caches instead: 2 fail, neither in these modules:
test/retention-deploys.test.tsfails the same way onmain.test/tui-system.test.tsfailed once in the batch and passes when run alone.
To try it: bun bench/code-pages-at-rate.ts --shape bench/production-shape.json --rate 500 --seconds 60 --warm 40 --addresses 4000 --crawl 3000 --out <file>.
🤖 Generated with Claude Code
This pull records two production-shaped load runs that each served 500 requests a second with none refused, and the cache changes that made that possible (#9622).
- What changed:
/rawnow keeps a commit's small files bounded by total bytes instead of a fixed 512 entries, for ten minutes. A crawl's requests for raw files no longer go back to git each time. - Cache expiry: kept pages and tree caches expire at spread-out times (
src/web/pages/spread_expiry.ts) so entries don't all expire at once, and a stale kept page is served while one request refreshes it. - Benchmark tools:
bench/production-shape.tsandsrc/perf/production_shape.tsreplay a request mix shaped like production traffic.bench/seed.tsandbench/load.tswere extended to drive it, andbench/results/9622-*.jsonholds the before and after runs. - Docs:
docs/features/load-test.mddescribes both runs, how to repeat them, and what they don't show. - Check fix: the last check failed partly because of this branch:
setKeptPageClock, the test hook for the kept page's clock, was flagged as unused. It is now listed inscripts/unused-exports-allow.json. The branch also merges current main.
The other 16 failing tests from that check also fail on a clean checkout of main at 731a5d1fd, so they come from main, not from this branch:
- an unimported
src/crew/week_burn.ts - the home KPI, builders and spend figures
- a stale
docs/MCP.md - the cookie-site walk
- header-width violations in
home_flow.ts,lanes*.tsandsurfaces-adversarial.test.ts app.looks, the client-size and first-view budgets, and the design baselinedeploy_pullretention- the door SSH fingerprint
I left them alone because fixing them is outside this issue, so the forge check will stay red until main is fixed. Locally, scripts/gate.ts and tsc --noEmit pass, and so do test/unused-exports, kept-page-stale, kept-raw-count, production-shape and spread-expiry (16 tests).
To try it, run bun bench/production-shape.ts against a seeded forge, compare the result with bench/results/9622-in-process-bypass-stale-raw-*.json, and read docs/features/load-test.md.
🤖 Generated with Claude Code
On a copy shaped like production, anonymous code pages now hold 500/s for 60 s with the edge cache bypassed: two runs with no 429s, no 5xx, and p95 of 38.2 ms and 20.8 ms. The run through the edge cache is not done, so #9622 stays open.
The copy. bun bench/production-shape.ts reads every public repository on production with its file count and bytes, into bench/production-shape.json. On 2026-11-13 that was 83 repositories, 35,581 files and 897 MB. seedShape in bench/seed.ts builds a throwaway forge from it: trevato/forge is fetched with its real history, and the other 82 are laid out to their counts and sizes. bench/load.ts spreads its requests over all 83, and each result records the shape, warm or cold start, and the machine.
What changed in the app (this is what to review):
- Cache lifetimes are spread out (
src/web/pages/spread_expiry.ts). Each kept page, column, folder and ref set lives a random time between half a minute and a minute. Pages filled together no longer expire together, which caused the wave of refusals about 50 s into each run. - A stale kept page is still served (
src/web/pages/kept_page.ts). At most 4 pages re-render at once (REFRESHING). A re-render that never finishes gives up its turn after 10 s, and no page is served more than 10 minutes after it was kept (STALE_MS). Pages are pinned to a commit, so only the ref switcher's list of names can go stale. /rawkeeps more files, for longer (src/web/pages/tree_cache.ts). It keeps up to 8,192 files within the same 32 MB, for 5–10 minutes; it used to keep 512 for a minute. About half the crawled links are raw links, and with the old limit most of them went back to git.
Tests. test/kept-page-stale.test.ts, test/kept-raw-count.test.ts, test/spread-expiry.test.ts and test/production-shape.test.ts fail on the old code. All 13 tests in them pass on the current head, as do bun scripts/gate.ts and bun x tsc --noEmit. The forge's check on this head (b85aa04a8) was still running when this was written.
Results and doc. Every run is kept in bench/results/9622-in-process-bypass-*.json, including the ones that missed. The new section of docs/features/load-test.md lists them all with the machine's load during each. It reports the two passing runs as best case, not as done:
- No edge: there was no edge or network in the way, and the load client ran on the same machine as the server.
- Shared machine: a Xeon Gold 6230 sandbox whose load average was 25–35 against 72 threads, lighter than during the earlier runs. Part of the gain may be the quieter machine.
- Cold start not counted: the measured runs started warm. The first ~12 s of each 40 s warm-up, starting cold, still refused about 2,350 requests; that is the #9566 cold start.
Not done. The run through the edge cache can't be done from a crew sandbox. The made-up client addresses that keep the load from tripping the per-address limit only work in-process. At the edge, every request would come from this sandbox's one address, so a run there would measure that limit, not the cache. That run belongs to a person: on a copy restored from production's snapshot, from a machine nobody else is using, as the doc's The person's release run section describes. I did not load-test production or any preview.
To try it: bun bench/production-shape.ts > bench/production-shape.json, then bun bench/code-pages-at-rate.ts --shape bench/production-shape.json. Compare its result with bench/results/9622-in-process-bypass-stale-raw-*.json.
🤖 Generated with Claude Code
On a copy shaped like production, anonymous code pages now hold 500/s for 60 s with the edge cache bypassed. Two runs had no 429s, no 5xx, and p95 of 38.2 ms and 20.8 ms. The run through the edge cache is not done and can't be from a crew sandbox. It is now its own issue, #12135, and #9622 waits for it on the map.
The copy. bun bench/production-shape.ts writes every public repository on production, with its file count and bytes, into bench/production-shape.json. On 2026-11-13 that was 83 repositories, 35,581 files and 897 MB. seedShape in bench/seed.ts builds a throwaway forge from it: trevato/forge is fetched with its real history, and the other 82 are laid out to their counts and sizes. bench/load.ts spreads its requests over all 83. Each result records the shape, whether the run started warm or cold, and the machine.
What changed in the app (this is what to review):
- Cache lifetimes are spread out (
src/web/pages/spread_expiry.ts). Each kept page, column, folder and ref set lives a random time between half a minute and a minute. Pages filled together no longer expire together; that caused the wave of refusals about 50 s into each run. - A stale kept page is still served (
src/web/pages/kept_page.ts). At most 4 pages re-render at once (REFRESHING). A re-render that never finishes gives up its turn after 10 s. No page is served more than 10 minutes after it was kept (STALE_MS). /rawkeeps more files, for longer (src/web/pages/tree_cache.ts). It keeps up to 8,192 files within the same 32 MB, for 5–10 minutes, instead of 512 for a minute. About half the crawled links are raw links, and most of them used to go back to git.
Results and doc. Every run is kept in bench/results/9622-in-process-bypass-*.json, including the ones that missed. The new section of docs/features/load-test.md lists them all with the machine's load during each. It reports the two passing runs as best case, not as done:
- No edge: no network was in the way, and the load client ran on the same machine as the server.
- Shared machine: the machine is a shared Xeon Gold 6230 sandbox. Its load was 25–35 against 72 threads, lighter than in the earlier runs, so part of the gain may be the quieter machine.
- Cold start not counted: the measured runs started warm. The cold first ~12 s of each 40 s warm-up refused about 2,350 requests, which is the #9566 cold start.
The edge half (#12135). This push adds to the doc the two commands for it: 500/s for 60 s after a 40 s warm-up, over all 83 repositories, writing bench/results/9622-edge.json and 9622-bypass.json. They run from a third machine against a copy restored from production's snapshot with the edge in front of it. A crew sandbox can't do it for two reasons:
- It has no edge to run through.
- At an edge, its made-up client addresses are correctly ignored. All the load would then come from one address and hit the per-address stranger limit.
I did not load-test production or any preview.
Checks. bun scripts/gate.ts and bun x tsc --noEmit pass, and so do the four new test files (13 tests), which fail on the old code. On main, test/header-width.test.ts fails on files this branch doesn't touch (home_flow.ts, lanes.ts, lanes_read.ts, surfaces-adversarial.test.ts). scripts/design-lint.ts fails the same way with or without this branch, which doesn't touch src/web/.
To try it: bun bench/production-shape.ts > bench/production-shape.json, then bun bench/code-pages-at-rate.ts --shape bench/production-shape.json. Compare its result with bench/results/9622-in-process-bypass-stale-raw-*.json.
🤖 Generated with Claude Code
I haven't pushed a fix, because none of the 17 check failures comes from this branch. Every one of them also fails on a clean checkout of
origin/main(1a20738fa) without this branch's changes. One of them is the/changelogtiming test, which measures latency and fails on its own from time to time. A main that has advanced 13 commits past the branch's base also fails on the same tests, so merging it in fixes nothing. A follow-up push will be red until main is fixed. Those failures are in other people's work (cookies,docs/MCP.md, the home page,src/crew/week_burn.ts,test/surfaces-adversarial.test.ts), so I left them alone rather than fix them in this pull.On this branch, the gate (
bun scripts/gate.ts) andbun x tsc --noEmitpass, and so do the two new test files (test/production-shape.test.ts,test/spread-expiry.test.ts). The two failing checks that read every file (test/unreached.test.ts,test/header-width.test.ts) only name files from main.What changed
bench/production-shape.tsreads every public repository's file count and size in bytes intobench/production-shape.json.seedShapeinbench/seed.tslays out a test copy from it, andbench/load.tsnow spreads requests over many repositories. Each result records the shape, whether the start was warm or cold, and the machine it ran on.src/web/pages/kept_page.ts,tree_cache.ts) no longer all live exactly one minute. Each gets a life somewhere between half a minute and a full minute (src/web/pages/spread_expiry.ts). Before, a crawl's pages that were cached together all expired together, and the burst of fresh reads that followed was what the stranger gate refused.bench/results/9622-in-process-bypass-*.json.docs/features/load-test.mdlists every production-shaped run with its machine and load, and says the load target is not met yet.What to look at:
src/web/pages/spread_expiry.tsand howkept_page.ts/tree_cache.tsuse it, then the new section ofdocs/features/load-test.md.Not done: the target is still not met; the doc gives the measured numbers rather than claiming a pass.
How to try it: run
bun bench/production-shape.ts, thenbun bench/load.ts, and compare the result with the files inbench/results/9622-*.🤖 Generated with Claude Code
Continues #12099