Story
As a workflow author, I want to fork a retained run at a compatible history checkpoint, so I can modify a workflow and continue from recorded work without mutating or pretending to rewind the original run.
Contract
Every committed journal event receives a stable public event ID and references the logical Workspace root visible after it. A fork creates a new WorkflowRun:
xmd workflow fork <source-run-id> --at=<event-id> [--id=<new-run-id>] [--props-*=...] <definition>
The new run inherits the compatible journal prefix, source props unless overridden, and selected copy-on-write Workspace root. The supplied definition must replay compatibly through the checkpoint before live execution begins.
Forking never rewinds branches, pushes, pull requests, issues, prompts, or other external systems. A checkpoint containing Agent state is forkable only when the provider can fork that exact session state; otherwise the history entry says why it is not forkable.
Acceptance
- History roots are versioned and addressable independently of host paths or provider handles.
- Fork creates a distinct run identity and cannot modify the source run.
- Compatible replay reaches the checkpoint without repeating completed durable effects.
- Incompatible definition, props, or component identity fails before live effects begin.
- The selected filesystem root is shared copy-on-write or copied without changing observable behavior.
- Each history entry reports forkability and any blocking external or Agent state.
- External effects are adopted only through their own reconciliation contracts; none are rewound.
- Missing or corrupt source state fails explicitly.
Dependencies
Story
As a workflow author, I want to fork a retained run at a compatible history checkpoint, so I can modify a workflow and continue from recorded work without mutating or pretending to rewind the original run.
Contract
Every committed journal event receives a stable public event ID and references the logical Workspace root visible after it. A fork creates a new WorkflowRun:
The new run inherits the compatible journal prefix, source props unless overridden, and selected copy-on-write Workspace root. The supplied definition must replay compatibly through the checkpoint before live execution begins.
Forking never rewinds branches, pushes, pull requests, issues, prompts, or other external systems. A checkpoint containing Agent state is forkable only when the provider can fork that exact session state; otherwise the history entry says why it is not forkable.
Acceptance
Dependencies