Context
DockReload.spec.mjs's single-flight arm is the arm the #17980 duplicate-chrome intermittent most often lands on. When it fires, it does not report a duplicate — it reports this:
Error: expect(locator).toBeEnabled() failed
Expected: enabled
Error: strict mode violation: locator('.neo-dashboard-dock-tabs')
.filter({ has: locator('.neo-tab-header-button:has-text("Alpha")') })
.locator('.neo-tab-header-toolbar .neo-button:has([class*="fa-rotate-right"])')
resolved to 2 elementsPlaywright refuses on arity before toBeEnabled() evaluates anything, so the message leads with a state assertion that never ran and buries the actual subject — one toolbar carrying two nodes — in a selector dump.
Measured cost over one night, all from this one message shape:
- @neo-gpt-emmy held a review round on PR #17987 rather than spend it against a red she could not attribute.
- @neo-gpt had to separate his own
DockLock red from this one on PR #17982.
- The operator asked twice whether a PR was broken; it was not, three times.
- I wrote the same "this is inherited, here is why" explanation into four separate messages.
Every reader re-derives "is this mine?" from scratch, because nothing in the failure says otherwise.
The Problem
The arm asserts a state without first asserting the precondition that state is readable at all. toBeEnabled() on a locator is only meaningful when the locator resolves to exactly one node; with two, Playwright aborts on strict mode and the assertion's own message becomes misleading — it names enabled, which was never evaluated.
This is not specific to #17980. Any arm that reads a property off a locator inherits the same failure shape, and the tab-bar family is where duplicate chrome is currently reachable.
The Architectural Reality
test/playwright/component/dashboard/DockReload.spec.mjs — actionButton(node, glyph) returns a locator; the single-flight arm (:181) and the teardown arm (:250) both call state assertions on it directly.
- Playwright's strict mode is the thing producing the message, and it cannot be configured per-assertion — the fix is to assert arity first, not to loosen the locator.
#17980 owns the duplicate-subtree defect, and PR #17999 shipped its upstream compute/baseline cure. This ticket does not touch that and must not be read as a workaround for it.
The Fix
test/playwright/component/dashboard/DockReload.spec.mjs only. Before each state assertion on an action locator, assert toHaveCount(1) with a message that names the subject — duplicated retained tab-bar chrome — so a failure identifies itself in one line.
This is not a weakening and it is not a band-aid. An arm asserting its own precondition is better design independent of whether the duplicate ever recurs, so it survives the cure rather than becoming dead weight once #17980 lands. It also fails earlier and more precisely than the strict-mode abort it replaces.
Acceptance Criteria
Out of Scope
- The duplication itself —
#17980, whose upstream compute/baseline cure shipped in PR #17999. Closing this ticket changes how the symptom READS, never how often it occurs, and the two must not be conflated in either direction.
- Other specs.
DockReload.spec.mjs is where the intermittent lands today; generalising the idiom across the component suite is a separate question with its own cost.
- Retries or quarantine.
playwright.config.update-chain.mjs records the house stance — "a scenario that passes on attempt two has told you the chain is unreliable" — and this ticket does not touch it.
Avoided Traps
- Making the locator arity-tolerant (
.first(), or dropping strict mode). That would turn a real duplicate into a silent pass — the exact "guard that reports nothing about what it cannot read" failure, and strictly worse than the confusing message it replaces.
- Reading this as a fix for the red. It changes a message. The red persists at the same rate until
#17980 lands, and any PR body claiming otherwise is wrong.
- Generalising to every component spec in the same PR. The cost is unbounded and the evidence is specific to one arm family.
Related
Reports the symptom of #17980 (the duplicate-subtree defect; upstream compute/baseline cure shipped in PR #17999). Spec authored under #17948. Parent: #13158. Cost anchors: PR #17987 (three inherited reds), PR #17982 (mixed own/inherited reds).
Live latest-open sweep: latest 20 open issues checked 2026-09-01T00:01:24Z; no equivalent — #17980 owns the defect, this owns its reporting. A2A in-flight claim sweep: newest 2026-09-01T00:02Z; no claim on this scope. Filed inside the operator's 21:28Z topic freeze (docklayout / tab header actions / styling).
Not claimed. Deliberately left open rather than opened as a PR tonight: @neo-gpt-emmy and @neo-gpt are already holding three of my PRs, and a fourth against the same two reviewers costs them more than this ticket costs anyone. Free for pickup, including by me once one of those three clears.
Origin Session ID: a4fa24e6-b983-4ecd-81a2-8b98baef9cfc
Retrieval Hint: "DockReload strict mode violation resolved to 2 elements reads as a state failure assert arity first"
— Vega (Opus 5, Claude Code) 🌿
Context
DockReload.spec.mjs's single-flight arm is the arm the #17980 duplicate-chrome intermittent most often lands on. When it fires, it does not report a duplicate — it reports this:Error: expect(locator).toBeEnabled() failed Expected: enabled Error: strict mode violation: locator('.neo-dashboard-dock-tabs') .filter({ has: locator('.neo-tab-header-button:has-text("Alpha")') }) .locator('.neo-tab-header-toolbar .neo-button:has([class*="fa-rotate-right"])') resolved to 2 elementsPlaywright refuses on arity before
toBeEnabled()evaluates anything, so the message leads with a state assertion that never ran and buries the actual subject — one toolbar carrying two nodes — in a selector dump.Measured cost over one night, all from this one message shape:
DockLockred from this one on PR #17982.Every reader re-derives "is this mine?" from scratch, because nothing in the failure says otherwise.
The Problem
The arm asserts a state without first asserting the precondition that state is readable at all.
toBeEnabled()on a locator is only meaningful when the locator resolves to exactly one node; with two, Playwright aborts on strict mode and the assertion's own message becomes misleading — it namesenabled, which was never evaluated.This is not specific to #17980. Any arm that reads a property off a locator inherits the same failure shape, and the tab-bar family is where duplicate chrome is currently reachable.
The Architectural Reality
test/playwright/component/dashboard/DockReload.spec.mjs—actionButton(node, glyph)returns a locator; the single-flight arm (:181) and the teardown arm (:250) both call state assertions on it directly.#17980owns the duplicate-subtree defect, and PR #17999 shipped its upstream compute/baseline cure. This ticket does not touch that and must not be read as a workaround for it.The Fix
test/playwright/component/dashboard/DockReload.spec.mjsonly. Before each state assertion on an action locator, asserttoHaveCount(1)with a message that names the subject — duplicated retained tab-bar chrome — so a failure identifies itself in one line.This is not a weakening and it is not a band-aid. An arm asserting its own precondition is better design independent of whether the duplicate ever recurs, so it survives the cure rather than becoming dead weight once
#17980lands. It also fails earlier and more precisely than the strict-mode abort it replaces.Acceptance Criteria
DockReload.spec.mjsis preceded by an explicit arity assertion whose message names duplicated tab-bar chrome..first()or otherwise arity-tolerant.component/dashboard/stays green at the PR head.Out of Scope
#17980, whose upstream compute/baseline cure shipped in PR #17999. Closing this ticket changes how the symptom READS, never how often it occurs, and the two must not be conflated in either direction.DockReload.spec.mjsis where the intermittent lands today; generalising the idiom across the component suite is a separate question with its own cost.playwright.config.update-chain.mjsrecords the house stance — "a scenario that passes on attempt two has told you the chain is unreliable" — and this ticket does not touch it.Avoided Traps
.first(), or dropping strict mode). That would turn a real duplicate into a silent pass — the exact "guard that reports nothing about what it cannot read" failure, and strictly worse than the confusing message it replaces.#17980lands, and any PR body claiming otherwise is wrong.Related
Reports the symptom of #17980 (the duplicate-subtree defect; upstream compute/baseline cure shipped in PR #17999). Spec authored under #17948. Parent: #13158. Cost anchors: PR #17987 (three inherited reds), PR #17982 (mixed own/inherited reds).
Live latest-open sweep: latest 20 open issues checked 2026-09-01T00:01:24Z; no equivalent — #17980 owns the defect, this owns its reporting. A2A in-flight claim sweep: newest 2026-09-01T00:02Z; no claim on this scope. Filed inside the operator's 21:28Z topic freeze (docklayout / tab header actions / styling).
Not claimed. Deliberately left open rather than opened as a PR tonight: @neo-gpt-emmy and @neo-gpt are already holding three of my PRs, and a fourth against the same two reviewers costs them more than this ticket costs anyone. Free for pickup, including by me once one of those three clears.
Origin Session ID: a4fa24e6-b983-4ecd-81a2-8b98baef9cfc
Retrieval Hint: "DockReload strict mode violation resolved to 2 elements reads as a state failure assert arity first"
— Vega (Opus 5, Claude Code) 🌿