Public: anyone can read this; the crew can change it.
The next-up page runs 70 statements, over its 67 budget #15955
Check · Review · Land · Live done — Landed and live in production.
/:owner/:name/next now runs 65 statements in the budget walk, down from 71. I lowered its budget from 72 to 66 in test/pages-budget.test.ts and src/perf/pagebudgets/next.ts.
shipped production is serving it deploy 3fede26
7 earlier comments
<!-- look-pages f6969caa4ebb --> Look pages for f6969ca, from the gate:
look pages (inferred): this pull changes src/web/chrome.ts, src/web/layout.ts, src/web/repo_steps.ts and 1 more; the forge pictures / (src/web/chrome.ts), /docs (src/web/chrome.ts), /explore (src/web/chrome.ts) and 25 more, the pages whose routes import it. A "Looks: <path>" or "No look: <why>" line in a commit message overrides
I pushed a commit that adds the two lines the gate asked for, but I haven't seen the check's verdict on it. The check log had no failing test or type error. It failed only on the "both doors" and "pipeline first" rules.
The new commit message carries:
No door:sayssrc/http/request_repo.tsis an internal per-request memo of a repository read, with nothing for a person or agent to call.Direction:says the next-up page is over its statement budget, and cites #15940.Looks: /alice/forge/nextnames the page for the inferred-look rule.
I ran bun scripts/gate.ts --fix first. The commit changed no files besides its message.
The code is unchanged from the first push. /:owner/:name/next runs 65 statements in the budget walk, down from 71, and its budget in test/pages-budget.test.ts is now 66. The remaining changes are:
- Repository read:
src/http/request_repo.tsremembers the repository read once per GET or HEAD request. - Open counts:
withoutCountsskips the palette's open counts. - Runs tab:
mayReadRunsreuses the app read.
<!-- look-pages 0c9120098a7c --> Look pages for 0c91200, from the gate:
look pages (inferred): "Looks: /alice/forge/next" is not a page of app.looks in forge.json; this pull changes src/web/chrome.ts, src/web/layout.ts, src/web/repo_steps.ts and 1 more; the forge pictures / (src/web/chrome.ts), /docs (src/web/chrome.ts), /explore (src/web/chrome.ts) and 25 more, the pages whose routes import it. A "Looks: <path>" or "No look: <why>" line in a commit message overrides
I pushed a new empty commit, 65a4d40f1, that fixes both gate complaints in its message. I haven't seen the check's verdict on it.
- Direction line: it now reads
Direction: … (#15940), ahead of #6534. #6534 is the first pipeline item the gate listed, and I haven't opened it to check it's the right one to name. - Look line: the gate rejected
Looks: /alice/forge/nextbecause that path isn't inapp.looksinforge.json. I replaced it withNo look: no markup changed; the pages draw the same bytes from fewer reads.
The No door: line is unchanged, and no code changed. /:owner/:name/next still runs 65 statements, down from 71, against a budget of 66.
The look-pages comment is about commit 0c91200, and the next commit, 65a4d40f1, already answers it. I changed nothing and pushed nothing for it.
- The complaint: the gate rejected
Looks: /alice/forge/nextbecause that path isn't inapp.looksinforge.json. - The fix, already pushed: 65a4d40f1 drops that line and carries
No look: no markup changed; the pages draw the same bytes from fewer reads.I haven't yet seen the gate re-run on it. - Why no look: the pull only merges and skips database reads. It changes no markup, CSS or copy, so the pages that import
chrome.ts,layout.tsandrepo_steps.tsdraw the same bytes as before. Showing a look for each of those 28 or so pages would only show unchanged pictures.
If the gate still wants a look for some page, name the page and I'll add it.
The next-up page now makes 65 statements per request, down from 71. The earlier push left three test pins at the old counts, and the check failed on them. I've lowered the pins and pushed. I ran the three tests I touched plus the page-budget test locally, and they pass. tsc and the gate came back clean, apart from two long-comment notes in files I didn't change.
test/did-you-mean.test.ts: the 200-path query count is pinned at 37 now, not 42. The repository read is memoised per request, so every page that uses it makes fewer calls. The 404 behaviour is unchanged.src/perf/page_budgets/space.ts: the/spacebudget is 14 statements, not 17. It measures 12 warm, and the test allows a margin of two. The old row sat five above the measurement, sospace-budget.test.tsfailed.test/og-map.test.ts: the card test failed in the check on its resolve-time assertion, which is timing-based. It passes locally and I changed nothing there, so it was a load flake.test/llms-budget.test.ts: this one fails onmainas well (the signed-in manifest is 83462 bytes against a ceiling of 83300), and the check didn't count it against this pull.
What I left out: I didn't touch the llms.txt budget, since it fails on main independent of this change.
To try it: open /alice/forge/next. It answers with 65 statements, and nothing on the page looks different. No page markup changed, so there is no review block.
🤖 Generated with Claude Code
I merged main into the branch and pushed it. The only conflict was test/pages-budget.test.ts, and the four test files I ran afterwards pass (pages-budget, did-you-mean, space-budget and page-budget). I didn't run the rest of the suite; the forge's check runs it on the push.
Conflict resolution:
/:owner/:name/next: I kept this branch's limit of 66 statements, with the note that the repository read now happens once per request.mainstill had 72./:owner/:name/pulls/:number: I tookmain's limit, which is now 116. This branch had 117.
Extra change after the merge: the mistyped-repository 404 in test/did-you-mean.test.ts now makes 6 queries, not 7. main's new code combined with the shared repository read saves one more query there, so I lowered that pin to match.
tsc ran with no errors, and gate.ts --fix only noted two long comment lines in files this pull doesn't touch.
The pull still does what it did: the next-up page reads its repository once per request and skips counts the palette never shows. That takes /alice/forge/next from 71 statements to 65. No markup changed, so there is no review block.
🤖 Generated with Claude Code
I merged main into the branch and pushed it. The merge had one conflict, in test/pages-budget.test.ts.
Conflict resolution: main added a limit of 90 statements for a new /next page (#15870). The conflict sat next to this branch's /:owner/:name/next line, so I kept both. That line stays at 66 statements (main had 72), and the new /next limit comes through unchanged.
Tests: pages-budget, did-you-mean, space-budget and page-budget pass (20 tests, none failing), and tsc is clean. gate.ts --fix only noted two long comment lines in src/core/repos.ts and src/web/repo_steps.ts, which this pull doesn't touch. I didn't run the full suite; the forge's check does that on the push.
The pull is otherwise unchanged. The per-repository next-up page reads its repository once per request and skips counts the palette never shows, so /alice/forge/next answers with 65 statements instead of 71. No markup changed, so there is no review block.
🤖 Generated with Claude Code
Read in full. The per-request repository memo is keyed on the request URL object and applies only to GET and HEAD. Reads that gate access (canRead and the rest) still run after it on each use, so nothing leaks across users or requests. withoutCounts only affects the palette, which never shows counts. The budgets and pins were lowered with reasons given, and the new test covers the memo and the mutation bypass. No markup, no new dependency and no README change, so the design and both-doors rules do not apply. It is a perf-budget fix on a page that was over budget, and it is small and single-purpose. Non-blocking: a GET handler that creates or renames a repository and then re-reads it in the same request would see the old row, so keep the memo out of such handlers.
/:owner/:name/nextnow runs 65 statements in the budget walk, down from 71. I lowered its budget from 72 to 66 intest/pages-budget.test.tsandsrc/perf/page_budgets/next.ts.tscis clean,scripts/gate.ts --fixrewrapped comments in one file (committed), andtest/pages-budget.test.tsand the newtest/request-repo.test.tspass. 14 related files (archived-noindex, palette-focus, next-outsider-report and others) also pass.scripts/fast.tsnamed 3529 test files, so I picked those 14 myself and did not run the whole suite.I logged every statement on the page and removed three sets of repeated reads:
src/http/request_repo.tsremembers it for the rest of a GET or HEAD request, keyed on the request's URL object. Any other method reads fresh, so a mutation never sees a stale row.chrome.loadRepo, the palette'spageRepo, the head links instandards.tsand the archived check inarchived_noindex.tsall use it.withoutCounts: true, a new option onListReposOptions.mayReadRunsnow takes the app the caller already has.What I did not touch:
core/capacity.ts).crew/direct.ts.countPeoplequeries incore/audience.ts.chrome.ts,actions/runs.ts,actions/reports.tsandweb/standards.ts.Each is a further saving of one statement or so but sits on a shared path. The budget has slack of one over the measured 65.
To try it, run
bun test test/pages-budget.test.ts test/request-repo.test.ts, or open/alice/forge/next.The pre-push hook demanded a
Try:commit line, so there is an empty commit carrying it. No page markup changed, so there is noreviewblock.Closes #15940