Skip to content

test(tech-detect): 34 scripts at the page cap with the loader in the last window; deterministic allocation #1445 - #1472

Closed
nc9 wants to merge 1 commit into
mainfrom
test/page-budget-34-scripts-1445
Closed

nc9 wants to merge 1 commit into
mainfrom
test/page-budget-34-scripts-1445

Conversation

@nc9

@nc9 nc9 commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

Follow-up to #1453 (issue #1445): the two items its review left as residual.

  • A page of the issue's size, 34 scripts at the 512 KB page cap (12 of 10 KB, 21 of 40 KB, then a late bundle: 472 KB of heads, about 40 KB of room), with the loader literal in the last bundle's hint window, for PostHog, Stripe and Sentry. It fails on the code before fix(tech-detect): choose every bundle's hint windows before any remainder or tail takes page budget #1445 #1453 (d8bc9c4a^) and passes on main.

  • A determinism test: the same 34-script page built twice gives byte-identical inputs, and the page budget holds.

  • A seeded fuzz test (200 seeds: 5 to 36 scripts of 1 to 48 KB, random order, 0 to 2 loaders each at random offsets, three cap sets): the page, audit and bundle budgets hold on every page and a rebuild is byte-identical (about 4 s). With the page limit dropped from the room calculation it fails.

Tests only, no source change, so no CHANGELOG entry or docs. Local: tech-extras-budget-1420.test.ts (28 pass).

Skill: no change needed.

nik

…last window, and the page allocation is deterministic #1445

Signed-off-by: Nik Cubrilovic <[email protected]>
@nc9
nc9 force-pushed the test/page-budget-34-scripts-1445 branch from 0336011 to d36f8ab Compare November 1, 2026 02:51
@nc9 nc9 mentioned this pull request Nov 1, 2026
@nc9

nc9 commented Nov 1, 2026

Copy link
Copy Markdown
Contributor Author

@nc9 nc9 closed this Nov 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant