fix(api): stash zero-write conflict superseded instead of 409 #1005

Merged
chris merged 1 commit from fix/stash-409-conflict into main 2026-10-03 18:01:31 +02:00
Owner

Summary

  • Resolve insert-only zero-write stash cards as rejected with an actor-attributed review decision; preserve all occurrences, including own tentative allocations and removed rows. No face stealing.
  • Add outcome=all_faces_already_assigned (state=rejected, occurrencesAccepted=0, classInstanceId=null); ordinary results expose outcome=applied.
  • Real candidate races retain HTTP 409 and expose ProblemDetail code=candidate_changed with refresh guidance. Snapshot/parity checks unchanged.
  • Update specs 045/047 and PostgreSQL, decision, and HTTP serialization/exception contract tests. No frontend changes.

Verification

  • PASS: rtk ./gradlew :apps:api:test --tests "*Spec045StashTentativePostgresTest" --tests "*ClassInstanceDiscoveryServiceTest" --tests "*ApiExceptionHandlerTest"
  • PASS: rtk ./gradlew :apps:api:test (1499 tests, 0 failures/errors, 9 skipped; isolated final run 3m46s).
  • PASS: git diff --check.
  • Earlier overlapping local Gradle runs caused report-write failures; final full run was repeated alone and passed.

Integration notes

  • Uses rejected, not superseded, following the existing all_faces_already_assigned resolution/audit pattern.
  • KNOWN_ISSUES ISSUE-090 needs orchestrator consolidation: its own-allocation 409 statement is now outdated; left unchanged to respect lane scope and entry ownership.
  • Branch commit: 81401434.
## Summary - Resolve insert-only zero-write stash cards as rejected with an actor-attributed review decision; preserve all occurrences, including own tentative allocations and removed rows. No face stealing. - Add outcome=all_faces_already_assigned (state=rejected, occurrencesAccepted=0, classInstanceId=null); ordinary results expose outcome=applied. - Real candidate races retain HTTP 409 and expose ProblemDetail code=candidate_changed with refresh guidance. Snapshot/parity checks unchanged. - Update specs 045/047 and PostgreSQL, decision, and HTTP serialization/exception contract tests. No frontend changes. ## Verification - PASS: rtk ./gradlew :apps:api:test --tests "*Spec045StashTentativePostgresTest" --tests "*ClassInstanceDiscoveryServiceTest" --tests "*ApiExceptionHandlerTest" - PASS: rtk ./gradlew :apps:api:test (1499 tests, 0 failures/errors, 9 skipped; isolated final run 3m46s). - PASS: git diff --check. - Earlier overlapping local Gradle runs caused report-write failures; final full run was repeated alone and passed. ## Integration notes - Uses rejected, not superseded, following the existing all_faces_already_assigned resolution/audit pattern. - KNOWN_ISSUES ISSUE-090 needs orchestrator consolidation: its own-allocation 409 statement is now outdated; left unchanged to respect lane scope and entry ownership. - Branch commit: 81401434.
fix(api): resolve zero-write stash decisions without conflict
All checks were successful
Wiki Sync / Sync wiki from docs (push) Has been skipped
Build and Deploy / Detect changed services and test scopes (push) Successful in 2s
Build and Deploy / Android unit tests and debug APK (push) Has been skipped
Build and Deploy / Build postgres image (push) Has been skipped
Build and Deploy / Smoke API and media worker (push) Has been skipped
Build and Deploy / Smoke web (push) Has been skipped
Build and Deploy / Smoke ML worker (push) Has been skipped
Build and Deploy / Smoke people worker (push) Has been skipped
Build and Deploy / Build plants worker image (push) Has been skipped
Build and Deploy / Build converter worker image (push) Has been skipped
Build and Deploy / Deploy postgres (push) Has been skipped
Build and Deploy / Build API image (push) Has been skipped
Build and Deploy / Build media worker image (push) Has been skipped
Build and Deploy / Build ML worker image (push) Has been skipped
Build and Deploy / Build people worker image (push) Has been skipped
Build and Deploy / Build web image (push) Has been skipped
Build and Deploy / Deploy API (push) Has been skipped
Build and Deploy / Deploy web (push) Has been skipped
Build and Deploy / Deploy media worker (push) Has been skipped
Build and Deploy / Deploy ML worker (push) Has been skipped
Build and Deploy / Deploy plants worker (push) Has been skipped
Build and Deploy / Deploy people worker (push) Has been skipped
Build and Deploy / Deploy converter worker (push) Has been skipped
Build and Deploy / Clean Docker build artifacts (push) Has been skipped
Build and Deploy / Run scoped PR tests (push) Successful in 9m54s
81401434b8
chris merged commit 8572e36926 into main 2026-10-03 18:01:31 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
chris/memories!1005
No description provided.