spec: update api consistency
Align optimistic locking conflict payload, update websocket docs, and adjust tests.
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
## MODIFIED Requirements
|
||||
### Requirement: Optimistic Locking for Task Updates
|
||||
The system SHALL use optimistic locking to prevent concurrent update conflicts on tasks.
|
||||
|
||||
#### Scenario: Concurrent update detected
|
||||
- **WHEN** user A and user B both load task at version 1
|
||||
- **WHEN** user A saves changes, incrementing version to 2
|
||||
- **WHEN** user B attempts to save with version 1
|
||||
- **THEN** system returns 409 Conflict error
|
||||
- **AND** response includes a human-readable message instructing refresh and retry
|
||||
- **AND** response includes the current and provided version numbers
|
||||
|
||||
#### Scenario: Sequential updates succeed
|
||||
- **WHEN** user loads task at version N
|
||||
- **WHEN** user saves changes with correct version N
|
||||
- **THEN** system accepts update and increments version to N+1
|
||||
Reference in New Issue
Block a user