On this page

0211. Distinguish VC CAS conflicts

Context

Ref creation collisions and stale updates currently share a misleading moved-branch message. Queue retries depend on the E1006 prefix; filesystem errors must not change.

Decision

Use a private Copy conflict enum in refs.rs to distinguish AlreadyExists from Moved. Classify an absent expectation with a present ref as AlreadyExists; all other expectation mismatches are Moved. Render both through one function, retaining E1006 and the exact moved message, but naming the existing branch for creation collisions. Fork's early absence check uses the same classifier under its existing branch lock. Keep filesystem errors in the existing String error channel without wrapping them.

Alternatives considered

Consequences

Creation collisions now suggest the right recovery while moved updates and queue retries retain their behavior. No store format, locking or publication order changes.