Visual and ICE synchronization
The canvas and ICE are two representations of one pipeline definition.
The canonical store is the project repository: the committed file under .codinamo/pipelines/ is the source of truth, and the database keeps only a projection used for listing, execution, and editing.
Local editing draft
Visual and textual changes are local edits. Adding, moving, connecting, or removing actions on the canvas does not contact the server, and typing ICE does not replace the committed definition. The editor marks this state as uncommitted changes.
The ICE text is validated as you type, and the current text is stored as a recoverable draft. A draft never becomes the definition by itself.
Canvas to ICE
When the ICE tab opens, or before a commit, the canvas state is rendered into canonical ICE by a stateless server operation. Actions are sorted by reference name and graph edges are emitted deterministically.
If the ICE text has uncommitted edits, the canvas render does not overwrite them: the text takes precedence until it is committed or reverted.
Commit
The Commit action publishes the current ICE source into the project repository with the authenticated user as the commit author. Only then do the projection, the execution engine, and other sessions see the new definition.
A commit is rejected when the repository moved ahead since the editor was opened. The local draft is preserved, and reloading the editor reconciles from the repository, which always wins.
Layout is not semantics
Canvas positions and connection routing are visual layout. They are saved continuously as a projection and never enter the committed ICE, so dragging actions does not produce commits or dirty states.