Repository navigation
fix(listen): preserve finalization after source close - #10066
Conversation
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
Keep a claimed inline/BYOK finalization owned by the pusher process after its originating listen connection closes, while treating the live result callback as best-effort. Failure-Class: none
…gauntlet The new _inline_finalization_survives_source_close scenario waited for the finalization job to reach 'processing', which is not a valid job status. FinalizationJobStatus is 'queued' | 'leased' | 'completed' | 'dead_letter' | 'blocked_byok'. 'processing' is a ConversationStatus, not a job status. claim_finalization_job transitions the job to 'leased', and the test's inline_finalization_hold_entered seam fires inside finalize_persisted_conversation (which runs only after the claim), so the observable claimed state is 'leased'. Waiting for the nonexistent 'processing' status caused the gauntlet to time out. Failure-Class: none
e9f40ee to
0fa4ea8
Compare
|
Fixed the failing Root cause: the new Fix: wait for Verification: |
Summary
Product invariants affected
None.
Failure class
Failure-Class: none
No existing failure class covers cancellation of durable work by the wrong WebSocket lifetime owner. This repair converges finalization on the existing process-scoped task owner and proves the real ownership boundary through the hermetic stack.
Verification
backend/.venv/bin/pytest -q backend/tests/unit/test_listen_finalization_cloud_tasks.py— 68 passed.npm run test:listen-pusher-stack:emulator— passed, including the new post-opcode-104 source-close scenario.make preflight— passed.backend/test.sh— ran the 683-file suite; one unrelated existing fast-unit timing guard failed intests/unit/test_audio_merge_tasks.py::TestEnqueueAudioMergeJob::test_schema_v2_task_named_by_conversation_and_fingerprint(0.14s over its 0.12s budget). All targeted finalization tests above passed.Closes #9995