From 4063486c989b8ee57d6e7bc928e7a79fd6203222 Mon Sep 17 00:00:00 2001 From: Jack <72348727+Jack-GitHub12@users.noreply.github.com> Date: Thu, 12 Nov 2026 16:49:15 -0600 Subject: [PATCH 1/2] fix(site): the read API page fits its weight budget again, so the site deploys /docs/api/read is 30.3KB brotli with the weight edit and checkpoint fields from #32, over its 30KB budget, which stopped the Site workflow before the deploy. The page is part of the generated API reference and grows with the tool, so its budget goes to 33KB, about 10% over what it measures. --- apps/site/scripts/perf-budget.mjs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/site/scripts/perf-budget.mjs b/apps/site/scripts/perf-budget.mjs index 6a991768..408593ea 100644 --- a/apps/site/scripts/perf-budget.mjs +++ b/apps/site/scripts/perf-budget.mjs @@ -21,11 +21,12 @@ const BUDGET = { // troubleshooting, which gains an entry per failure a new feature can show // (27.8KB with the 0.1.6 entries). Raised from 26KB for those three. // Troubleshooting is 30.5KB after the docs rebuild of 2026-11-11, so 33KB. + // /docs/api/read is 30.3KB with the weight edit and checkpoint fields, so 33KB. htmlBrotli: { "/": 24.5 * KB, "/docs/cli/": 30 * KB, "/docs/api/": 30 * KB, - "/docs/api/read/": 30 * KB, + "/docs/api/read/": 33 * KB, "/docs/api/read/search/": 30 * KB, "/docs/troubleshooting/": 33 * KB, other: 26 * KB, From fca87810fc435cab842d47307378d1d6d2776cd1 Mon Sep 17 00:00:00 2001 From: Jack <72348727+Jack-GitHub12@users.noreply.github.com> Date: Thu, 12 Nov 2026 16:49:15 -0600 Subject: [PATCH 2/2] ci: a page over the site's weight budget fails the pull request, not the deploy The budget ran only in the Site workflow on main, so #32 passed CI and then stopped the deploy. CI now runs it after the site build, on the Linux Node 24 leg, the same OS and Node as the Site workflow. --- .github/workflows/ci.yml | 7 +++++++ docs/perf.md | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3aee47df..cff229ef 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -126,6 +126,13 @@ jobs: CODING_SH_REQUIRE_DIST: "1" run: npm run check + # The Site workflow runs this on main and stops the deploy when a page is over budget. + # Running it here, on the same OS and Node as that workflow, fails the pull request instead. + - name: Site perf budget + if: matrix.shard == 1 && runner.os == 'Linux' && matrix.node == '24.x' + working-directory: apps/site + run: npm run perf:budget + # The built output holds nothing shaped like a secret. - name: Secret scan of the built output if: matrix.shard == 1 diff --git a/docs/perf.md b/docs/perf.md index 86168b5d..95d32d37 100644 --- a/docs/perf.md +++ b/docs/perf.md @@ -125,7 +125,7 @@ page has its own blocking-time budget on the slow phone. The rules are in |---|---| | Pull requests | GitHub's hosted runners. Load-time budgets are skipped: they only hold on our own machine. | | Pushes to main | The one desk runner labelled `perf`, so two perf runs never overlap. CI and deploys run beside it. | -| Deploys | `npm run perf:budget` in apps/site checks page weight, inline CSS and script, fonts, scripts and images in the build. | +| Pull requests and deploys | `npm run perf:budget` in apps/site checks page weight, inline CSS and script, fonts, scripts and images in the build. CI runs it on every pull request, and the Site workflow runs it again before a deploy. | The desk runs other jobs, so each sample records `cpu_busy`, the share of CPU in use while the page loaded. A load-time budget counts only samples at 0.5 or less (`--quiet-cpu`). When fewer