Repository navigation
Fix: unit-suite headroom and mixed-sign row height race (#76, #87) - #94
Merged
Merged
Conversation
A summary's height reached the row one commit after its cells drew the summary geometry (the virtualizer applies it via resizeItem in a microtask after commit), so a 53px cell could be committed - and in Chromium painted - inside a 52px row. Cells now draw the summary geometry only once their row has that height, and stay pending at the row's current height until then. The mixed-sign grid test checks every mutation batch and runs its geometry checks on a settled grid. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…n mock (Refs #76) Each large-workload test paid ~2 s (more under load) for the mock's defensive copy of the 220 x 2,000+ catalog, and every 100-row page rebuilt the whole selection's represented-row union (~150 ms per page for 220 processes). freezeComparisonCatalog deep-freezes a catalog so mocks read it without copying; flowRows builds the sorted row set once per snapshot and process set, per mock instance, bounded like tokens. Responses are still copied, and outputs, ordering, tokens, latency, cancellation and errors are unchanged. The grid harness freezes its catalog; a new mock test checks frozen and copied catalogs serve the same pages and that instances do not share tokens. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…76) The selected-list test clicked 300 tree rows one by one, re-rendering every mounted tree row each time (~10 s alone, 27-29 s of its 30 s limit under parallel load). One branch selection adds the same 300 leaves in the same name order; every list assertion is unchanged. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Comment only; the hold budget and assertions are unchanged. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This host allows two container suites at once. On 8 cores, two concurrent full runs with the default workers failed 4 + 3 tests (104-106 s each, load 13); with maxWorkers 50% both passed with no failure in 76 s each. Measurements are recorded in docs/engineering/unit-headroom-verification.md; every test file still runs in npm run test:unit and CI. Co-Authored-By: Claude Opus 5.5 <[email protected]>
, #93) Baseline at af5317d, the #87 probes and classification (geometry defect), the remedies with before/after numbers, the AC3 runs and every AC4 two-suite attempt at decb56a, the #93 probe, gates and residual risk. f4-verification.md points to the new document. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…Refs #93) pin() scrolled with element.scrollTo, but the virtualizer learns the new offset only from the asynchronous scroll event, so the render scheduled by resizeItem committed the window at the old offset, above the view, and unmounted loaded rows in view (the D1/D2 focus race). Hand the virtualizer the read-back offset and re-render before paint (flushSync from the resize microtask, a normal update from the layout effect), after the pins are updated so the render does not move the view again. Adds a regression test that checks every mutation batch after the deep jump for rows covering the viewport and loaded rows kept mounted. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Adds the #93 section (probe sequence, classification B, fix, regression, stability), the two-suite attempts and AC3 runs at 9374bde, and corrects the residual risk: anchoring :183 reached 92.3 % in QA's pair 3 B. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
6 tasks
This was referenced Nov 16, 2026
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.
Refs #76
Refs #87
Refs #93
Unit-suite headroom (#76), the intermittent mixed-sign row/cell height mismatch (#87) and the deep-focus window race (#93), in one PR. The maintainer decided #76/#87; the coordinator added #93 after QA's AC4 FAIL. Evidence is in
docs/engineering/unit-headroom-verification.md.#87: geometry defect (class B), fixed in product code
row.size, whichresizeItemupdates one commit later, from a microtask after the layout effect.ComparisonGridpasses each cell renderer the row's height in that commit.FlowsGriddraws the summary geometry only once the row has that height; until then the cell stays pending at the row's height. View anchoring ([Task] F4 — Virtualize comparison rows and columns with sticky alignment #23 D2–D4) is unchanged, and the Intermittent mixed-sign grid row/cell height assertion in frontend CI #87 fix itself adds noflushSync(the Bug: deep-scroll focus test loses row 1310 under load (flows-grid D1/D2) #93 fix below adds one, outside lifecycle methods).src/services/mock/runs.#93: window committed above the view (class B), fixed in product code
pin()then scrolls by how far the anchor flow moved (+695 px in D1/D2). The virtualizer learns the new offset only from the asynchronous scroll event, so the render already scheduled byresizeItemcommits the window at the old offset: rows 1282–1305, above the view at 68,315. That unmounts row 1310, which is loaded and in view.resize > pin > render, across 2,880 rAF frames over 72 deep jumps. No painted frame failed.ComparisonGrid.tsx).pin()scrolls, it setsrowWindow.scrollOffsetto the read-backscrollTop.flushSyncfrom the resize microtask (not a lifecycle method), and a normal update from the layout effect.scrollTo, the D1/D2 test and every budget are unchanged.flows-grid.test.tsxtest checks every mutation batch after the deep jump: the mounted rows must cover the viewport, and loaded rows that were in view must stay mounted.#76: cheaper tests, no raised limits
freezeComparisonCataloglets a mock read a deep-frozen catalog without its ~2 s defensive copy.flowRowsbuilds a selection's row set once per instance, instead of ~150 ms of work per 100-row page. Outputs, tokens, latency, cancellation and errors are unchanged.maxWorkers: "50%". Two concurrent suites at the default workers failed 4 + 3 tests; with this setting they pass and finish faster (76 s against 105 s).Modified tests (AC5)
flows-grid.test.tsx› sizes mixed-sign rows…selection.test.tsx› bounds mounted list items for 300 selectionscomparison.test.ts› serves a frozen catalog… (new)flows-grid-hold.test.tsx› holdflows-grid.test.tsx› keeps the rows in view mounted in every commit… (#93, new)No limit or budget changed (AC6). The one config change is
maxWorkers, with before/after numbers (AC7).Checks at
decb56a, in the container (before #93)flows-grid-anchoring.test.tsx:183(1 s default wait) at 92.3 % in pair 3 B. My earlier "61 %, nothing above 90 %" was wrong fordecb56aas a whole.Checks at
9374bde(final code), in the containerComparisonGrid.tsxfromdecb56a, and passes 3 of 3 with the fix.settled, 15 s), 31.2 % (anchoring:183, 1 s).settled), 66.4 % (anchoring:183). Nothing was above 90 %. Pair 1 has no per-test durations, because my timing setup read them too early; its waits were recorded.npm ci: lockfile unchanged.format:check,lint,typecheckandbuildpass.@smoke: 14 passed.Limitations
flows-grid-anchoring.test.tsx:183, a 1 s default wait, reached 92.3 % once under two suites atdecb56a(41–66 % at9374bde). Its budget is not raised.qualityand theworkflow_dispatchfull run are recorded in the issue handoff.🤖 Generated with Claude Code