{"id":"es-optimistic-concurrency-via-expected-version","text":"`append(..., expected_version=V)` succeeds only if the current stream version equals V; a stale version raises `ConcurrencyConflict`.","truth_value":"IN","source":"entries/2026/05/29/event-sourcing-store-test_event_store.md","source_url":"","source_hash":"","justifications":[],"dependents":[],"metadata":{"example":"if expected_version is not None:\n    current = self.stream_version(stream_id)\n    if current != expected_version:\n        raise ConcurrencyConflict(...)"},"explanation":{"steps":[{"node":"es-optimistic-concurrency-via-expected-version","truth_value":"IN","reason":"premise"}]}}