Repository navigation
Quality views: size gate finds each measured chunk exactly once - #611
Merged
neuromechanist merged 4 commits intoNov 26, 2026
Merged
neuromechanist merged 4 commits into
neuromechanist merged 4 commits into
Conversation
The size gate took the first file in dist/_astro holding the panel's loading sentence, which the admin drill-down's chunk also holds, so macOS measured admin-drill and Linux the panel. namedChunk (quality-views-size-lib.mjs) now requires the chunk name prefix and the marker together, and every lookup in siteUnions (panel, tabs, export, island) fails the gate naming the matches unless exactly one chunk matches. Budgets and the measured sets are unchanged. Tested: test/quality-views-size.test.ts (fails 5 of 5 new cases on the old lookup) and the gate on a real build.
4 tasks done
Deploying nemar-website with
|
| Latest commit: |
afd214b
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://3774159c.nemar-website.pages.dev |
| Branch Preview URL: | https://fix-608-gate-panel-lookup.nemar-website.pages.dev |
astro check refused indexing the literal chunk map by a string. Tested: bun run typecheck (0 errors), test/quality-views-size.test.ts.
lookupStem and lookupIsland (quality-views-size-lib.mjs) hold the chunk-name prefix with its trailing dot, CHUNK_MARKERS and ISLAND_PREFIX, and siteUnions uses them. Tests cover panel beside panel-words, panel-model and panel-bridge, a panel chunk without its sentence, the export's chunks and the island; three fail with the trailing dot dropped. The test comment no longer ties the lookup order to an OS. Tested: quality-views-size tests (21), typecheck, lint.
…progress' into fix/608-gate-panel-lookup
neuromechanist
merged commit Nov 26, 2026
8143331
into
feature/issue-586-epic-pipeline-progress
3 of 4 checks passed
13 of 15 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The size gate's panel lookup, option (a) from #610: every machine now measures the same chunk.
The bug
siteUnionsinscripts/check-quality-views-size.mjstook the first file indist/_astro/that held the panel's loading sentence, "Loading the recording's quality views".Since W9 (#598) the admin drill-down's chunk (
admin-drill.<hash>.js) holds that sentence too.Which of the two
readdirSynclists first is the file system's choice (APFS and ext4 differ, and every content hash moves it).So on c441d5d macOS measured
admin-drill(15 and 17 files, 29.8 KB) while CI measured the panel (16 and 18 files, 30.0 KB, over), and at #602 it was the other way round.The build itself is byte-identical on both.
The change
namedChunk(files, prefix, marker)inscripts/quality-views-size-lib.mjs: a chunk whose file name starts with the module's name (panel.) and, when a marker is given, holds the marker.Exactly one must match; otherwise it returns an error naming none or the several matches.
lookupStem(files, stem)andlookupIsland(files)hold whatsiteUnionsasks for each name: the prefix<stem>.(the dot keepspanelfrompanel-words,panel-model,panel-bridge), the sentence fromCHUNK_MARKERS, andISLAND_PREFIX.siteUnionsuses them: the panel (panel.with its sentence), the export's controls and images (controls.,picture.with their sentences), the tabs' and export parts' chunks by name alone, and the panel's island script.A lookup that does not find exactly one chunk adds a failing line that says why, once per name, so the gate exits 1; a tab that needs it says it was not measured.
Tests
test/quality-views-size.test.ts, "the chunk a first screen is measured from", on fake chunks written to a temporary directory and read back as the script readsdist/_astro/:panel.(and anotherpanel.chunk without it): the panel is picked, in either listing order;panel.chunk holds it, or two do: the lookup fails, naming them;With the old lookup (the first match in the directory's order) all 5 cases fail; on APFS the first case picks
admin-drill, the bug itself."the names the gate looks up" runs
lookupStemandlookupIslandon the chunks Vite emits beside the panel's (panel-words,panel-model,panel-bridge, another component'spanel, the admin's, the island): the panel is found even when its sentences chunk holds the loading sentence too; a panel chunk without its sentence fails; the export's chunks are found by theirs; two island scripts fail. With the trailing dot dropped, 3 of these 4 fail.On a real build (macOS)
On this branch (the epic head, without #610) the gate now measures the real panel on macOS too, as CI did, and fails as CI did:
With #610 merged on top (locally, not committed), every line passes:
No lookup found none or several chunks on either build.
Update: #610 has landed and the epic is merged into this branch (afd214b). On the merged build the gate measures the panel and passes:
Before that merge, this PR's
Quality-view bundle sizesstep is red on CI as well, which is the correct result for the epic head: CI run 45876064628 on 5429a2a measured the panel (16 and 18 files) and printed the same six lines as the macOS run above, both no-preload screens OVER at 30.0 KB.Vitestthere fails only on the three nemar-cli drift tests (12 tests), as on the epic head.Tested
bunx vitest run test/quality-views-size.test.ts(21 passed); 5 of 5 lookup cases fail on the old lookup, 3 of 4 name cases without the trailing dotbun run test(271 files),bun run typecheck(0 errors),bun run lintbunx astro build && bun scripts/check-quality-views-size.mjs --require-buildon this branch, and with Quality views: first screen back under budget on the Linux build #610 merged locallyAgentic AI tools were used. The author assumes full responsibility for this content.