Implement graph transaction history and revisions #96

Merged
lost-rob0t merged 11 commits from agent/issue-9-graph-history into main 2026-07-26 14:03:23 +00:00
lost-rob0t commented 2026-07-26 13:57:41 +00:00 (Migrated from github.com)

Closes #9

What changed

  • add revisioned graph transaction state under src/core
  • advance revision exactly once for accepted commits, undo, and redo
  • group one command or an atomic command batch into one transaction
  • record immutable before/after snapshots, commands, effects, timestamps, and revision metadata
  • add bounded undo and redo stacks
  • restore graph data, positions, selection, layout, and viewport deterministically
  • reject stale expected revisions
  • clear the redo branch after a new edit
  • preserve state when commands fail or history is empty

Validation

  • single-command revision advancement
  • batch-as-one-unit undo
  • deterministic redo
  • stale commit/undo/redo rejection
  • failed-command history rollback
  • redo-branch clearing
  • bounded history behavior
  • zero-history-limit behavior
  • empty transaction rejection
  • independent transaction snapshots

The history layer remains platform-independent and composes the canonical graph command engine from #8.

Closes #9 ## What changed - add revisioned graph transaction state under `src/core` - advance revision exactly once for accepted commits, undo, and redo - group one command or an atomic command batch into one transaction - record immutable before/after snapshots, commands, effects, timestamps, and revision metadata - add bounded undo and redo stacks - restore graph data, positions, selection, layout, and viewport deterministically - reject stale expected revisions - clear the redo branch after a new edit - preserve state when commands fail or history is empty ## Validation - single-command revision advancement - batch-as-one-unit undo - deterministic redo - stale commit/undo/redo rejection - failed-command history rollback - redo-branch clearing - bounded history behavior - zero-history-limit behavior - empty transaction rejection - independent transaction snapshots The history layer remains platform-independent and composes the canonical graph command engine from #8.
Sign in to join this conversation.
No description provided.