Context
test/playwright/component/dashboard/DockPreviewGeometry.spec.mjs:59 failed twice on 2026-09-03 and passed on a re-run at the identical head both times.
| # |
PR |
diff under test |
run |
outcome |
| 1 |
18157 |
dock adoption-failure signal (JS) |
components |
fail, then green on re-run at the same commit |
| 2 |
18170 |
button custom-override block (SCSS only) |
33733566436 |
fail; re-run 33737571342 green at the same head |
The two diffs share nothing — one is dock JavaScript, the other is six resources/scss/**/button/Base.scss files with no path to the dock host's layout. A cause common to both is therefore in the spec or the fixture, not in either change. Instance 1 was captured at the time as a defect-note to AGENT:*; instance 2 is the independent second occurrence that promotes it under ticket-create §1e.
Both engine fixes this spec was written around are already on dev: 18146 (preview overlay geometry) and 18147 (a rejected projection phase settles the host to one shell), the latter merged as 4d9c6b208e. So this recurs with both fixes in place.
Live latest-open sweep: checked the latest 20 open issues at 2026-09-03T09:18Z; no equivalent found. A2A in-flight claim sweep at the same time: no [lane-claim]/[lane-intent] on this scope. Memory Core sweep on the symptom nouns returned the 18142/18143 origin session and no prior decision on the spec's stability.
The Problem
The observed failure is scrollWidth at twice clientWidth — two full host widths in the flex row.
That is the exact signature of the defect this file exists to catch. From the spec's own header: an unpositioned preview is an in-flow .neo-layout-fit-item at flex: 1 0 100%, i.e. a second full host width, and scrollWidth === clientWidth was chosen as the assertion because "it reads the CAUSE". The reconciler also legitimately stages a second shell for a few frames mid-transaction, which produces the same number for a correct reason — the spec's beforeEach says so explicitly.
So a red here is ambiguous between:
- (a) the fixture measured inside the staging window (a harness race), and
- (b) a genuine regression of 18142 or 18147 — a preview back in the flow, or a strand that did not settle.
Today the team resolves that ambiguity by re-running, and a green re-run is read as "flake". If (b) ever happens, the same ritual buries it. That is the cost: this is not merely a noisy spec, it is a spec whose failure mode is indistinguishable from the regression it guards.
The Architectural Reality
beforeEach already carries a settle guard added with 18142:
await expect.poll(async () => page.evaluate(host =>
document.querySelector(host)?.childElementCount ?? 0, HOST), {timeout: 10000}).toBe(3)The comment reasons that child count is independent of scrollWidth — which is true, and is not the problem. The problem is that 3 is the at-rest count on BOTH sides of the event. The host holds its shell plus two persistent overlays at rest, and one more while a second shell is staged. So 3 is satisfied:
- before the projection under test has begun staging, and
- after it has fully settled.
expect.poll returns on its first satisfying sample, so the guard can pass pre-transaction and hand control to a measurement that then lands mid-stage. It waits for a state that the timeline visits twice, rather than for the transition it means to witness — so it cannot certify the step it is placed there to certify.
The Fix
Make the settle guard witness the transition rather than a state the timeline visits twice. Options, in preference order — the implementer picks with a red-first witness:
- Poll for a stable count across consecutive samples (observe 4, then 3), so the guard cannot satisfy itself before staging starts.
- Drive the projection from the fixture and await its settle signal directly, rather than inferring settledness from the DOM.
- Failing both, assert on a marker the reconciler sets only at phase 4 completion.
Whatever shape lands, the required property is that a red means a regression: a failure must no longer be explicable by "measured too early".
Files: test/playwright/component/dashboard/DockPreviewGeometry.spec.mjs, and the fixture app under test/playwright/component/apps/dock-preview-geometry/ if the settle signal has to be published.
Acceptance Criteria
Out of Scope
- The engine's reconciler transaction itself. Nothing here claims 18147 is incomplete; that arm is left open by the evidence and would be its own ticket with its own reproduction.
DockRailLazyModule.spec.mjs, which flaked separately on the components tier the same morning (observed on 18176 by two reviewers). Same tier, different spec, unproven common cause — bundling them would assert a shared mechanism nobody has measured.
- Any general "quarantine flaky specs" mechanism. One spec, one measured mechanism.
Avoided Traps
- Labelling it a flake and moving on. Two occurrences on unrelated diffs is exactly the point at which "flaky" starts laundering a real signal — and here the signal it would launder is a regression of two freshly-fixed defects.
- Waiting on
scrollWidth to settle. That is the property under test; using it as the settle signal makes the arms vacuous, which the existing comment already warns against and which the fix must not reintroduce.
- Widening the tolerance (accepting
scrollWidth up to 2×). That converts the guard into one that cannot see the defect at all.
Decision Record impact
none — test-only; the engine contract is unchanged.
Related
- 18142 / PR 18146 — the preview-geometry defect this spec witnesses, and where the settle guard was introduced.
- 18143 / PR 18147 — the stranded-shell defect whose signature the failure is indistinguishable from.
- 18152 — the completeness-guard sibling; unrelated mechanism, same suite.
unowned-rationale: filed from a nightshift heartbeat run that makes no working-tree writes (a sibling session holds the shared checkout mid-lane), so the implementation cannot start or finish in the same run. Left claimable rather than claimed, per finish-or-release. The measurement above is complete; the next agent needs no reproduction work to begin.
Origin Session ID: 20f43adc-6acd-4cbb-8a25-da750540ea68
Handoff Retrieval Hints: query_raw_memories on "DockPreviewGeometry staged shell settle guard scrollWidth twice clientWidth"; the 18142/18143 origin session is f6da5bf6-e688-454c-8fea-1ee269327016 (Vega, the live Neural Link read that found both defects). CI anchors: failing run 33733566436, green re-run 33737571342, both at PR 18170's head.
Context
test/playwright/component/dashboard/DockPreviewGeometry.spec.mjs:59failed twice on 2026-09-03 and passed on a re-run at the identical head both times.The two diffs share nothing — one is dock JavaScript, the other is six
resources/scss/**/button/Base.scssfiles with no path to the dock host's layout. A cause common to both is therefore in the spec or the fixture, not in either change. Instance 1 was captured at the time as adefect-notetoAGENT:*; instance 2 is the independent second occurrence that promotes it underticket-create§1e.Both engine fixes this spec was written around are already on
dev: 18146 (preview overlay geometry) and 18147 (a rejected projection phase settles the host to one shell), the latter merged as4d9c6b208e. So this recurs with both fixes in place.Live latest-open sweep: checked the latest 20 open issues at 2026-09-03T09:18Z; no equivalent found. A2A in-flight claim sweep at the same time: no
[lane-claim]/[lane-intent]on this scope. Memory Core sweep on the symptom nouns returned the 18142/18143 origin session and no prior decision on the spec's stability.The Problem
The observed failure is
scrollWidthat twiceclientWidth— two full host widths in the flex row.That is the exact signature of the defect this file exists to catch. From the spec's own header: an unpositioned preview is an in-flow
.neo-layout-fit-itematflex: 1 0 100%, i.e. a second full host width, andscrollWidth === clientWidthwas chosen as the assertion because "it reads the CAUSE". The reconciler also legitimately stages a second shell for a few frames mid-transaction, which produces the same number for a correct reason — the spec'sbeforeEachsays so explicitly.So a red here is ambiguous between:
Today the team resolves that ambiguity by re-running, and a green re-run is read as "flake". If (b) ever happens, the same ritual buries it. That is the cost: this is not merely a noisy spec, it is a spec whose failure mode is indistinguishable from the regression it guards.
The Architectural Reality
beforeEachalready carries a settle guard added with 18142:await expect.poll(async () => page.evaluate(host => document.querySelector(host)?.childElementCount ?? 0, HOST), {timeout: 10000}).toBe(3)The comment reasons that child count is independent of
scrollWidth— which is true, and is not the problem. The problem is that3is the at-rest count on BOTH sides of the event. The host holds its shell plus two persistent overlays at rest, and one more while a second shell is staged. So3is satisfied:expect.pollreturns on its first satisfying sample, so the guard can pass pre-transaction and hand control to a measurement that then lands mid-stage. It waits for a state that the timeline visits twice, rather than for the transition it means to witness — so it cannot certify the step it is placed there to certify.The Fix
Make the settle guard witness the transition rather than a state the timeline visits twice. Options, in preference order — the implementer picks with a red-first witness:
Whatever shape lands, the required property is that a red means a regression: a failure must no longer be explicable by "measured too early".
Files:
test/playwright/component/dashboard/DockPreviewGeometry.spec.mjs, and the fixture app undertest/playwright/component/apps/dock-preview-geometry/if the settle signal has to be published.Acceptance Criteria
beforeEachsettle guard cannot be satisfied by the pre-transaction at-rest state — demonstrated, not asserted (a witness that fails against the current guard and passes against the new one).scrollWidth === clientWidthas the assertion; it reads the cause and stays.Out of Scope
DockRailLazyModule.spec.mjs, which flaked separately on the components tier the same morning (observed on 18176 by two reviewers). Same tier, different spec, unproven common cause — bundling them would assert a shared mechanism nobody has measured.Avoided Traps
scrollWidthto settle. That is the property under test; using it as the settle signal makes the arms vacuous, which the existing comment already warns against and which the fix must not reintroduce.scrollWidthup to 2×). That converts the guard into one that cannot see the defect at all.Decision Record impact
none— test-only; the engine contract is unchanged.Related
unowned-rationale:filed from a nightshift heartbeat run that makes no working-tree writes (a sibling session holds the shared checkout mid-lane), so the implementation cannot start or finish in the same run. Left claimable rather than claimed, per finish-or-release. The measurement above is complete; the next agent needs no reproduction work to begin.Origin Session ID: 20f43adc-6acd-4cbb-8a25-da750540ea68
Handoff Retrieval Hints:
query_raw_memorieson "DockPreviewGeometry staged shell settle guard scrollWidth twice clientWidth"; the 18142/18143 origin session isf6da5bf6-e688-454c-8fea-1ee269327016(Vega, the live Neural Link read that found both defects). CI anchors: failing run 33733566436, green re-run 33737571342, both at PR 18170's head.