From 268bca63a0edbaa2d252bd45d21a820f5ea4007f Mon Sep 17 00:00:00 2001 From: Abir Abbas Date: Wed, 9 Sep 2026 16:51:37 -0400 Subject: [PATCH 1/3] =?UTF-8?q?build:=20the=20ratchet=20is=20answered=20?= =?UTF-8?q?=E2=80=94=2057,488,000,=20and=20PERF.md=20says=20what=20spent?= =?UTF-8?q?=20it?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit #624 was the last merge that weighed in under the cap. By dev@8d8cd6c8 the binary had grown 1,908,736 bytes and crossed a number nobody moved, so `make check` — the ritual CLAUDE.md sends everybody to — stopped at its last step for every change on dev, whatever that change touched. Nobody caused it and nobody could clear it from inside their own work. The first of the two honest moves was looked for and is not there. The range added no dependency; the only embed that grew is the chat manual's own pack, already gzipped and required by the manual law. What is left is compiled first-party code — .text +1,030,464 and .gopclntab +592,718 of the 1,908,736, against +26,203 net non-test lines in internal/tui3 and +13,011 in internal/session. Of the dependencies, the three that weigh anything sit behind the store and behind the JavaScript a saved program is written in; dropping either is a product decision and not a size fix, and taking all of goja and its collation tables would still leave darwin/amd64 over the old cap. So the number rises, with its measurement beside it, which is that section's own standing rule. 57,488,000 is two percent above darwin/amd64 at 56,360,432 — the heaviest of the four platforms, each built with its own furrow staged — the same headroom every figure in that section was given. Co-Authored-By: Claude Fable 5.1 --- PERF.md | 68 +++++++++++++++++++++++++++++++++++++++++++++++++++++ SIZE-BUDGET | 2 +- 2 files changed, 69 insertions(+), 1 deletion(-) diff --git a/PERF.md b/PERF.md index 2dac2f629..908b10830 100644 --- a/PERF.md +++ b/PERF.md @@ -135,6 +135,74 @@ all four, each with its own furrow artifact staged: The budget is 54,600,000, two percent above darwin/amd64, the same headroom every figure in this section was given, now over a smaller binary. +It was reset a fifth time on 2026-09-09, and this one is drift and not a +decision: nobody bought anything with these bytes on purpose, and nobody could +clear the red from inside their own change. #624 was the last merge that weighed +in under the cap. By `dev@8d8cd6c8` the binary had grown 1,908,736 bytes and +crossed a number nobody moved, so `make check` — the end-of-change ritual +CLAUDE.md sends everybody to — stopped at its last step for every change on +`dev`, whatever that change touched (#724). linux/amd64, Go 1.26.5, each figure +a `make build`: + +| merged | bytes | added | +| --- | --- | --- | +| #624, the last merge under the cap | 53,633,289 | | +| #653 | 55,234,825 | 1,601,536 | +| #658 | 55,271,689 | 36,864 | +| #673 | 55,382,281 | 110,592 | +| #689 | 55,501,065 | 118,784 | +| #721 (`8d8cd6c8`) | 55,542,025 | 40,960 | + +**#653 is 84% of it and crossed the cap by itself** — a wave of conversation +navigation, context browsing and task delivery. The rest is the ordinary +accretion of twenty-odd merges, none of them over 120 KB. + +The first of the two honest moves above was looked for and is not there. The +range added no dependency: the only `go.mod` change moves +`github.com/rivo/uniseg` from indirect to direct and it was already linked. The +one embed that grew is `internal/manual/chat.pack.gz`, 707,105 to 782,330, which +is the manual learning about the features that landed — already packed, already +gzipped, and required by the manual law in CLAUDE.md. What is left is compiled +first-party code, which the two binaries say section by section: + +| section | bytes | +| --- | --- | +| `.text` | +1,030,464 | +| `.gopclntab` | +592,718 | +| `.rodata` | +198,176 | +| `.noptrdata` | +75,200 | +| everything else | under 7,000 each | + +and which the source says the same way: +26,203 net non-test lines in +`internal/tui3`, +13,011 in `internal/session`, +2,509 in `internal/remote`, ++1,210 in `cmd/aforge`. `.gopclntab` grows with `.text` on its own and is what +`-s -w` already leaves; there is nothing there for a packer to take back. + +The dependencies were weighed too, since dropping one is the other half of that +first move. Ranked by the file bytes their symbols occupy in `bin/aforge`, the +three that matter are `modernc.org/sqlite` at 1,807,889, `github.com/dop251/goja` +at 1,791,194 and `golang.org/x/text` at 1,538,848 — and `x/text/collate` is +1,267,813 of that last figure, pulled in by goja rather than by anything here. +Each sits behind a shipped capability: the store, and the JavaScript a saved +program is written in (`internal/jsrun`). Dropping either is a product decision +and not a size fix, so it is not this change's to make, and taking all of goja +and its collation tables would still not put darwin/amd64 under the old cap. + +The same tree built for all four platforms, each with its own furrow artifact +staged: + +| platform | bytes | +| --- | --- | +| linux/arm64 | 51,052,706 | +| darwin/arm64 | 52,082,226 | +| linux/amd64 | 55,542,025 | +| darwin/amd64 | 56,360,432 | + +The budget is 57,488,000, two percent above darwin/amd64, the same headroom +every figure in this section was given. A reset this size that buys nothing is +worth saying out loud rather than rounding away: the ratchet did its job, which +was to make a year of quiet accretion arrive as one line somebody has to sign. + ## Adaptive run shutdown grace `Agent.Close` cancels adaptive runs and their name calls, then gives all accepted diff --git a/SIZE-BUDGET b/SIZE-BUDGET index b480208c3..9d1b39b87 100644 --- a/SIZE-BUDGET +++ b/SIZE-BUDGET @@ -1 +1 @@ -54600000 +57488000 From 64523aa5b3d86fa4ceabc51244a0fa2007878549 Mon Sep 17 00:00:00 2001 From: Abir Abbas Date: Wed, 9 Sep 2026 16:51:43 -0400 Subject: [PATCH 2/3] build: the ratchet names the platform its number was measured on MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Both places a person reads about the budget still said linux/arm64, which stopped being true at #235 — the number has been set on darwin/amd64, the heaviest of the four platforms, since the reset that came down. So the refusal told whoever hit it to reset against an architecture the figure was never taken from, and the nightly line printed the same wrong provenance beside a real measurement. The comment on the informational job said the two numbers "are not comparable". They are comparable and that is the point: linux/amd64 weighs about eight hundred kilobytes less than darwin/amd64, so a hard compare there would pass a tree that is over the cap on the platform the cap is measured on. That is why it stays informational, and the comment now says so. Co-Authored-By: Claude Fable 5.1 --- .github/workflows/ci-full.yml | 13 +++++++------ Makefile | 7 ++++--- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci-full.yml b/.github/workflows/ci-full.yml index d790e4762..1fbcab2d2 100644 --- a/.github/workflows/ci-full.yml +++ b/.github/workflows/ci-full.yml @@ -218,11 +218,12 @@ jobs: gh issue create --title "$title" --label bug --body "$body" fi - # THE BINARY'S WEIGHT, REPORTED AND NOT ENFORCED — YET. SIZE-BUDGET was set on - # linux/arm64 with the toolchain of the day, and this runner is linux/amd64, - # so the two numbers are not comparable and a hard compare here would be red - # for a reason nobody caused. It prints both so the drift is visible; making - # it block means first agreeing which architecture the budget is measured on. + # THE BINARY'S WEIGHT, REPORTED AND NOT ENFORCED — YET. SIZE-BUDGET is set on + # darwin/amd64, the heaviest of the four platforms, and this runner is + # linux/amd64, which weighs about eight hundred kilobytes less — so a hard + # compare here would pass a tree that is over the cap on the platform the cap + # is measured on. It prints both so the drift is visible; making it block + # means first weighing darwin here, which this runner cannot do. size: name: size (informational) runs-on: ubuntu-latest @@ -240,5 +241,5 @@ jobs: make build actual="$(stat -c%s bin/aforge)" budget="$(cat SIZE-BUDGET)" - printf 'bin/aforge on linux/amd64: %s bytes. SIZE-BUDGET (set on linux/arm64): %s.\n' \ + printf 'bin/aforge on linux/amd64: %s bytes. SIZE-BUDGET (set on darwin/amd64): %s.\n' \ "$actual" "$budget" diff --git a/Makefile b/Makefile index d573d8284..7b82f5afc 100644 --- a/Makefile +++ b/Makefile @@ -250,9 +250,10 @@ size: build printf 'dependency, stop embedding what can be fetched — or raise the number\n'; \ printf 'in %s IN THIS COMMIT, so the extra weight is a decision somebody\n' '$(BUDGET)'; \ printf 'signed for rather than a drift nobody saw. PERF.md states the policy.\n\n'; \ - printf 'The budget was set on linux/arm64 with the toolchain of the day. A\n'; \ - printf 'different platform or a new Go release moves this number on its own;\n'; \ - printf 'that too is a reason to reset it deliberately, never to ignore red.\n\n'; \ + printf 'The budget is set on darwin/amd64, the heaviest of the four\n'; \ + printf 'platforms, with the toolchain of the day. A new Go release moves\n'; \ + printf 'this number on its own; that too is a reason to reset it\n'; \ + printf 'deliberately, never to ignore red.\n\n'; \ exit 1; \ fi; \ printf '%s: %s bytes, under the %s budget of %s.\n' '$(BINARY)' "$$actual" '$(BUDGET)' "$$budget" From 7b0944e62442436dd1cc17eba3921712252f9930 Mon Sep 17 00:00:00 2001 From: Abir Abbas Date: Wed, 9 Sep 2026 16:53:22 -0400 Subject: [PATCH 3/3] changes: the entry for the ratchet's fifth reset Co-Authored-By: Claude Fable 5.1 --- .../726-the-size-budget-is-answered.md | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 docs/changes/unreleased/726-the-size-budget-is-answered.md diff --git a/docs/changes/unreleased/726-the-size-budget-is-answered.md b/docs/changes/unreleased/726-the-size-budget-is-answered.md new file mode 100644 index 000000000..9a2999bdc --- /dev/null +++ b/docs/changes/unreleased/726-the-size-budget-is-answered.md @@ -0,0 +1,30 @@ +--- +kind: changed +title: The binary's budget is 57,488,000, and PERF.md says what spent the 1.9 MB that crossed the old one +pr: 726 +surface: [build, docs] +invalidates: + - "`SIZE-BUDGET` was 54,600,000 and `make check` had been red at its last step on `dev` since #653 — for every change, whatever it touched. It is 57,488,000, two percent above darwin/amd64 at 56,360,432, and `make check` runs to the end again." + - "The refusal `make size` prints, and the informational size job in `ci-full.yml`, both said the budget was set on linux/arm64. It has been set on darwin/amd64 — the heaviest of the four platforms — since #235, and both now say so. Anybody who reset the number against linux/arm64 because the message told them to was resetting it against an architecture it was never measured on." + - "That CI comment also said the runner's number and the budget 'are not comparable'. They are: linux/amd64 weighs about eight hundred kilobytes less than darwin/amd64, which is exactly why the job stays informational — a hard compare there would pass a tree that is over the cap on the platform the cap is measured on." + - "`PERF.md`'s size-ratchet section ended at the fourth reset (#235, the first one downward). It carries a fifth: the per-merge attribution from #624 to #721, the section-by-section split of the growth, the dependency weights that were checked before the number moved, and the four-platform table the figure was taken from." +--- + +The ratchet did the job it exists for: a year's habit of quiet accretion arrived +as one line somebody has to sign. #624 was the last merge under the cap; by +#721 the binary had grown 1,908,736 bytes, of which #653 is 1,601,536 and +crossed the cap by itself. The rest is twenty-odd merges, none over 120 KB. + +`PERF.md` allows two honest moves and the first one was looked for first. The +range added no dependency — the only `go.mod` change moves `rivo/uniseg` from +indirect to direct and it was already linked. The one embed that grew is the +chat manual's own pack, 707,105 to 782,330, already gzipped and required by the +manual law. What is left is `.text` +1,030,464 and `.gopclntab` +592,718 of +compiled first-party code, against +26,203 net non-test lines in +`internal/tui3` and +13,011 in `internal/session`. The three dependencies that +weigh anything — `modernc.org/sqlite`, `dop251/goja` and the `x/text/collate` +tables goja pulls with it — each sit behind a shipped capability, and taking all +of goja would still have left darwin/amd64 over the old number. + +Nothing a person can see in the running program changes. This is a number, its +paragraph, and two messages that had been naming the wrong architecture.