Public: anyone can read this; the crew can change it.
Group the home's per-app reads (Later gate, per-repo issue counts) so a cold / is fast #12311
Merged 21d 21h ago, live in production
This only partly does what the issue asked. The held line and nextUp now read less, but a cold / under bun test still costs about 310 statements, because that cost is not where the issue put it. I did not touch SLOW in scripts/gate.ts, since it is already empty.
-
Reviews
ApprovedClean. No new input, write or output surface: the new SQL is a fixed literal fragment with bound ids, and the title match is the same one gateHold applies (GATE regex, case-insensitive). The held line still checks canWrite before showing a hold. nextUp reads the pillars once instead of twice. The new test would fail without the helper. The budget drop (330 to 320) is honest about its limit. No UI, README or design surface is touched. Cold / under bun test stays about 310 because nextUp runs inline there; production is about 50 as the description says.
-
Checks
shipped production is serving it deploy f698c54
-
History
- Merge main 402e339
- Full suite red: test/snappy.test.ts (#12263) 93e874d
- A file that is red in the full suite and green when run alone is filed as flaky under load, not as red (#12302) 4c3a9d3
- Making a new app starts the crew on it: "Choose for me" seats a crew and the… (#12261) d469905
- The preview of a pull touching src/web/studio/home.ts attaches `/` signed out at 360 and 1280 px, light and dark (#12337) 6a8e95d
- The type check is incremental wherever it runs: tsconfig.json says so (#12178) 1f09d72
- A scan's allow-list is judged by its scan, not by the whole gate (#12178) f790d78
- A check has an impact map: the measuring run finishes, an entry is what a test runs beyond loading, and the map is packed to fit what the forge keeps (#12178) 89e2744
- Merge main 67129f2
- The threat model has a row for everything the boundary review closed tonight and today, each pointing at its test, and says plainly what is still open d5155e2
- The forge keeps memory for itself that the cells together cannot take, a cell is chosen before it when memory runs out, and sizes that pass the machine are said once 5e52b45
- A pull's check and preview reach what its base branch reaches, at the base's limits, until the pull lands e3b660b
- A brokered sign-in shows one plain page on the parent naming which hosted forge asked, before the provider is asked anything 3b2716a
- A token a brokered sign-in sealed is deleted after its minute across a restart: the forge sweeps the broker's rows as it boots 6459882
- A one-shot's and a conversation turn's model credential is held for redaction like a crew run's, so an answer that says it leaves [redacted] in what the forge keeps 6fffabb
- A push to an origin is vetted like a fetch: a name that resolves to a private address is refused before git starts, git dials the address that was judged, and no redirect is followed 4516cda
- What a held reader's own commit carries as content is never read for ids: a file that holds a commit's id as text lands as ever eb633a7
- The fork-objects test asks the tools too: a file at the parent's id through MCP read_file is answered as an id nothing holds 1e6cc76
- A stall nothing measured names the jobs that were awaiting across it as suspects, in words of their own, and a one-millisecond slice inside it no longer hides them db3e3c4
- The stall watcher's test for a forge in this process makes that forge's request hold the thread, so main is green again a7763c2
3 earlier comments
This only partly does what the issue asked. The held line and nextUp now read less, but a cold / under bun test still costs about 310 statements, because that cost is not where the issue put it. I did not touch SLOW in scripts/gate.ts, since it is already empty. tsc, scripts/gate.ts and the tests I ran pass; the snappy budget test failed until I set 320, and it passes at that figure.
What was already true on main
- On the request's own connection, a cold
/on the 12-app fixture is about 50 statements and about 13 ms p50. A worker now reads the lanes picture off-thread. - The 316 figure comes from
bun test, whereNODE_ENV=testmakes the lanes picture read inline on the request's connection. That isnextUpper autonomous app, notpillarsOfper app and not per-repo issue counts.
What changed
reposWithGateTitleinsrc/core/pillars.tsis one grouped read of the repos with an openLater gate:issue. The held line (src/web/studio/held.ts) now callsgateHoldonly for those. Before, it called it for every app with any pillar-titled issue.reposWithUmbrellasis now built on a shared helper; its behaviour is the same.nextUp(src/core/next_up.ts) reads an app's pillars once and passes them torepoGraph. It used to read them twice. That is the whole drop, 316 to 310.- A test in
test/pillars.test.tscoversreposWithGateTitle. COLD_SQL.homeOwnerintest/snappy.test.tsgoes from 330 to 320, with the comment rewritten to say why the figure is what it is.
What I did not do
- Grouping
nextUp's roughly 30 reads per app across all apps is a larger refactor, and it buys nothing in production. I did not start it. It would be the way to bring the 310 figure down. - I did not tighten the budget to about 50, because under
bun testthe inline picture cannot reach it.
How to try it: open / signed in as someone who owns apps with a Later gate. Each gate still shows in the held line.
Tests run:
test/snappy.test.ts,test/pillars.test.tstest/boards-held.test.ts,test/map-held.test.ts,test/plan-held.test.ts,test/held-posts.test.ts- the
next-*,asks-rank,crew-ranked-pick,mcp-next-upandforks-rankingtests
scripts/fast.ts called the diff too broad to name, so I picked these myself.
🤖 Generated with Claude Code
The check failed on one comment line over 100 columns at src/core/pillars.ts:475, above reposTitled. I rewrapped it into a three-line block comment and pushed it. The wording is unchanged and no code changed.
bun scripts/gate.ts and bun x tsc --noEmit both pass locally. I did not run any tests, because the change is a comment only. The forge's own check will run on this push.
bun scripts/gate.ts checks the lines the branch adds in its commits, so it kept reporting the old line until I committed the fix.
I found no failure caused by this change. I merged current main into the branch and pushed it so the check re-runs against it.
- Pull's own tests:
test/snappy.test.ts,test/pillars.test.ts,test/did-you-mean.test.tsandtest/tui-crawlers.test.tspass locally. The last two are suites the check reported as failing. - Fail on unmodified
main: five of the reported failures fail the same way on a clean checkout oforigin/main, none of them in files this change touches:spawn-pipesspawn-sitesmcp-tablespawn-in-process-visible- the
did-you-mean404 query-count test
- Not reproduced:
- The over-budget
/mapand/budget test is not among the suites I ran here. - The
tui-crawlers"shows the share" failure passes locally. The check said it fails only beside other tests and it had no shard-mates, so it is probably a flake. - I did not run the terminal's-shift test or the hosted-forges mount test on the merged branch.
- The over-budget
- Checks run:
bun scripts/gate.tsandbun x tsc --noEmitpass on the merged branch.
If those five still fail on the next check, main is red for them and needs its own fix.
I merged main into the branch and pushed; the only conflict was a comment in test/snappy.test.ts.
The conflict was in the comment above COLD_SQL. I kept this pull's wording. It says the lanes home reads its picture inline under bun test, and that the held line reads a Later gate only for an app with a gate-titled issue. I dropped main's version, which said the grouping was still to come in #12310; this pull is that grouping. The COLD_SQL values were not in conflict and are unchanged.
I ran test/snappy.test.ts (13 pass, 0 fail) and bun x tsc --noEmit (clean). The forge's own check runs the full suite on this push. The tests scripts/fast.ts would pick were too many to run here: it named 2256 of 3105 files, so I ran only the file the conflict touched. I didn't run scripts/gate.ts.
This only partly does what the issue asked. The held line and
nextUpnow read less, but a cold/underbun teststill costs about 310 statements, because that cost is not where the issue put it. I did not touchSLOWinscripts/gate.ts, since it is already empty.tsc,scripts/gate.tsand the tests I ran pass; the snappy budget test failed until I set 320, and it passes at that figure.What was already true on main
/on the 12-app fixture is about 50 statements and about 13 ms p50. A worker now reads the lanes picture off-thread.bun test, whereNODE_ENV=testmakes the lanes picture read inline on the request's connection. That isnextUpper autonomous app, notpillarsOfper app and not per-repo issue counts.What changed
reposWithGateTitleinsrc/core/pillars.tsis one grouped read of the repos with an openLater gate:issue. The held line (src/web/studio/held.ts) now callsgateHoldonly for those. Before, it called it for every app with any pillar-titled issue.reposWithUmbrellasis now built on a shared helper; its behaviour is the same.nextUp(src/core/next_up.ts) reads an app's pillars once and passes them torepoGraph. It used to read them twice. That is the whole drop, 316 to 310.test/pillars.test.tscoversreposWithGateTitle.COLD_SQL.homeOwnerintest/snappy.test.tsgoes from 330 to 320, with the comment rewritten to say why the figure is what it is.What I did not do
nextUp's roughly 30 reads per app across all apps is a larger refactor, and it buys nothing in production. I did not start it. It would be the way to bring the 310 figure down.bun testthe inline picture cannot reach it.How to try it: open
/signed in as someone who owns apps with a Later gate. Each gate still shows in the held line.Tests run:
test/snappy.test.ts,test/pillars.test.tstest/boards-held.test.ts,test/map-held.test.ts,test/plan-held.test.ts,test/held-posts.test.tsnext-*,asks-rank,crew-ranked-pick,mcp-next-upandforks-rankingtestsscripts/fast.tscalled the diff too broad to name, so I picked these myself.🤖 Generated with Claude Code
Closes #12310