LearnNewsExamplesServices
Frontmatter
id14651
titlePerspective persistence: revision migration + capture-scope fields on dockLayout.v1
stateClosed
labels
enhancementaiarchitecture
assigneesneo-fable-clio
createdAt5:37 AM
updatedAt9:28 AM
githubUrlhttps://github.com/neomjs/neo/issues/14651
authorneo-fable-clio
commentsCount0
parentIssue13158
subIssues[]
subIssuesCompleted0
subIssuesTotal0
contentTrust
projected
quarantined0
signals[]
blockedBy[]
blocking[ ] 14653 Perspective restore into unchanged topology: the happy-path round-trip, [ ] 14652 Perspective capture: single-window scope over the live dock document
closedAt9:28 AM

Perspective persistence: revision migration + capture-scope fields on dockLayout.v1

Closed Backlog/active-chunk-3 enhancementaiarchitecture
neo-fable-clio
neo-fable-clio commented on 5:37 AM

Context

Tree line B1 of the #13158 map — the T-B tranche's substrate gate. ADR 0029 §2.2 specifies perspective semantics; the shipped persistence wrapper (neo.harness.dockLayout.v1: layoutId/title/revision) predates them and carries no capture-scope or topology-fingerprint fields.

The Problem

Every §2.2 behavior (capture scope, cross-topology restore, fail-closed) needs schema room the wrapper lacks. Bolting fields on ad-hoc per-leaf recreates schema drift; the revision-migration path (§2.2's own requirement) must exist BEFORE the first perspective persists, or v1 records become the legacy problem on day one.

The Architectural Reality

  • The wrapper's revision field exists precisely for this: v1→v2 migration is the designed path, not a break.
  • New fields per §2.2: captureScope ('window'|'topology'), windowFingerprint (topology shape at capture — JSON-first, no windowIds/DOMRects per the standing guardrail), perspectiveName (optional; B6's store keys on it).
  • Migration contract: v1 records load as captureScope:'window' + null fingerprint (honest defaults, fail-open read); writes always v2. Fixtures = B8's seed.
  • Placement: the wrapper's owning module in src/dashboard/ (sibling fast-path).

The Fix

One PR: the v2 schema + the v1→v2 read-migration + write-path bump + JSDoc contract table + unit specs (v1 loads honestly, v2 round-trips, mixed-store reads, guardrail assertions: no live refs/window ids persisted).

Acceptance Criteria

  • v2 fields land with the JSON-first guardrail asserted in specs.
  • v1 records read with honest defaults; no write ever emits v1 again.
  • Migration is pure + unit-covered (no I/O in the migration fn).
  • The §2.2 fail-closed restore contract can be expressed against v2 (reviewer-checkable: the fields it needs exist).
  • Cross-family review.

Out of Scope

Capture/restore behavior (B2-B5) · the named store (B6) · NL tools (#14649).

Related

Parent #13158 (line B1) · authority ADR 0029 §2.2 · gates B2-B8, #14649, #14590. Sweeps: latest-10 at 03:31Z clean; line unclaimed.

Origin Session ID: fa2a6fd5-7488-4af6-a0d2-3855c86003e4 Retrieval Hint: "dockLayout v2 revision migration capture scope fingerprint"

tobiu referenced in commit c7c3b6e - "feat(dashboard): dockLayout v2 envelope — perspective fields + pure v1 migration (#14651) (#14695) on 9:28 AM
tobiu closed this issue on 9:28 AM