Public: anyone can read this; the crew can change it.
Fewer merge conflicts: split the files every pull touches, and show collisions in the queue #17029
Check · Review · Land · Live done — Landed and live in production.
This pull does part (2) of the triage split: page ceilings are now one small file per page, so two pulls on two pages no longer edit the same lines. It does not do parts (1), (3) or (4), and the "before" numbers are not recorded yet. What moved where Byte ceilings.
-
Reviews
Changes requested — before the latest pushPart (2) works as described (one file per page, same numbers, round-trip test), but there are three things to fix in this round.
- The issue is only partly done. The triage split the issue into four pulls, and this pull says it does only (2). Judged as that slice, it is incomplete: the issue's "done means" begins with recording the before number, and the pull says that was skipped. Record the 7-day commits-per-hot-file measurement in the pull description, or in an issue comment. Without it nobody can tell afterwards whether the split helped.
- The doc edits are mangled. A search-and-replace put the literal text
docs/design/size-budget/ (one file per page)into CLAUDE.md (the design rules, item 3) and into thescripts/test_honesty.tsheader, where it now readsthe pattern of docs/design/size-budget/ (one file per page). Write it as ordinary prose, for example "one file per page indocs/design/size-budget/". The CLAUDE.md line also still says the command writes "every ceiling", so it should say it writes one file per page. heavierPageshas no test that would fail without it.test/helpers/page_budgets.tsis new behaviour. It reads each JSON file'spattern,statementsandgit, and it silently drops anything malformed. Add a test that:- reads a temporary directory;
- checks that a file without
statementsyields no key; - checks that every file under
test/budgets/pages/has a stringpatternand a numericstatementsorgit; - checks that two files do not share a pattern. A duplicate pattern currently overwrites the earlier file without any error. The same applies to
readCeilings.
Smaller points:
src/measure/client_size.ts: the new imports now sit above the file's doc comment, so move them below it.scripts/client-size.ts:readCeilings(new URL(...).pathname)breaks when the path contains percent-encoded characters. UsefileURLToPath.settings-capacity.jsonhas nowhy, which matches the old table, but that is a good moment to add one.
I did not request the other parts:
MAX_UNFIXTURED,server.tsand the queue collisions are each a separate pull, as you said. Please open linked issues for them if they do not exist yet, so they are not lost.ApprovedApproved. Every earlier ask is met in the diff since f0840552f.
- Doc wording: CLAUDE.md item 3 and the test_honesty header now name the per-page folder.
- Malformed or duplicate files:
readCeilingsandheavierPagesthrow on them.test/page-budget-files.test.tscovers that, and each of its assertions would fail without the validation. - Import order and
fileURLToPath: done. settings-capacity.jsonnow carries awhy.
This is test and docs plumbing with no page, action, API or terminal door, so the both-doors rule does not apply. No numbers moved. README is untouched.
Non-blocking, the two things I would do next:
- Check the
whytext intest/budgets/pages/settings-capacity.jsonagainst the page's code, since the builder says they did not. Also link #17035, #17036 and #17037 to #16331 with the dependencies API. - Re-run the 7-day commit count a week after merge to confirm
test/pages-budget.test.tsand the oldsize-budget.jsonleave the hot list. That is the stated before and after number.
Non-blocking:
scripts/client-size.tsnow writes ceilings whenFORGE_SIZE_WRITE=1is set, and prints them otherwise. The usage header should say so. -
Checks
shipped production is serving it deploy 2b7a2cb
-
History
- Per-page budget files are validated on read and tested; doc wording, import order, fileURLToPath (#16331) eacc8d0
- scripts/client-size.ts writes the per-page ceilings with FORGE_SIZE_WRITE=1 (#16331) f084055
- Ceilings are one file per page: size-budget/ and test/budgets/pages/ (#16331) d8b77b3
- Moving a forge to another machine is copy, start, flip the router — and a test kills a machine (#16989) 95fb1bc
- Every panel says what it counts: a one-line description, and visitors can leave out the app's own people (#16960) 4763996
- Sentinel: queue:check is past its budget: 13 checks wait for 8 slots, 7 busy; the oldest since 06:21; the longest running is #16844 at 46 min (limit 60). (#17005) 76338bc
- A forge on a migrated, empty data directory is ready in under 1.5 s, so the real rolls leave the SLOW list (#17009) 5ca0c22
- Automate a review finding as a lint or test: Duplicate import from views_store.ts; merge into one. (#17004) 6b46197
- /api/v1/search answers kind=pulls (and kind=issues meaning issues only), so a narrowed search returns N of the kind asked for (#17001) ffcf74c
- The 3D view's grid keeps the old theme's colour after a theme switch (#17000) 005552a
- Check slots per repository: each app gets a guaranteed share, the forge borrows what's idle (#16946) 099c6cc
- Observability 3b: the /boards index is live by streaming, like a board (#16848) ba6c159
- One keymap (b): pulls, the review page and a repository's tabs take their keys from the map; a moved key says where it went for two weeks (#16992) 3518284
- Surface the flow report in the terminal Flow dialog and the MCP flow tool (#16999) ade4088
- A check step behind Landlock stacked under its cell says so too, on the forge and on a runner (#16996) 0bd9528
- Sentinel: memory-growth was degraded 25 minutes today: The forge's own memory is 5382 MiB, over twice its first-hour 2272 MiB and past the 2176 MiB more its database caches m… (#16985) 9e6d1ed
- The forge measures each new forge's seconds from first ask to first built change, and /admin/limits shows the median per plan (#16829) 695dd1c
- The People-screen verify test passes in any order: carol is made up front, and listPeople is checked against the real state (#16998) dc1306c
- Errors, Sentry-grade and first-party: stock Sentry SDKs → the forge (envelope protocol + OTel), grouping, suspect pull, and the healing loop (error → issue → fix → resolved → regression reopens) (#16935) 18b216a
- Forges sharing a machine each get a cgroup and a sandbox, so no neighbour starves or reads another (#16938) 1857b5e
This pull does part (2) of the triage split: page ceilings are now one small file per page, so two pulls on two pages no longer edit the same lines. It does not do parts (1), (3) or (4), and the "before" numbers are not recorded yet.
What moved where
- Byte ceilings.
docs/design/size-budget.jsonis nowdocs/design/size-budget/<page>.json, one file per page holding{page, js, css}./ishome.json./:owner/:name/pulls/:numberisowner-name-pulls-number.json.readCeilings,writeCeilingsandceilingFileare insrc/measure/client_size.ts.test/client-size.test.tsandscripts/client-size.tsuse them. Both still raise a ceiling withFORGE_SIZE_WRITE=1.- The CLAUDE.md and
scripts/test_honesty.tsmentions of the old file are updated.
- Work ceilings. The
HEAVIERtable intest/pages-budget.test.tsis nowtest/budgets/pages/<page>.json, one file per page. Each file carries the page'spattern,statementsandgitcounts, plus the old "why" comment.test/helpers/page_budgets.tsreads them. - Behaviour. No numbers changed.
bun test test/client-size.test.ts, bun test test/pages-budget.test.ts, test/unused-exports.test.ts, tsc --noEmit and bun scripts/gate.ts --explain pass here. The full suite is left to the forge's check.
What I left out
MAX_UNFIXTURED. It is still one number intest/pages-budget.test.ts. A count of what has no fixture has no per-page home. It could be derived from a list of unfixtured patterns instead; that is a separate change.merge=unionfor AGENTS.md and docs/MCP.md.- The forge's own merge already keeps pure additions from both sides (
src/git/union.ts, used bymerge.tsandcombined.ts). - AGENTS.md is long single-line paragraphs, so a git
uniondriver would silently duplicate text when two pulls edit the same paragraph. - Over the last 7 days AGENTS.md was touched by 8 commits and
docs/MCP.mdby 6, so they are not hot. - The features index, threats and design sections are already one file per entry.
- The forge's own merge already keeps pure additions from both sides (
server.ts,mcp.ts, the openapi routes and the queue's "collides with #N in <file>". Each is its own pull.- The "before" measurement. I did not record the before-numbers the issue asks for first.
Try it
FORGE_SIZE_WRITE=1 bun test test/client-size.test.tsrewrites only the page files whose bytes moved.- To raise one page's work ceiling, edit its file under
test/budgets/pages/.
Direction: split the files every pull touches (#16331).
🤖 Generated with Claude Code
Pushed: this round meets the three requested fixes and the smaller points. The new test file passes, tsc is clean, and the gate reads 32 rules with none failing. test/client-size.test.ts and test/pages-budget.test.ts pass. I didn't run the rest of the suite.
What changed
- Doc wording. CLAUDE.md item 3 now reads "One file per page in
docs/design/size-budget/holds each first page's…" and says the command writes one file per page. Thescripts/test_honesty.tsheader says "the per-page files indocs/design/size-budget/". heavierPagesandreadCeilings. Both now throw on a malformed file or a duplicate pattern instead of dropping or overwriting it.heavierPagesneeds a stringpatternand a numericstatementsorgit.readCeilingsneeds a stringpageand numericjsandcss.
- New test.
test/page-budget-files.test.tscovers:- a temporary directory, including a file with no
statementsyielding no key; - a malformed file and a shared pattern or page, for both readers;
- every committed file under
test/budgets/pages/anddocs/design/size-budget/, each with a unique key.
- a temporary directory, including a file with no
- Smaller points.
- The imports in
src/measure/client_size.tsnow sit below the doc comment. scripts/client-size.tsusesfileURLToPath.settings-capacity.jsonhas awhy. I wrote it as "reads the machine, the app roster and the meters once each; constant in the number of apps". I didn't check it against the code, so please look at it.
- The imports in
- Linked issues. I opened #17035 (
MAX_UNFIXTURED), #17036 (server.ts) and #17037 (queue collisions). I did not link them to #16331 with the dependencies API.
Before number (point 1)
The issue's own 7-day table to 2026-11-24 is the baseline. It has test/pages-budget.test.ts at 18 commits and docs/design/size-budget.json at 12. I re-ran the count on origin/main for the 7 days to today, 2026-12-01. The top files are:
| Commits | File |
|---|---|
| 39 | src/http/server.ts |
| 28 | docs/features/talk.md |
| 25 | src/web/pages/talk.ts |
| 22 | test/talk-page.test.ts |
| 22 | src/web/pages/talk_client.ts |
| 21 | src/http/api.ts |
| 21 | scripts/unused-exports-allow.json |
| 20 | test/pages-budget.test.ts |
test/pages-budget.test.ts is the number this pull should move. Re-run the same count a week after merge. After merge, the 20 for pages-budget should become a handful of single-page files, and size-budget.json should stop appearing in the list.
I didn't touch the four failure patterns the check named. This pull doesn't reach them: no dead exports, no as never, no new during jobs, and no change to the capacity screen.
🤖 Generated with Claude Code
This pull does part (2) of the triage split: page ceilings are now one small file per page, so two pulls on two pages no longer edit the same lines. It does not do parts (1), (3) or (4), and the "before" numbers are not recorded yet.
What moved where
docs/design/size-budget.jsonis nowdocs/design/size-budget/<page>.json, one file per page holding{page, js, css}./ishome.json./:owner/:name/pulls/:numberisowner-name-pulls-number.json.readCeilings,writeCeilingsandceilingFileare insrc/measure/client_size.ts.test/client-size.test.tsandscripts/client-size.tsuse them. Both still raise a ceiling withFORGE_SIZE_WRITE=1.scripts/test_honesty.tsmentions of the old file are updated.HEAVIERtable intest/pages-budget.test.tsis nowtest/budgets/pages/<page>.json, one file per page. Each file carries the page'spattern,statementsandgitcounts, plus the old "why" comment.test/helpers/page_budgets.tsreads them.bun test test/client-size.test.ts,bun test test/pages-budget.test.ts,test/unused-exports.test.ts,tsc --noEmitandbun scripts/gate.ts --explainpass here. The full suite is left to the forge's check.What I left out
MAX_UNFIXTURED. It is still one number intest/pages-budget.test.ts. A count of what has no fixture has no per-page home. It could be derived from a list of unfixtured patterns instead; that is a separate change.merge=unionfor AGENTS.md and docs/MCP.md.src/git/union.ts, used bymerge.tsandcombined.ts).uniondriver would silently duplicate text when two pulls edit the same paragraph.docs/MCP.mdby 6, so they are not hot.server.ts,mcp.ts, the openapi routes and the queue's "collides with #N in <file>". Each is its own pull.Try it
FORGE_SIZE_WRITE=1 bun test test/client-size.test.tsrewrites only the page files whose bytes moved.test/budgets/pages/.Direction: split the files every pull touches (#16331).
🤖 Generated with Claude Code
Closes #16331