LearnNewsExamplesServices
Frontmatter
id13286
titleNL undo Slice-1: e2e proof — agent-created component reverts via undo (AC10)
stateClosed
labels
aitesting
assigneesneo-opus-vega
createdAtJun 15, 2026, 2:52 AM
updatedAtJun 16, 2026, 4:57 AM
githubUrlhttps://github.com/neomjs/neo/issues/13286
authorneo-opus-vega
commentsCount5
parentIssue13221
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[x] 13167 Extended-NL: forward the sender agentId from Bridge to the app Client
blocking[x] 13306 Neural Link redo Slice-2: e2e proof — undone component restored via redo
closedAtJun 16, 2026, 4:57 AM
milestonev13.1

NL undo Slice-1: e2e proof — agent-created component reverts via undo (AC10)

neo-opus-vega
neo-opus-vega commented on Jun 15, 2026, 2:52 AM

Context

Completes #13221's AC10 — the last open AC of NL undo Slice-1 (AC7 is in flight as #13282). Surfaced by the #13221 completeness audit: all four undo specs (InstanceServiceUndo* + the capture specs) are unit-level (mocked transport / re-dispatch). The slice AC requires a live-tree proof — "agent-created component → undo → reverts cleanly in the live tree" — which the sub-PRs each scoped as "broader than this sub's AC", so it was never landed.

The Architectural Reality

The repo already has an NL e2e harness — test/playwright/e2e/NeuralLinkCreateComponent.spec.mjs + the neuralLink fixture (test/playwright/fixtures.mjs), which boots the bridge (NeuralLink_ConnectionService.manageConnection) and connects to a live useAiClient app. The fixture's app handle exposes createComponent, getComponentTree, queryComponent, etc., but not undo — even though the server-side NeuralLink_InstanceService.undo({sessionId}) (ai/services/neural-link/InstanceService.mjs:89) is already present and NeuralLink_InstanceService is already imported into the fixture.

The Fix

  1. test/playwright/fixtures.mjs — add async undo() to the app handle, mirroring the existing methods: return NeuralLink_InstanceService.undo({ sessionId }).
  2. test/playwright/e2e/NeuralLinkUndo.spec.mjs (new) — mirror NeuralLinkCreateComponent.spec: goto a useAiClient app → connectToAppcreateComponent into the resolved container → assert it is present in get_component_tree + the live DOM → app.undo() → assert it is gone from the tree + DOM (create⁻¹ = destroy(newId)).

Acceptance Criteria

  • An e2e spec drives a live app over the Neural Link: create_componentundo → the created component is gone from get_component_tree and the live DOM.
  • The neuralLink fixture app handle exposes undo().

Out of Scope

  • set_instance_properties / remove_component undo e2e (this proof covers the create round-trip — the canonical AC10 case; the others stay unit-covered).

Related

  • Completes #13221 AC10 (NL undo Slice-1; AC7 is #13282). Tool: #13259 (undo). Harness sibling: NeuralLinkCreateComponent.spec (#9846 era).
  • Epic: #13012 (Agent Harness, Pillar-2). Decision Record impact: none (test + a one-line fixture helper).

Release classification: boardless (post-release Pillar-2 test coverage — not v13-blocking).

Origin Session ID: a0bc6b23-78c5-4bd7-b944-9db5e236f42d