Implement graph command and atomic batch engine #95

Merged
lost-rob0t merged 11 commits from agent/issue-8-command-engine into main 2026-07-26 13:53:25 +00:00
lost-rob0t commented 2026-07-26 13:45:57 +00:00 (Migrated from github.com)

Closes #8

What changed

  • add a pure canonical graph command engine under src/core
  • support add, update, and remove node
  • support add, update, and remove edge
  • support atomic multi-node movement
  • support viewport and complete view-state updates
  • support nested atomic command batches
  • validate the source graph and every produced graph against the type registry
  • return structured success effects and structured rejection details
  • remove attached edges deterministically when deleting a node
  • preserve the original graph when any command or batch child fails

Validation

  • every command path has unit coverage
  • node and edge updates preserve immutable identity fields
  • endpoint violations reject without mutation
  • movement rejects atomically when any node is missing
  • valid batches aggregate effects
  • failed batches report the failing index and roll back all prior child changes
  • invalid source graphs and unknown commands return structured rejection results

The engine is platform-independent and does not import React, Cytoscape, IndexedDB, PouchDB, or network modules.

Closes #8 ## What changed - add a pure canonical graph command engine under `src/core` - support add, update, and remove node - support add, update, and remove edge - support atomic multi-node movement - support viewport and complete view-state updates - support nested atomic command batches - validate the source graph and every produced graph against the type registry - return structured success effects and structured rejection details - remove attached edges deterministically when deleting a node - preserve the original graph when any command or batch child fails ## Validation - every command path has unit coverage - node and edge updates preserve immutable identity fields - endpoint violations reject without mutation - movement rejects atomically when any node is missing - valid batches aggregate effects - failed batches report the failing index and roll back all prior child changes - invalid source graphs and unknown commands return structured rejection results The engine is platform-independent and does not import React, Cytoscape, IndexedDB, PouchDB, or network modules.
Sign in to join this conversation.
No description provided.