US07-04 — Prove Concurrency and Crash Recovery #41

Closed
opened 2026-07-13 13:10:53 +02:00 by domverse · 3 comments
Owner

Source specification: delivery_backlog/stories/US07-04-fault-concurrency.md

US07-04 — Prove Concurrency and Crash Recovery

Epic: E07

As an operator, I want randomized race and fault tests so concurrency cannot produce
deadlocks, stale commits, duplicate terminal states, or data loss.

Acceptance criteria

  • Test control points exist at persisted transitions without exposing production
    mutation APIs.
  • Tests cover database pressure, worker claim races, file changes, thumbnail races,
    safety/analysis races, EXIF/upload races, rename/archive conflicts, and cancellation.
  • Faults cover process death, disk full, read-only paths, DB busy/corruption, network
    failures, malformed providers, GPU exhaustion, subprocess hangs, and missing tools.
  • Recovery is deterministic or enters an explicit manual-recovery state.

Automated tests

  • Randomized suites repeat with recorded seeds and assert invariants after restart.
  • CI retains journals, logs, DB, seed, and filesystem manifest for any failure.

Dependencies

  • US07-02, US07-03
Source specification: [delivery_backlog/stories/US07-04-fault-concurrency.md](https://git.domverse-berlin.eu/domverse/photoanalyzer/src/branch/main/delivery_backlog/stories/US07-04-fault-concurrency.md) # US07-04 — Prove Concurrency and Crash Recovery Epic: [E07](https://git.domverse-berlin.eu/domverse/photoanalyzer/src/branch/main/delivery_backlog/E07-hardening-release.md) As an operator, I want randomized race and fault tests so concurrency cannot produce deadlocks, stale commits, duplicate terminal states, or data loss. ## Acceptance criteria - Test control points exist at persisted transitions without exposing production mutation APIs. - Tests cover database pressure, worker claim races, file changes, thumbnail races, safety/analysis races, EXIF/upload races, rename/archive conflicts, and cancellation. - Faults cover process death, disk full, read-only paths, DB busy/corruption, network failures, malformed providers, GPU exhaustion, subprocess hangs, and missing tools. - Recovery is deterministic or enters an explicit manual-recovery state. ## Automated tests - Randomized suites repeat with recorded seeds and assert invariants after restart. - CI retains journals, logs, DB, seed, and filesystem manifest for any failure. ## Dependencies - US07-02, US07-03
domverse added this to the E07 — Hardening and Release milestone 2026-07-13 13:10:53 +02:00
domverse added the area/testingpriority/criticaltype/hardeningarea/backend labels 2026-07-13 13:10:53 +02:00
domverse added a new dependency 2026-07-13 13:11:32 +02:00
domverse added a new dependency 2026-07-13 13:11:32 +02:00
domverse added a new dependency 2026-07-13 13:11:33 +02:00
domverse added a new dependency 2026-07-13 13:11:33 +02:00
domverse added a new dependency 2026-07-13 13:11:35 +02:00
domverse added this to the Photo Analyzer Delivery project 2026-07-13 13:19:48 +02:00
domverse added the status/backlog label 2026-07-13 13:52:56 +02:00
domverse added status/in-progress and removed status/backlog labels 2026-08-17 09:59:28 +02:00
domverse self-assigned this 2026-08-17 09:59:29 +02:00
Author
Owner

Claimed for implementation on branch us/US07-04-prove-concurrency-and-crash-recovery.

Claimed for implementation on branch `us/US07-04-prove-concurrency-and-crash-recovery`.
domverse added status/review and removed status/in-progress labels 2026-08-17 11:09:17 +02:00
Author
Owner

Submitted for review: #86

Tests passed:

  • work_item/scripts/python -m unittest discover -s work_item/tests -v
  • work_item/scripts/python -m pytest tests -q
  • work_item/scripts/python -m pytest tests/integration/test_concurrency_races.py tests/integration/test_fault_matrix.py tests/e2e/test_crash_recovery.py tests/unit/test_fault_artifacts.py -q
Submitted for review: https://git.domverse-berlin.eu/domverse/photoanalyzer/pulls/86 Tests passed: - `work_item/scripts/python -m unittest discover -s work_item/tests -v` - `work_item/scripts/python -m pytest tests -q` - `work_item/scripts/python -m pytest tests/integration/test_concurrency_races.py tests/integration/test_fault_matrix.py tests/e2e/test_crash_recovery.py tests/unit/test_fault_artifacts.py -q`
domverse added status/done and removed status/review labels 2026-08-17 11:09:32 +02:00
Author
Owner

Completed and merged via PR #86.

Completed and merged via PR #86.
domverse moved this to Done in Photo Analyzer Delivery on 2026-08-17 21:01:40 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Reference: domverse/photoanalyzer#41