LearnNewsExamplesServices
Frontmatter
id18310
titleAdd immutable per-group transaction history and cursor
stateClosed
labels
enhancementaiarchitecturecoredashboard
assigneesneo-fable
createdAtSep 4, 2026, 8:17 PM
updatedAtSep 5, 2026, 5:37 PM
githubUrlhttps://github.com/neomjs/neo/issues/18310
authorneo-gpt
commentsCount0
parentIssue18303
subIssues[]
subIssuesCompleted0
subIssuesTotal0
contentTrust
projected
quarantined0
signals[]
blockedBy[x] 18309 Bind transaction groups across window generations, [x] 18308 Hard-cut dock topology persistence to keyed workspace records
blocking[x] 18307 Every topology commit re-derives ~330 lines of header presentation because header state has nowhere to live but the commit path, [x] 18316 Add Workstation multi-window undo, redo, save, and reload, [x] 18315 Hydrate cold dock topologies and rebind warm reloads, [x] 18314 Unify Dock and Neural Link undo on the group cursor, [x] 18313 Record observed popup placement as a transaction participant, [x] 18312 Commit multi-workspace dock transactions atomically
closedAtSep 5, 2026, 5:37 PM

Add immutable per-group transaction history and cursor

Closed v13.2.0/archive-v13-2-0-chunk-19 enhancementaiarchitecturecoredashboard
neo-gpt
neo-gpt commented on Sep 4, 2026, 8:17 PM

Context

D#18224 measured data.Store versus collection.Base at depth 50 over the real Workstation document: latency differed only 1.04x, while mutability was decisive. Store insertion writes an internal id and Models expose replacement setters; frozen plain rows in a Collection can be the append-only authority.

The Problem

There is no user-facing dock history. Adding a mutable Store as authority would permit whole-field replacement of retained transactions, while statically importing it would make single-window/history-disabled apps pay for unused machinery. Cursor, redo invalidation, eviction, and retirement are Group-local invariants, not global filters.

The Architectural Reality

A Group owns one bounded history and cursor. The authoritative vehicle is a collection.Base of recursively frozen plain records. A data.Store may be created lazily as a read-only projection for grids/Neural Link inspection, but it never drives adoption or cursor decisions. A Group-level Provider publishes derived command state.

The Fix

Implement generic History/Group cursor semantics: append, undo, redo, redo-tail invalidation, depth eviction, immutable serialization, and provider projections. Dynamically load the history module at the first admitted transaction; the load is an admission barrier and queues the original descriptor exactly once. historyDepth: 0 imports nothing.

Contract Ledger

Target Surface Source of Authority Proposed Behavior Fallback Docs Evidence
authoritative history D#18224 H2 frozen plain rows in collection.Base disabled at depth 0 JSDoc nested + whole-field mutation controls
cursor D#18224 criteria 7/8 Group-local undo/redo/append/preserve bounds fail closed JSDoc branch/eviction unit matrix
Provider state explicit cross-window Provider parent canUndo, canRedo, depth/status false/empty before load guide/JSDoc multi-window binding arm
optional Store view manager.Store precedent lazy read-only clones destroy/rebuild loses no truth JSDoc mutation cannot affect authority
module admission D#18224 criterion 13 await once before mutation; enqueue once load failure leaves no mutation JSDoc red control at first gesture

Decision Record impact

Depends on amended ADR 0029; no new ADR.

Decision Record

Required prerequisite: the #18303 hard-cut authority leaf.

Discussion Criteria Mapping

Owns criteria 1–3's H2 vehicle, single-window cost, bounded history, and cursor half of criterion 7.

Acceptance Criteria

  • History rows are recursively frozen after Collection admission and reject nested mutation and whole-field replacement.
  • Append after undo drops only the redo tail; depth eviction and cursor bounds are Group-local and deterministic.
  • Frozen bytes emitted for a retained row remain unchanged after every rejected mutation control.
  • historyDepth: 0 causes zero static/dynamic history-module loads and leaves single-window behavior byte-equivalent.
  • The first enabled transaction awaits one dynamic import before participant mutation and enqueues its original descriptor exactly once.
  • The Group Provider exposes correct canUndo / canRedo in every bound window without presentation sweeps.
  • Any TransactionStore is lazy, read-only, clone-fed, and disposable without changing authority.

Out of Scope

Participant adoption, native effects, persisted topology snapshots, or Neural Link command migration.

Avoided Traps

No mutable Model authority; no global Store filtered by Group; no eager import; no second cursor in a UI projection.

Related

Part of #18303. Blocked by the hard-cut and Group-binding leaves.

Origin Session ID: 01a06b6d-3323-7fa0-a10b-bbc4871c8780

Retrieval Hint: D18224 H2 frozen Collection history cursor Store projection historyDepth

Creation freshness: live latest-open and all-status A2A sweeps found no equivalent history leaf.