LearnNewsExamplesServices
Frontmatter
id19459
titlePlacement witness changes history depth after the first write
stateClosed
labels
bugaitestingdashboard
assigneesneo-gpt
createdAtOct 8, 2026, 1:33 AM
updatedAtOct 8, 2026, 2:05 AM
githubUrlhttps://github.com/neomjs/neo/issues/19459
authorneo-gpt
commentsCount0
parentIssue17844
subIssues[]
subIssuesCompleted0
subIssuesTotal0
contentTrust
projected
quarantined0
signals[]
blockedBy[]
blocking[]
closedAtOct 8, 2026, 2:05 AM

Placement witness changes history depth after the first write

Closed v13.2.0/archive-v13-2-0-chunk-24 bugaitestingdashboard
neo-gpt
neo-gpt commented on Oct 8, 2026, 1:33 AM

Context

The existing Dock NL evidence lane #17844 now reaches DockPlacementNL.spec.mjs’s history setup on Engine 887835e83a1e53a257eb83b9c9dc9ea6fb6e4166. The focused journey fails because its late setHistoryDepth({groupId, depth: 6}) returns false.

An unchanged run reproduced the refusal. A diagnostic-only rerun retained the oracle and captured:

Stage Depth History ready Rows / cursor Cause
Before popup setup 50 false none none
After initial popup positioning 50 true 1 / 0 native-popup-move
Late setter result 50 true 1 / 0 false, state unchanged

A live Neural Link control on a fresh owned Group returned true for the same depth before history loaded. This is an attributed witness-setup defect, not a request to relax the engine guard.

The Problem

The spec treats its initial popup positioning as free setup, but that native movement already records a legitimate history row. It then changes policy after the Group locked it and assumes the later movement, undo/redo and subsequent movement start from an empty history.

Removing the refusal assertion alone would leave the absolute row/cursor expectations stale and weaken the journey.

The Architectural Reality

  • src/manager/Transaction.mjs#setHistoryDepth fixes policy before history loads and refuses late changes.
  • examples/dashboard/crossWindow/DemoBWorkspace.mjs#adoptTopologyGroup chooses the host’s depth before placement participation.
  • src/dashboard/dock/window/Placement.mjs records native popup movement as an appended transaction; main-frame rebasing preserves history.
  • test/playwright/e2e/dashboard/DockPlacementNL.spec.mjs owns this failing setup and the complete placement/undo/redo/reload witness.

Design authority: Transaction#setHistoryDepth JSDoc states that the bound is fixed at the first history load. Product behavior remains unchanged.

The Fix

Configure the test Group before its first placement history write. Settle and retain the initial positioning’s history baseline. Assert subsequent movement and undo/redo against that baseline, including the correct transaction row’s before-hints and cause. Keep the full rebasing, correlated native-effect, persistence and popup-generation legs.

Prescription checked: the existing E2E owns the setup order and baseline; no new helper module or production API is needed.

Contract Ledger

N/A — existing witness correction only. No public config, wire or runtime API changes.

Decision Record impact: aligned-with ADR 0029; no authority mutation.

Acceptance Criteria

  • Depth is configured successfully before the Group history loads.
  • Initial popup positioning’s recorded history is explicitly settled and used as the baseline, rather than discarded.
  • The tested movement adds exactly one row with the expected cause and before-hints.
  • Main-frame rebasing preserves the complete history; undo/redo preserve row count and move the cursor relative to the baseline, with correlated native effects.
  • A later free movement appends once; durable placement hints and popup reload/generation replacement remain verified.
  • The full existing journey passes with the external Brain runtime wired; the formerly failing source remains the red control.
  • The resulting receipt is linked back to #17844, without claiming a full-battery or headed/native acceptance pass.

Out of Scope

Changing history policy/refusal semantics, clearing history to hide setup, Demo B perspective mount-count repair, or new journey/app surfaces.

Avoided Traps

No guard relaxation; no swallowed setter refusal; no fixed sleeps as settledness; no assertion deletion in place of a semantic baseline.

Related

Related: #17844

Origin Session ID: 01a11843-6adc-72c0-b895-ab4207603b32 Retrieval Hint: "DockPlacementNL late history depth historyReady native-popup-move setup baseline"

Creation sweep: latest-created open queue and all-state recent claims rechecked immediately before filing; exact/history search found the parent evidence lane and closed screen/placement predecessors, with no equivalent repair. Memory rationale sweep found adjacent transaction history work but no ruling against this correction. Own-assignment sweep: three open Engine issues; only #17844 touches this surface and explicitly requires repair leaves.

tobiu referenced in commit b9daadd - "fix(e2e): respect placement history setup (#19459) (#19460)" on Oct 8, 2026, 2:05 AM
tobiu closed this issue on Oct 8, 2026, 2:05 AM