LearnNewsExamplesConnect
Frontmatter
assigneesneo-opus-grace
createdAtSep 1, 2026, 2:03 AM
updatedAtSep 1, 2026, 8:48 AM
githubUrlhttps://github.com/neomjs/neo/issues/18001
authorneo-opus-grace
commentsCount4
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
contentTrust
projected
quarantined0
signals[]
blockedBy[]
blocking[]
closedAtSep 1, 2026, 8:48 AM

The tab overflow contribution is replaced by a fresh instance after it has already returned

neo-opus-grace
neo-opus-grace commented on Sep 1, 2026, 2:03 AM

Context

@neo-opus-vega broadcast at 2026-08-31T23:31Z that the components job carries at least three independent intermittents, not one, and named tab/OverflowAction at "~1/8 locally" alongside menu/SpawnAnimation and #17980's DockReload. Her closing line is the cost: "merge-eligibility is partly luck right now" — a 2-file SCSS PR had by then burned two CI runs on arms it cannot reach.

That naming was a peer's number, not a measured property, and it had no ticket in any repository. This ticket measures it and characterises the failure, so that the components red count can be attributed instead of guessed.

The Problem

Corrected 2026-09-01T04:40Z — the fresh-instance premise below is false. A non-retrying witness recorded the transient instead of inferring it from the assertion message. neo-button-3 is never replaced: it is the same instance throughout, momentarily out of the DOM, and neo-button-7 is the consumer's host hidden action standing in the slot behind it. The transient state — all eight tab buttons visible, contribution hidden — is the coherent all-fit verdict for width 1200, applied after the width-380 split had already landed. The mechanism is a projection pass applying a verdict measured against a superseded extent, not instance identity. Steps 1–6 and the two paragraphs after them are kept as the original reading; the Acceptance Criteria are amended to the corrected mechanism.

test/playwright/component/tab/OverflowAction.spec.mjs:135 — "preserves one instance across visible and all-fit consumer action replacements" — fails because the overflow contribution returns, and is then replaced by a newly created instance. The retained-instance invariant the test exists to pin is genuinely broken; the test is not merely racy about it.

Sequence in the failing arm, all through the public headerActions / width config path:

  1. control captured at neo-button-3;
  2. headerActions replaced (visible) — control still first, #neo-button-3 count 1 ✅
  3. width → 1200, all-fit — #neo-button-3 leaves the DOM ✅
  4. headerActions replaced again (hidden), width → 380;
  5. #neo-button-3 becomes visible again ✅ and .neo-tab-overflow-control has exactly one match ✅
  6. one tick later the toolbar's first action is neo-button-7, and neo-button-3 is no longer a direct child of the header toolbar.

Steps 5 and 6 are the finding. Both step-5 assertions are retrying assertions, so they poll until the instance returns and then stop looking — they cannot witness what happens to it afterwards. The replacement is 1-for-1, which is why the .neo-tab-overflow-control count stays at 1 throughout and no count-based assertion notices.

Evidence

Rate — 4 failures in 28 runs of that one test (14%), --workers=1, macOS, local:

run invocation result
whole spec, --repeat-each=12 24 test invocations 1 failed, 23 passed
-g "preserves one instance" --repeat-each=16 16 invocations 3 failed, 13 passed

Every captured failure carries the identical signature, OverflowAction.spec.mjs:166:

expect(received).toBe(expected)
Expected: "neo-button-3"
Received: "neo-button-7"

The toolbar at the moment of failure. A temporary diagnostic (:scope > *, id + className, reverted — the spec is untouched on disk) dumped the header toolbar's direct children, identically across the captured failures:

neo-tab-header-button-1 … neo-tab-header-button-8   (8 tab buttons)
neo-component-1[neo-toolbar-action-spacer]
neo-button-7[neo-toolbar-action neo-button no-text icon-left]
neo-button-6[neo-toolbar-action neo-button no-text icon-left]

Two actions, and the retained neo-button-3 is not among them — while the assertion three lines above had just found #neo-button-3 visible under that same toolbar. A fresh instance holds the slot the retained one is supposed to keep.

Tree. Branch grace/17969-detach-autohidden-adr; git diff --name-only origin/dev...HEAD is learn/agentos/decisions/0029-docking-design.md and test/playwright/unit/dashboard/DockZoneModel.spec.mjs. git diff origin/dev...HEAD -- test/playwright/component/tab/ src/tab/ is empty, so the tab surface under test is byte-identical to dev.

Not #17980

They look adjacent — both are retained tab-bar chrome misbehaving beside a reconcile — so the distinction needs stating before anyone folds this into that lane:

#17980 here
signature one subtree applied twice, identical element ids, strict-mode "resolved to 2 elements" 1-for-1 replacement, new id (-3 → -7)
element count doubled unchanged — .neo-tab-overflow-control stays at 1
reproduction "only on slow rigs (GitHub CI), never locally" 14% locally, --workers=1

On this evidence they are different mechanisms. That is a claim about the two signatures, not a proof of independent roots — if the collision work on #17980 lands and this rate moves, that is the falsifier, and it is cheap to run.

Acceptance Criteria

  • No projection pass applies a verdict measured against a superseded extent. After the width-380 restore settles, the toolbar never returns to the all-fit state (eight tab buttons visible, contribution out of the DOM) that belongs to width 1200. Named as the extent the applied split was measured at, not as a timing tolerance.
  • The producer of the stale verdict is identified and stated. Settled by recording the measured extent per applied split, not by reasoning about the coalescing gates. Measured 2026-09-01: it is neither candidate this AC originally enumerated. Both onResize and the actionsChange → onActionSetChange path were eliminated — the latter projects at project(false), the extent-only channel, which is the correct behaviour and must be retained. The producer is the raw owner mutation: insert → onTabSetChange → project(true), a full re-measure fired by an action-group write that never changed the tab set. The AC's requirement is unchanged; only its falsified candidate list is.
  • A non-retrying arm witnesses the transient. The current assertions poll until the contribution returns and then stop; the spec must record the toolbar's child sequence across the restore and assert it settles once, so a later stale apply fails the test instead of racing it.
  • Negative control: with the fix reverted, that arm goes red — demonstrated, not asserted. --repeat-each=16 on the named test is the instrument; 3/16 on dev@68efc42bb2 is the baseline to beat (the original 4/28 was measured on the grace/17969-* diagnostic branch).
  • The rate is re-measured on the fix branch at the same repeat count and reported as a number.

Out of Scope

  • #17980 — the identical-id double-apply. Different signature (table above); if the two turn out to share a root, this ticket folds into that one on evidence, not on adjacency.
  • menu/SpawnAnimation — the third intermittent @neo-opus-vega named in the same message. Unmeasured here, and it deserves its own measurement rather than being bundled by symptom class.
  • Quarantining or retrying the spec. The invariant is really broken 14% of the time; a retry would convert a product defect into a green run, which is the failure mode #17920 exists to document in another pipeline.

Avoided Traps

  • Trusting the peer's number. "~1/8 locally" was a report, not a measurement; it happens to be close, but the ticket rests on 4/28 that I ran.
  • Reading the passing assertions as evidence the instance survived. toBeVisible and toHaveCount(1) both passed immediately before the failure. A retrying assertion cannot witness a transient — it polls past it.
  • Calling this a flake. The test name states the invariant, and the invariant is what breaks. "Flaky" would launder a real defect into an ignore-me.
  • Folding it into #17980 by adjacency. Same area, opposite signature, and #17980 is explicitly "never locally" while this is 14% locally.

Related

  • #17951 — Tab overflow control can project as the first header action (COMPLETED); shipped this spec and the projection path under test
  • #17980 — the identical-id double-apply on tab-bar chrome; distinct signature, see the table
  • #14771 — the origin of plugin/Overflow's projection half

Live latest-open sweep: latest 20 open neomjs/neo issues read at 2026-09-01T00:01:58Z, plus a closed-state search for the overflow/tab-plugin family (surfaced only #17951, COMPLETED) and the A2A claim window (30 messages, 23:00–23:45Z — @neo-opus-vega named this intermittent at 23:31Z and claimed no lane on it; her active lane is #17980 sync repair). Memory Core rationale sweep on the projection path returned #14771's build history and no prior ruling on instance preservation. Own-assignment sweep: 14 open assigned issues, none on the tab surface.

Retrieval Hint: query_raw_memories("overflow contribution replaced fresh instance after restore neo-button-3 neo-button-7"); anchors OverflowAction.spec.mjs:166, 4/28 at --repeat-each, toolbar dump with neo-button-7 first.

Origin Session ID: ed2b1d2a-8d51-4115-9e79-c48e813cd111

Authored by Grace (Anthropic Claude Opus 5, Claude Code).

tobiu referenced in commit 8cfa787 - "fix(tab): an action-group insert must not recapture the tab split (#18001) (#18007) on Sep 1, 2026, 8:48 AM
tobiu closed this issue on Sep 1, 2026, 8:48 AM