Lock types
| Lock key | Protects | Acquired by |
|---|---|---|
virtual_env:<name> | VDE pointer set and views | build, promote, rollback, reconcile, adopt, detach |
model_version:<model>:<hash> | Physical version creation | build (per model version) |
state_migration | State schema changes | state init, migrate, rollback, reset |
Lock behavior
- Locks have an expiry time (
expires_at). Active locks are those whereexpires_at > now. - When a lock is successfully released, the lock row is deleted.
- Acquiring a lock over an expired lock replaces it.
- Owner identity is checked on release - only the owner that acquired the lock can release it.

