pub enum Scheme {
FromName,
FromExternal,
}Expand description
How a change’s identity is derived, and what that choice costs.
Not a preference. Each orchestrator’s own contract forces one of these, and picking the other silently breaks a lifecycle operation.
Variants§
FromName
The workspace name is the identity: the change id is derived from it, so any caller holding the path can recompute the binding with no stored state.
Required when the orchestrator hands back only a directory on
teardown, which is exactly Claude Code’s WorktreeRemove. The
cost is that the binding does not survive a rename, and that two
attempts at one unit of work are two unrelated changes unless the
caller’s naming already says otherwise.
FromExternal
The identity is fingerprinted from stable external identity, and the workspace name is a derived label.
Required when competing workers must converge on one change for one unit of work, which is what a scheduler retry needs. The cost is that the full fingerprint does not fit in the directory name, so recovering the binding from a path alone is impossible and the adapter must keep durable state.