Skip to content

Resume conversations after background workflow completion - #703

Merged
witbrock merged 3 commits into
mainfrom
codex/von-f552c18399f61be2
Sep 14, 2026
Merged

witbrock merged 3 commits into
mainfrom
codex/von-f552c18399f61be2

Conversation

@witbrock

@witbrock witbrock commented Sep 14, 2026 •

Copy link
Copy Markdown
Member

An attached document's background workflow can outlive the conversation turn, leaving a promise to continue without another turn being queued. This change persists the remaining work in the existing prompt queue and supplies actual document text to workflow consumers independently of indexing.

Behaviour

  • Represented workflow capabilities accept a continuation prompt and readiness condition. A held, cancellable successor is persisted before acknowledging continuation; terminal workflow state or available source text can release it.
  • Reconciliation reads the original turn's effects and exact workflow scope, then conditionally releases the same successor. Existing cancellation, reservation, membership and conversation-authorisation checks remain active. The model chooses remaining work and reconciles domain effects.
  • Explicit file references supply source text, IDs, hashes and truncation to workflow consumers. Cached content and bytes share the existing attachment owner/archive checks. Without persisted text, the bounded byte projection can release a text consumer while indexing remains pending. No interpretation/indexing workflow is relaunched.
  • TaskExecution-backed work retains its task continuation route. Historical turns without a registered successor require explicit recovery.

Native task: #V#task_resume_authorised_conversation_work_after_f4a22c8d. No event-specific prompt, filename rule, workflow publication or database migration is introduced.

Acceptance

Merge decision: ready after the final candidate's required CI passes. The controller-owned recovery dependency is resolved, and the subsequently discovered conversation-attachment early-release defect is repaired.

Targeted tests cover queue durability, interrupted release, duplicate delivery and dispatch, cancellation, prior-effect read-back, foreign scope, revoked membership, source projection and attachment access. The faithful PDF fixture exercises cached and unpersisted text with conversation_image=true, releases exactly one continuation while the workflow remains in its index step, and supplies usable text to the event workflow launch path. Existing file-reader and upload/preview tests cover the shared reader boundary.

Controller evidence for retained candidate b0047c84b0443976e82f0e595fb20194ec99e9eb independently verifies a real MongoDB process restart and duplicate-dispatch handoff. It also records actor-scoped recovery of the existing event and 22 programme records, source provenance and exact originating-conversation completion read-back. The verified evidence archive is native attachment attachment_e2fd81e7811b, SHA-256 d8719ea1405dd2467591b4fabba5dfa5830acb9dcf60668808182f7e76d3e4d2. That recovery was controller-operated; it was not automatic production replay. The final local regression tests cover the additional attachment repair.

No public deployment is requested or claimed. The launch configuration is Astra/high; provider-observed model identity is unavailable. No additional live model requests were made.

Stop-ship conditions remain lost continuation, duplicate domain effects, cross-actor continuation, discarded source text or unsupported continuation promises on the affected path. Historical indexing performance, unrelated queue work and general workflow redesign remain outside scope.

Final integrated candidate: 2401ff2198f06e999418232213a41c79035133f2.

VON_USE_MOCK_DB=1 pdm run pytest tests/backend/test_background_workflow_continuation_service.py tests/backend/test_workflow_file_source_service.py tests/backend/test_workflow_turn_capability_service.py tests/backend/test_chat_prompt_queue_service.py tests/backend/test_chat_prompt_queue_dispatch_service.py tests/backend/test_adaptive_turn_service.py tests/backend/test_conversation_images.py tests/backend/test_computer_file_copy_artifact_ingestion.py tests/backend/test_file_bytes_text_projection_service.py tests/backend/test_von_file_upload_endpoint.py -q --disable-warnings --maxfail=1
454 passed in 5.68s

git diff --check passed. These local tests use mock storage and scripted model fixtures; they do not claim autonomous production event recovery.

@witbrock
witbrock merged commit 45d4c12 into main Sep 14, 2026
2 checks passed
@witbrock
witbrock deleted the codex/von-f552c18399f61be2 branch September 14, 2026 22:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant