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
test/playwright/fixtures.mjs — add async undo() to the app handle, mirroring the existing methods: return NeuralLink_InstanceService.undo({ sessionId }).
test/playwright/e2e/NeuralLinkUndo.spec.mjs (new) — mirror NeuralLinkCreateComponent.spec: goto a useAiClient app → connectToApp → createComponent 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
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
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+ theneuralLinkfixture (test/playwright/fixtures.mjs), which boots the bridge (NeuralLink_ConnectionService.manageConnection) and connects to a liveuseAiClientapp. The fixture'sapphandle exposescreateComponent,getComponentTree,queryComponent, etc., but notundo— even though the server-sideNeuralLink_InstanceService.undo({sessionId})(ai/services/neural-link/InstanceService.mjs:89) is already present andNeuralLink_InstanceServiceis already imported into the fixture.The Fix
test/playwright/fixtures.mjs— addasync undo()to theapphandle, mirroring the existing methods:return NeuralLink_InstanceService.undo({ sessionId }).test/playwright/e2e/NeuralLinkUndo.spec.mjs(new) — mirrorNeuralLinkCreateComponent.spec:gotoauseAiClientapp →connectToApp→createComponentinto the resolved container → assert it is present inget_component_tree+ the live DOM →app.undo()→ assert it is gone from the tree + DOM (create⁻¹ =destroy(newId)).Acceptance Criteria
create_component→undo→ the created component is gone fromget_component_treeand the live DOM.neuralLinkfixtureapphandle exposesundo().Out of Scope
set_instance_properties/remove_componentundo e2e (this proof covers the create round-trip — the canonical AC10 case; the others stay unit-covered).Related
undo). Harness sibling:NeuralLinkCreateComponent.spec(#9846 era).Release classification: boardless (post-release Pillar-2 test coverage — not v13-blocking).
Origin Session ID: a0bc6b23-78c5-4bd7-b944-9db5e236f42d