5a1570790c
Adds dispatch revision CAS to dispatched, skip, and release schedule mutations. Targeted Release evidence: 8/8 passed. PostgreSQL concurrency rehearsal remains required; WBS stays IN_PROGRESS.
22 lines
2.0 KiB
Markdown
22 lines
2.0 KiB
Markdown
# AEG-V15-036 — Dispatcher next-due CAS
|
|
|
|
## Scope
|
|
|
|
- **WBS ID:** `AEG-V15-036`; **Requirement / API / DB / Job / UI / Test:** `REQ-V15-SCH-04` / `V15-SCH-API` / `MIG-0020` / `J31~J40` / `Cross` / `T-V15-SCH-04`.
|
|
- **Dependency / Gate:** `AEG-V15-035` (completed, commit `d18f6a7`) / `G3`.
|
|
- **Acceptance:** a lost lease or stale dispatcher must make zero next-due advances.
|
|
|
|
## Source / Assumption / Unknown / Decision Required
|
|
|
|
- **Source:** `MIG-0020` supplies `dispatch_revision`; acquisition increments it, but the returned due-operation contract and both advance queries currently omit it.
|
|
- **Assumption:** the acquisition revision is an optimistic-concurrency token. A transition may mutate `next_due_at` only when both the lease owner and acquired revision match.
|
|
- **Unknown:** a live PostgreSQL runner is unavailable in this session, so a concurrent integration rehearsal cannot be asserted.
|
|
- **Decision Required:** `DEC-083` transactionality between enqueue and mark is separate. This Slice prevents stale state advance but does not make Hangfire enqueue transactional.
|
|
|
|
## Actual evidence and remaining acceptance
|
|
|
|
- `dotnet test tests/KArtSell.ModelOperations.UnitTests/KArtSell.ModelOperations.UnitTests.csproj -c Release --filter "FullyQualifiedName~DapperModelScheduleRepositoryContractTests|FullyQualifiedName~ScheduleOccurrencePlannerTests|FullyQualifiedName~ModelOperationRequestServiceTests" --logger "trx;LogFileName=DispatcherCasContractTests_20260809.trx" --results-directory evidence/AEG-V15-036`
|
|
- Result: passed `8/8`; artifact: `evidence/AEG-V15-036/DispatcherCasContractTests_20260809.trx`; SHA-256: `148FF7904CAE7372DD4728C24B845E280CEEE3116E5787BE621EC8E2E9005921`.
|
|
- The test locks the repository contract: dispatched, no-dispatch advance, and release SQL must all match both the lease owner and the acquired `dispatch_revision`.
|
|
- **Not complete:** a PostgreSQL concurrency test must acquire/reacquire the same schedule and show the stale revision updates zero rows. Until that artifact exists, the WBS remains `IN_PROGRESS`.
|