Asynchronous analysis runs and data activation
- To keep previous inputs and results from mixing when an analysis is re-run, I separated requests and results by run ID, version, and input snapshot. I handled run states separately for queue registration failures and metadata save failures after registration, and made the frontend apply only responses that match the current run.
- To prevent duplicate runs from redelivered messages and to keep cancel requests from affecting other runs, I used a per-run process identifier. I added contract tests that verify redelivery, cancellation, and restart blocking for the same run while other runs keep going.
- OCR load batches are activated only after checking data range, batch continuity, and ground-truth statistics. Switching takes a transaction lock, and replacement is blocked when reviewed active data already exists.
