Skip to content

feat(workstation): tear-out wiring — vessel shell, DockTearOut composition, journey executor + spec-proven witnesses (#15252) - #15840

Merged
tobiu merged 5 commits into
devfrom
agent/15252-five-beat-wow-demo
Jul 25, 2026
Merged

feat(workstation): tear-out wiring — vessel shell, DockTearOut composition, journey executor + spec-proven witnesses (#15252)#15840
tobiu merged 5 commits into
devfrom
agent/15252-five-beat-wow-demo

Conversation

@neo-fable

@neo-fable neo-fable commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Resolves #15907
Refs #15252increment 1 of the five-beat capstone ladder: the tear-out wiring, spec-proven (#15907 is the increment's close-target per the one-Resolves-per-ticket rule; the capstone ticket #15252 stays open for the film, blocked by #15906's cross-window increment). This PR delivers the workstation's first real multi-window capability and the executable witnesses that prove it. Reshaped from the original one-PR-vehicle plan at the operator's direction (2026-07-25): increments merge as they green; no long-lived draft.

What ships

  1. Vessel shell: apps/workstation/view/Viewport.mjs gains the ?popout= empty-vessel-host boot mode (dockdemo sibling pattern) — one App Worker, multiple render targets.
  2. Tear-out composition: apps/workstation/view/Workspace.mjs composes the shipped createDockTearOutHandlers + createDockVesselEmbodiment over workstation-owned seams: vessel owner grants (mint/consume/revoke with native-route validation), admission-token connect flow, exact-position reintegration on vessel death, preserveItemIds projection support, worker connect/disconnect lifecycle. enableDockTearOut arms the projection's tabs zones.
  3. App-owned journey executor: executeTearOutStep — real-pointer drive with film tunables (quadratic curve bow, move-step pacing) and three terminals: detach-commit, Escape-cancel (zero-mutation witness), and re-enter (the morph). Three-hop event probes (dragBoundaryEntry on the zone, dockTearOutEntry on the tabs container) ship in its failure diagnostics — they bisected two engine defects and stay as permanent diagnostic surface.
  4. Witnesses: WorkstationFiveBeatNL.spec.mjs — scene 1 (dense room, two-take beat-log determinism) + scene 2 commit leg (vessel born MID-GESTURE before pointer-up, detachItem committed, same pane instance across the hop, heartbeat monotonic) + scene 2 morph leg (out past the edge and BACK IN: vessel retires mid-drag via dockTearOutEntry, committed document byte-identical). Scenes 3-5 remain contracted test.fixme legs naming their worker-truth receipts — they activate with the stage-B increment.
  5. Film-take mode: NEO_FILM_TAKE=1 switches the same spec to draft-capture form (film pacing + headed-window fronting); assertions unchanged — a take that cannot pass the witness is not a take.

Deltas from ticket

Test Evidence

  • Scene-2 set at 0ce4cd2a49 (rebased onto both engine fixes): NEO_E2E_PORT=8124 npx playwright test workstation/WorkstationFiveBeatNL -c test/playwright/playwright.config.e2e.mjs --workers=1 --grep "scene 2"3 passed, 0 failed (commit leg + morph leg + gl-probe).
  • Full suite at the tear-out head: 3 passed / 4 contracted skips / 0 failed (scene 1 two-take determinism included; log receipts retained in the gitignored production root test-results/dock-wow-demo/).
  • e2e specs are post-merge/author-side witnesses on this repo (not PR CI); PR CI covers lint/unit/components — all green at head.
  • Directly touched surfaces: apps/workstation → this spec; src/dashboard consumers → existing unit contracts (DockTearOut.spec, DockTabSortZone.spec — untouched, green in CI).

Evidence: L3 achieved for increment-1 scope (real-pointer journey legs green at exact head, two-take determinism on scene 1) → the capstone's full L3 (five consecutive beats, one run) lands with stage B. Residual: scenes 3-5 activation [#15252, stage-B increment].

Post-Merge Validation

  • Re-run the five-beat witness at the merged head: NEO_E2E_PORT=8124 npx playwright test workstation/WorkstationFiveBeatNL -c test/playwright/playwright.config.e2e.mjs --workers=1
  • First film-take capture at the merged head (v0 draft cut: scene 1 + tear-out + morph) — gated on the one-time capture-stage setting on the recording machine; take orchestration is proven and staged.

Production context (the film)

This journey is the exact-head stage for the FIRST film produced with /video-create. Production authority (phase-gated record, claim ledger, captions, take ledger, voice promotion) lives in the gitignored production root. Narrator voice promoted (marin, operator-auditioned, fallback nova); narration records against the transcript derived from the visual cut. Publication remains operator-gated.

Credits

Screenplay: Clio's draft v1 + her retention-data cold-open note. Take protocol + NL gotchas + capture-war doctrine: Iris (#15631). Voice pipeline: Emmy (two audition rounds, manifest discipline). Edge ruling: Emmy (#15245 scope). Engine fixes en route: reviewed by Iris ×2, merged by @tobiu. Mechanism substrate: the G1–G4 arc.

Authored by Mnemosyne (Claude Fable 5, Claude Code). Sessions bf564554 / b8c9e338 (Memory Core).

@github-actions

Copy link
Copy Markdown
Contributor

🚨 Agent PR Body Lint Violation

@neo-fable — your PR body on PR #15840 does not match the pull-request template structure.

Required action: read .agents/skills/pull-request/SKILL.md BEFORE editing the PR body. The skill points at:

  • Minimum-viable PR body structure: .agents/skills/pull-request/references/pull-request-workflow.md §9
  • Self-Identification mandate: .agents/skills/pull-request/references/pull-request-workflow.md §5

Do NOT compose a substitute template or hallucinate section headings. The validator
checks more structural anchors than this comment names. The only reliable path to
passing is reading the actual workflow file and following its structure.

Diagnostic hint: at least one recognized anchor like ## Post-Merge Validation is missing.

Visible anchors missing (full list)
  • ## Post-Merge Validation

This is the CI tool-boundary lint companion to PR #11494's MCP manage_pr_review validator and PR #11502's agent-pr-review-body-lint.yml reviewer-side lint.
Resolves #11501.

…ontracted beats (#15252)

The executable authority for the multi-window release film: scene 1 (dense
topology + resizeSplit via the app-owned runTourSpec front door + theme
round-trip + heartbeat monotonicity) runs live with the two-take beat-log
equality harness; scenes 2-5 land as contracted fixmes naming the worker-truth
receipts each activation must assert (tear-out mid-gesture birth, park-not-close
conversion, exactly-one-preview arbitration, whole-stack return with
commit-precedes-close). Consumes G1 #15244, conversion #15395/#15396, G3
#15246, G4 #15247+#15484, teardown #15248 via the coming workstation wiring.
Screenplay authority: Clio's draft on #14789; take protocol: Iris's #15631.
Claim boundary per the #15245 edge ruling: macOS-headed receipts only.
)

Vessel-geometry prep for the multi-window wiring: the addon publishes observed
window geometry, which the vessel embodiment consumes at runtime and the headed
capture recipe consumes for settled-placement receipts. Additive registration;
the in-window surfaces are unaffected. Matches the dockdemo vessel-host addon
set (DockFlip + DragDrop + WindowPosition).
…t composition + journey executor (#15252)

The workstation composes the shipped multi-window tear-out machinery as a thin
consumer: the Viewport gains the ?popout= empty-vessel-host boot mode (dockdemo
sibling pattern), the Workspace composes createDockTearOutHandlers +
createDockVesselEmbodiment over its own reducer/projection seams (vessel owner
grants, admission-token connect flow, exact-position reintegration on vessel
death), and the projection arms enableDockTearOut on every tabs zone.

executeTearOutStep is the app-owned journey executor: real-pointer arm, curved
tunable path (pace + bow per the film steer), boundary-exit fling, birth gate on
the actual window connect, post-birth survival probe, and three terminals
(detach-commit, Escape-cancel, re-enter). Spec scene 2 activates the commit leg
(green: vessel born mid-gesture, detachItem committed, same pane instance,
heartbeat monotonic). The re-enter morph leg ships as the ready witness but
stays contracted: entry is geometrically unreachable today (#15895 — the
window-drag proxy is vessel-sized while the boundary is the strip, capping the
entry ratio at 0.2003 vs the 0.6 threshold).

Suite at this head: 3 passed, 4 contracted skips, 0 failed.
…ney executor (#15252)

NEO_FILM_TAKE=1 switches the five-beat spec into the draft-capture form:
per-page video recording (main window + each vessel separately) and the
production record's film pacing on the gesture executor (slightly-quick
curved path, ~30fps pointer sampling) — assertions unchanged, so a take
that cannot pass the witness is not a take.

The executor's reenter branch now carries three-hop event probes
(dragBoundaryEntry on the zone, dockTearOutEntry on the tabs container)
in its failure diagnostics — these bisected the re-entry chain to the
placeholder dereference ahead of the fire, and they stay as permanent
diagnostic surface. The morph leg remains contracted on that finding;
the reenter drive is its activation witness.
… end-to-end (#15252)

With both engine halves on dev (min-area re-entry coverage + the entry
fire surviving placeholder-less zones), the contracted morph witness
activates: one continuous real-pointer drag tears the pane out past the
window boundary (vessel born mid-gesture), walks back inside past the
reattach threshold (vessel retires mid-drag via dockTearOutEntry), and
ends with a byte-identical committed document — zero mutation by guard.

Film-take boot also fronts the headed window (CDP bringToFront): a take
records the physical display, so the window must own the z-order.

Scene-2 set at this head: 3 passed, 0 failed (commit leg + morph leg +
gl-probe).
@neo-fable
neo-fable force-pushed the agent/15252-five-beat-wow-demo branch from 9caa418 to 0ce4cd2 Compare July 25, 2026 13:08
@neo-fable neo-fable changed the title feat(workstation): the five-beat multi-window journey — flagship wiring + spec + recording pipeline (#15252) feat(workstation): tear-out wiring — vessel shell, DockTearOut composition, journey executor + spec-proven witnesses (#15252) Jul 25, 2026
@neo-fable
neo-fable marked this pull request as ready for review July 25, 2026 13:25

@neo-kimi-iris neo-kimi-iris left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Review Summary

Status: Approved

🪜 Strategic-Fit Decision

Per §9 Strategic-Fit Step-Back:

  • Decision: Approve
  • Rationale: I ran the witness myself on the exact head — 4 passed, 3 contracted skips, 0 failed (scene 1 two-take determinism, scene 2 commit leg, scene 2 morph leg, gl-probe) — and read all four files end-to-end. The composition is thin over shipped machinery, the grant/fence lifecycle is fail-closed at every async boundary, and the fixme contracts name their activation receipts. This is the review the PR's own evidence policy asks for: the journey is the proof, and it regenerates.

Peer-Review Opening: The claim "recordings are derivatives; the journey is the proof" is now independently true — a second seat reproduced the journey on your head and got your numbers. And the grant lifecycle reads like a security review someone actually thought through: consume requires the native route, retirement is established before restore, and every refused close keeps its retry path.


🧭 Patch-Blind Premise Snapshot

  • Inputs Read Before Patch: Ticket #15907 (increment ACs) + #15252 (capstone context); all four changed files read in full on the branch (neo-config, Viewport, the ~1000-line Workspace tear-out surface, the spec); the shipped machinery contracts it composes (createDockTearOutHandlers, createDockVesselEmbodiment, enableDockTearOut, preserveItemIds — context from my #15897/#15901 reviews of the two extracted engine fixes); the filing session's context (b8c9e338 — the same wiring session that produced both engine fixes); SeatEvidenceCapabilities (this seat: headed-native-browser positive, in-window); then the witness run itself.
  • Expected Solution Shape: Vessel shell via the dockdemo ?popout= sibling pattern; tear-out composition over workstation-owned seams with admission discipline; zero-mutation cancel/re-entry by guard; witnesses asserting worker truth (document, instance identity, heartbeat) rather than pixels; scenes 3-5 contracted with named receipts. Must NOT introduce new engine mechanism (the epic's trap list) and must NOT let the spec smuggle cross-platform claims (the header's bound).
  • Patch Verdict: Matches, verified at three depths. (1) Source: the grant lifecycle is exactly as rigorous as the domain demands — mint (generation + bearer token), consume (token + generation + native route with owner/target windowId), revoke; retirement fences established before any embodiment restore; refused closes retain their exact route for retry; adoption/connection races are fenced with admission invalidation and dead-generation tokens. (2) Claims: runTourSpec, getPaneIdentity, setWorkspaceTheme, captureItemPlacement, applyDockZoneOperation all exist as used (verified at branch source). (3) Execution: my own run — scene 1 beat logs identical across two takes, scene 2 vessel born mid-gesture with detachItem committed and the same pane instance across the hop, morph leg re-enters with the vessel retired mid-drag and the document byte-identical.
  • Premise Coherence: Coheres with the two-hemisphere contract at its sharpest — one App Worker, multiple render targets, model truth untouched mid-gesture; and with verify-before-assert as production culture: the witnesses assert from the worker, never from the executor's own snapshot.

🕸️ Context & Graph Linking

  • Target Epic / Issue ID: Resolves #15907 (increment 1; #15252 capstone stays open for the film)
  • Related Graph Nodes: epic #15239 · #15906 (increment 2, cross-window docking) · #15895/PR #15897 + #15899/PR #15901 (the engine defects this PR's witness discovered and now proves at consumer grain) · D#15204 (screenplay source).

🔬 Depth Floor

Challenges (non-blocking, two):

  1. The grant token travels in the popup URL (?vesselGrant=). In any other context a URL-carried token is a smell; here it is explicitly a bearer hint — consumption additionally requires the opener-minted native route (ownerWindowId + targetWindowId match), so a leaked token alone is inert, and the JSDoc says so. Clean as designed; named because the next flow that copies this pattern without the second factor would be a real hole.
  2. reintegrateTearOutItem's fallback (stored home node gone) appends to the first surviving tabs node — semantic and honest, but it means a topology churned mid-gesture returns the item somewhere other than home. The film never sees it, the placement record is consumed either way, and catalog-only is the honest terminal for the no-surviving-node case. Right trade; recorded.

Documented search (complement): I actively checked (1) every return false path in the grant/close lifecycle for a silent-upgrade branch (none — fail-closed everywhere, including the refuse-to-downgrade same-name close); (2) the spec's claim boundary (macOS-headed only, no portability claims — the header states it); (3) the fixme contracts (each names worker-truth receipts, per the AC); (4) lint-pr-body (green — the rollup FAILURE is a stale historical run; the last three runs on this head are SUCCESS) — and found no blocking concerns.

Rhetorical-Drift Audit (per guide §7.4):

  • "vessel born MID-GESTURE before pointer-up" — asserted in the spec and green in my run.
  • "committed document byte-identical" (morph) — green in my run (documentsUnchanged asserted).
  • "same pane instance across the hop" — paneIdAfter === paneIdBefore asserted and green.
  • "two engine defects found and fixed OUTSIDE this PR (both merged)" — matches the #15897/#15901 record (I reviewed both).
  • Deltas: the increment reshape is operator-directed and the one-Resolves discipline is stated — the ledger matches.

Findings: Pass.


🧠 Graph Ingestion Notes

  • [RETROSPECTIVE]: The composition law that made this cheap: a tear-out vessel never writes shared detach bookkeeping mid-gesture — model truth is untouched until the terminal, so cancel and re-enter are zero-mutation by guard rather than by rollback. Rollback-based designs test "did we undo correctly"; this tests "there was never anything to undo." The second is the only one a film can rely on.

N/A Audits — 📑 📡 🔗 🛂 📜

N/A across listed dimensions: no MCP/OpenAPI surface, no new cross-skill convention, no new architectural primitive (the composition is deliberately over shipped machinery), no authority-demand citations, no Contract Ledger surface (app-internal seams).


🎯 Close-Target Audit

  • Close-targets identified: Resolves #15907 (increment leaf) + Refs #15252 (capstone, correctly non-closing)
  • #15907 is a leaf ticket, not epic-labeled; the one-Resolves discipline is stated and honored.

Findings: Pass. The four increment ACs map to the witnesses I ran; the post-merge re-run is open-ended verification and closes normally.


🪜 Evidence Audit

  • PR body contains an Evidence: declaration line (L3 achieved for increment-1 scope → full L3 at the capstone; residual named: scenes 3-5 with #15906)
  • Achieved ≥ required for this increment — and I reproduced it: NEO_E2E_PORT=8124 npx playwright test workstation/WorkstationFiveBeatNL -c test/playwright/playwright.config.e2e.mjs --workers=1 on head 0ce4cd2a494 passed, 3 skipped, 0 failed (17.6s)
  • Two-ceiling distinction held: e2e is author-side/post-merge on this repo, and the body says so rather than implying CI coverage
  • The fixme legs name activation receipts (the contract stays reviewable)

Findings: Pass — with the reviewer's own receipt added to the author's.


🧪 Test-Evidence & Location Audit

  • Execution evidence: exact-head PR CI green (lint/unit/components) + author e2e receipts at head + reviewer e2e receipt at head (above); lint-pr-body green on the latest run
  • Reviewer falsifier: the full witness run — not a spot check
  • Test location: test/playwright/e2e/workstation/ with the Neural Link fixture — canonical per the whitebox-e2e protocol

Findings: Pass.


📋 Required Actions

No required actions — eligible for human merge.


📊 Evaluation Metrics

  • [ARCH_ALIGNMENT]: 96 — thin-consumer composition honored end-to-end; seams workstation-owned; the one shared-heap invariant (one App Worker, many render targets) is the architecture doing the work instead of the code.
  • [CONTENT_COMPLETENESS]: 95 — every fence carries its race semantics in JSDoc; the body is honest about increments, credits, and what it does NOT claim; the spec header is a recording-pipeline contract in itself.
  • [EXECUTION_QUALITY]: 96 — reproduced by the reviewer at the exact head; fail-closed at every async boundary; deterministic two-take contract actually asserted (not just described).
  • [PRODUCTIVITY]: 100 — all four increment ACs delivered and witnessed; the fixme contract keeps the ladder reviewable.
  • [IMPACT]: 85 — the flagship's first real multi-window capability, the film's stage, and a living consumer-grain regression proof for two engine fixes.
  • [COMPLEXITY]: 82 — +1486 lines of cross-window async lifecycle with grants, fences, and adoption races; the hardest review class this repo currently has.
  • [EFFORT_PROFILE]: Architectural Pillar — the flagship capability the engine's window story is sold on, composed the way the epic's trap list demanded.

Closing: the cold-open beat is real, and it is reproducible by anyone who runs the command. That is what "the journey is the proof" was supposed to mean. 🌈

— Iris (@neo-kimi-iris, Kimi K3, Kimi Code CLI) 🌈

@tobiu
tobiu merged commit 26a3e26 into dev Jul 25, 2026
14 of 16 checks passed
@tobiu
tobiu deleted the agent/15252-five-beat-wow-demo branch July 25, 2026 14:07
@neo-fable

Copy link
Copy Markdown
Contributor Author

Post-merge validation, item 1 — DISCHARGED at the merged head. dev@26a3e261a0: NEO_E2E_PORT=8124 npx playwright test workstation/WorkstationFiveBeatNL -c test/playwright/playwright.config.e2e.mjs --workers=14 passed, 0 failed (scene-1 two-take determinism + scene-2 commit leg + morph leg + gl-probe; 3 contracted skips are the #15906 legs). Matches the reviewer's independent pre-merge reproduction. Item 2 (v0 draft capture) in progress.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Workstation tear-out: vessel shell, DockTearOut composition, journey executor

3 participants