Repository navigation
Commit ada3cbb
chore(ui): re-pin the console eager-closure ceiling after the spec shared chunks (#26127)
<!-- claude-projects-attribution: {"github_login":"os-steve"} -->
_Requested by **Steve** · [project
thread](https://claude.ai/code/project/chan_01FdL1XeUyvVNxLreh3F4Qi9?thread=cmsg_01FdL1XeUyvVNxLreh3F4Qi9VQKUCrmuRDnacLPUeKUV3p)_
Part of #25925
Clause-②: no
Metadata-protocol: none
## What
Re-pins the console eager-closure budget in
`ui/scripts/check-eager-closure-budget.mjs` onto a reading of `main`,
and moves the two rendered-reading literals its unit test pins. Nothing
reaches a bundler input, nothing under `ui/packages/**` changes, so the
sdui manifest record does not move.
| constant | before | after |
|---|---:|---:|
| `MAX_EAGER_CLOSURE_GZIP_BYTES` | 3,579,945 | 2,489,948 (down
1,089,997) |
| `BASELINE` | 3,072,056 · 85 of 2291 · `b6f11d3` | 1,982,059 · 85 of
2387 · `cc378e93` |
| `PER_CHUNK_GZIP_CEILINGS['vendor-objectstack']` | 1,867,000 | 842,730
(down 1,024,270) |
| `PER_CHUNK_BASELINE['vendor-objectstack']` | 1,531,986 | 507,716 |
Each line comes down by exactly what its payload lost, so each keeps the
headroom it had: aggregate 507,889 bytes (0.71x the 695 KiB regression),
`vendor-objectstack` 335,014 (0.47x). The other three per-chunk rows
stayed in range and are untouched.
## Why
On `main` at `cc378e93` the gate exits 2: its headroom-sensitivity half
calls the aggregate ceiling (1560.4 KB of headroom, 2.25x) and the
`vendor-objectstack` row (1327.4 KB, 1.91x) blind. The closure shrank by
about a third since the objectui-era baseline, almost all of it
`vendor-objectstack`, after `@objectstack/spec` moved to one
shared-chunk ESM graph (`3a2d38c6e2`) and objectui moved into this
repository as `ui/`. How the drop splits between those two is not
measured.
## Readings (one container, one instrument)
`pnpm --filter '@object-ui/console^...' build`, then `CI=true pnpm exec
vite build` in `ui/apps/console`, both under
`scripts/pm/os-verify-lock.sh` (VERDICT command-exit 0), reading
`ui/apps/console/dist/eager-closure.json`.
| build | eager gz bytes | chunks | `vendor-objectstack` gz |
|---|---:|---:|---:|
| `main` `cc378e93` (control) | 1,982,059 | 85 of 2387 | 507,716 |
| `cc378e93` again, after the edit (re-read) | 1,982,059 | 85 of 2387 |
507,716 |
| experiment: both `SystemFieldName` imports replaced by a local
literal, uncommitted | 1,981,898 | 85 of 2387 | 507,693 |
The experiment moved the aggregate by -161 bytes (largest moves:
`vendor-objectstack` -23, `ui-components` -19, `index` -16): zero
saving. On-disk proof before its build: marker count 1 and old-import
count 0 in both files; restored with `git checkout HEAD --` under a
trap, both blob hashes equal to HEAD's and `git diff HEAD` empty
afterwards. The console aliases workspace packages to `src`, so the
build read the mutated sources.
## Gate output on this branch
`node scripts/check-eager-closure-budget.mjs` after the re-pin: closure
✅ 1935.6 KB / 2431.6 KB, per-chunk ✅ ×4, sensitivity ✅ ×5 (aggregate
0.71x, `vendor-objectstack` 0.47x). It still exits 1 on the membership
half, which this PR does not touch (see Acceptance notes).
## Acceptance notes
- The card's first step, repointing the two `SystemFieldName` imports at
`@objectstack/spec/data`, is not possible:
`packages/spec/src/data/index.ts` re-exports no `SystemFieldName` (it is
declared in `packages/spec/src/system/constants/system-names.ts` and
reaches consumers through `system/index.ts` only), so the repoint would
fail type-check. It would also save nothing: `FlowRunner.tsx` and
`flowResponse.ts` in app-shell still import `/system` by value, and the
local-literal experiment above measured -161 bytes. Both import lines
are left as they are.
- The membership half reds on `main` before and after this change:
"`packages/core` is declared in `framework` but 1 in
`vendor-objectstack` (89 of its 90 modules landed in `framework`)".
Which module moved is not measured here. Its fix lives in the grouping
rules in `ui/apps/console/vite.config.ts`, outside this card's file
surface, and the gate itself says not to move a ceiling to absorb it.
- No workflow under `.github/workflows/` runs `check:eager-closure`
today, so the gate is local-only until the ui CI lands; this re-pin
makes it meaningful again when it does.
- The spec half of #25925 (re-exporting `stripReadDecorations` /
`ValidateDataIssueSchema` from a subpath the console already loads) is
`domain:spec` work and is not addressed here.
## Tests
- `./node_modules/.bin/vitest run --maxWorkers=2` in `ui/` over
`scripts/__tests__/check-eager-closure-budget.test.ts` plus the five
other test files that name the checker (`check-eager-locale-catalogues`,
`check-side-effects-array`, `vite-declared-lazy-views`,
`vite-types-zod-lazy`, `vite-ineffective-dynamic-imports`): Test Files 6
passed (6), Tests 300 passed (300). Before the literal move, the same
run failed exactly the two cases that pin the rendered reading.
- No changeset: `ui/scripts/**` belongs to the private
`object-ui-monorepo` root and publishes nothing.
---
_Generated by [Claude
Code](https://claude.ai/code/session_01PykFDU1CQLdgAD1T6LPhLS)_
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent bd28708 commit ada3cbb
2 files changed
Lines changed: 81 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
833 | 833 | | |
834 | 834 | | |
835 | 835 | | |
836 | | - | |
837 | | - | |
838 | | - | |
| 836 | + | |
| 837 | + | |
| 838 | + | |
| 839 | + | |
839 | 840 | | |
840 | 841 | | |
841 | 842 | | |
| |||
1672 | 1673 | | |
1673 | 1674 | | |
1674 | 1675 | | |
1675 | | - | |
| 1676 | + | |
1676 | 1677 | | |
1677 | 1678 | | |
1678 | 1679 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1367 | 1367 | | |
1368 | 1368 | | |
1369 | 1369 | | |
| 1370 | + | |
| 1371 | + | |
| 1372 | + | |
| 1373 | + | |
| 1374 | + | |
| 1375 | + | |
| 1376 | + | |
| 1377 | + | |
| 1378 | + | |
| 1379 | + | |
| 1380 | + | |
| 1381 | + | |
| 1382 | + | |
| 1383 | + | |
| 1384 | + | |
| 1385 | + | |
| 1386 | + | |
| 1387 | + | |
| 1388 | + | |
| 1389 | + | |
| 1390 | + | |
| 1391 | + | |
| 1392 | + | |
| 1393 | + | |
| 1394 | + | |
| 1395 | + | |
| 1396 | + | |
| 1397 | + | |
| 1398 | + | |
| 1399 | + | |
| 1400 | + | |
| 1401 | + | |
| 1402 | + | |
| 1403 | + | |
| 1404 | + | |
| 1405 | + | |
1370 | 1406 | | |
1371 | | - | |
| 1407 | + | |
1372 | 1408 | | |
1373 | 1409 | | |
1374 | 1410 | | |
| |||
1381 | 1417 | | |
1382 | 1418 | | |
1383 | 1419 | | |
| 1420 | + | |
| 1421 | + | |
| 1422 | + | |
| 1423 | + | |
| 1424 | + | |
| 1425 | + | |
| 1426 | + | |
| 1427 | + | |
| 1428 | + | |
| 1429 | + | |
| 1430 | + | |
| 1431 | + | |
1384 | 1432 | | |
1385 | 1433 | | |
1386 | 1434 | | |
| |||
1547 | 1595 | | |
1548 | 1596 | | |
1549 | 1597 | | |
1550 | | - | |
| 1598 | + | |
1551 | 1599 | | |
1552 | | - | |
1553 | | - | |
| 1600 | + | |
| 1601 | + | |
1554 | 1602 | | |
1555 | 1603 | | |
1556 | 1604 | | |
| |||
1560 | 1608 | | |
1561 | 1609 | | |
1562 | 1610 | | |
1563 | | - | |
| 1611 | + | |
| 1612 | + | |
| 1613 | + | |
1564 | 1614 | | |
1565 | 1615 | | |
1566 | 1616 | | |
| |||
2147 | 2197 | | |
2148 | 2198 | | |
2149 | 2199 | | |
2150 | | - | |
| 2200 | + | |
| 2201 | + | |
| 2202 | + | |
| 2203 | + | |
| 2204 | + | |
| 2205 | + | |
| 2206 | + | |
| 2207 | + | |
| 2208 | + | |
| 2209 | + | |
| 2210 | + | |
2151 | 2211 | | |
2152 | 2212 | | |
2153 | 2213 | | |
| |||
2318 | 2378 | | |
2319 | 2379 | | |
2320 | 2380 | | |
2321 | | - | |
| 2381 | + | |
2322 | 2382 | | |
2323 | 2383 | | |
2324 | 2384 | | |
2325 | | - | |
2326 | | - | |
| 2385 | + | |
| 2386 | + | |
| 2387 | + | |
| 2388 | + | |
2327 | 2389 | | |
2328 | 2390 | | |
2329 | 2391 | | |
| |||
2399 | 2461 | | |
2400 | 2462 | | |
2401 | 2463 | | |
2402 | | - | |
| 2464 | + | |
| 2465 | + | |
| 2466 | + | |
| 2467 | + | |
| 2468 | + | |
2403 | 2469 | | |
2404 | 2470 | | |
2405 | 2471 | | |
| |||
0 commit comments