fix: deliver conversation replies before queued news #74

Merged
morten-olsen merged 1 commit from fix/01a15e24-conversation-final into main 2026-10-21 13:51:51 +02:00
Owner

Summary

A followed-task update arriving during a conversation reply opened the next prompt before the reply was delivered. That reset the transcript's final text; a silent follow-up turn then left the person without an answer on every client.

before: finish → queued news → reset reply → wait → send nothing
after:  finish → save reply → queued news → next turn

Deliver conversation replies at turn completion. Track whether each prompt answers a person and which agent message it already knew, so a second person message arriving during the previous turn gets its own answer and explicit sends still suppress the automatic reply. Reserve the active run while completing a turn so a nudge cannot reset its reply during the transcript flush. Task idle escalation and agent-conversation cursors remain in the existing waiting callback.

Evidence

  • Before: read-only production SQLite inspection found the complete 11:00:49–55 answer in run ef10b908-7c39-48c2-8229-b0f00d9119b2, absent from conversation ca87f610-de7a-476e-98a4-dba4bfdf5a53. A task comment at 11:00:54.197 caused a new prompt immediately after end_turn at 11:00:55.518. Task 01a15e24-a6c3-74c7-bfb3-423dcc4ac176 records the trace.
  • Both new integration regressions failed before their respective fixes: queued task news replaced the intended answer; a second person prompt then lost its answer because the earlier reply had a later timestamp.
  • After: server type-check, changed-file ESLint/Prettier and the run, agent-conversation and stalled-task tests pass locally (71 tests). These drive a real ACP test process against the server, including reply persistence, queued news, explicit sends, stop/resume and escalation.
  • CI: PR pipeline #524 and push pipeline #523 are green at d0a71a8. The full quality run passes 890 tests across 130 files, plus type-check, lint, formatting, docs, deployment tooling and both container builds.
  • Rollout: v0.52.1 is live at exact source d0a71a8. Release pipeline #547 is fully green, including 890 tests, both image publications/scans, automatic deployment and the signed APK/checksum. GitOps 8595fa6 changes exactly the server/agent pins; mirror has no error; ArgoCD is Synced/Healthy; the server and newly resumed agents run the expected digests. Health/readiness pass, one server replica is ready, the existing 30 GiB claim is Bound, and the schema remains 038. The unchanged replay fails on deployed 0.52.0 and passes on deployed 0.52.1 for queued task news, concurrent person messages and independent persisted HTTP reads. Replay uses temporary data, not Morten’s conversation; task evidence includes its script and result.

Merge danger

Door: two-way. Code-only change, with no schema or credential changes.

Blast radius: app. Shared turn scheduling changes are covered by task and agent-conversation tests as well as the human conversation regressions.

Rollback and verification

  • Roll back: revert this commit and deploy the previous server/agent digest pair through the existing GitOps path. No data repair is required.
  • Verify after rollout: wait for the release image/deployment workflows, the homelab/apps mirror and the Mission Control Application at the expected revision; inspect the actual server/agent digest pair and ready replicas. Exercise a conversation reply with a followed-task update during its turn and confirm the intended reply exists in persisted conversation messages before the follow-up prompt; also exercise a second person message during a turn.
  • Reviewers: owner review completed; no security trigger or requested Designer sign-off. Morten approved the exact patch release and rollout on 2026-10-21. Published v0.52.1 with both tag and release target pinned to d0a71a8, excluding later main changes and migration 039. No device installation was performed.
## Summary A followed-task update arriving during a conversation reply opened the next prompt before the reply was delivered. That reset the transcript's final text; a silent follow-up turn then left the person without an answer on every client. ```text before: finish → queued news → reset reply → wait → send nothing after: finish → save reply → queued news → next turn ``` Deliver conversation replies at turn completion. Track whether each prompt answers a person and which agent message it already knew, so a second person message arriving during the previous turn gets its own answer and explicit sends still suppress the automatic reply. Reserve the active run while completing a turn so a nudge cannot reset its reply during the transcript flush. Task idle escalation and agent-conversation cursors remain in the existing waiting callback. ## Evidence - **Before:** read-only production SQLite inspection found the complete 11:00:49–55 answer in run `ef10b908-7c39-48c2-8229-b0f00d9119b2`, absent from conversation `ca87f610-de7a-476e-98a4-dba4bfdf5a53`. A task comment at 11:00:54.197 caused a new prompt immediately after `end_turn` at 11:00:55.518. Task 01a15e24-a6c3-74c7-bfb3-423dcc4ac176 records the trace. - Both new integration regressions failed before their respective fixes: queued task news replaced the intended answer; a second person prompt then lost its answer because the earlier reply had a later timestamp. - **After:** server type-check, changed-file ESLint/Prettier and the run, agent-conversation and stalled-task tests pass locally (71 tests). These drive a real ACP test process against the server, including reply persistence, queued news, explicit sends, stop/resume and escalation. - **CI:** [PR pipeline #524](https://woodpecker.olsen.cloud/repos/32/pipeline/524) and [push pipeline #523](https://woodpecker.olsen.cloud/repos/32/pipeline/523) are green at `d0a71a8`. The full quality run passes 890 tests across 130 files, plus type-check, lint, formatting, docs, deployment tooling and both container builds. - **Rollout:** [v0.52.1](https://code.olsen.cloud/ai/mission-control/releases/tag/v0.52.1) is live at exact source `d0a71a8`. [Release pipeline #547](https://woodpecker.olsen.cloud/repos/32/pipeline/547) is fully green, including 890 tests, both image publications/scans, automatic deployment and the signed APK/checksum. GitOps `8595fa6` changes exactly the server/agent pins; mirror has no error; ArgoCD is Synced/Healthy; the server and newly resumed agents run the expected digests. Health/readiness pass, one server replica is ready, the existing 30 GiB claim is Bound, and the schema remains 038. The unchanged replay fails on deployed 0.52.0 and passes on deployed 0.52.1 for queued task news, concurrent person messages and independent persisted HTTP reads. Replay uses temporary data, not Morten’s conversation; task evidence includes its script and result. ## Merge danger **Door:** two-way. Code-only change, with no schema or credential changes. **Blast radius:** app. Shared turn scheduling changes are covered by task and agent-conversation tests as well as the human conversation regressions. ## Rollback and verification - **Roll back:** revert this commit and deploy the previous server/agent digest pair through the existing GitOps path. No data repair is required. - **Verify after rollout:** wait for the release image/deployment workflows, the homelab/apps mirror and the Mission Control Application at the expected revision; inspect the actual server/agent digest pair and ready replicas. Exercise a conversation reply with a followed-task update during its turn and confirm the intended reply exists in persisted conversation messages before the follow-up prompt; also exercise a second person message during a turn. - **Reviewers:** owner review completed; no security trigger or requested Designer sign-off. Morten approved the exact patch release and rollout on 2026-10-21. Published v0.52.1 with both tag and release target pinned to `d0a71a8`, excluding later main changes and migration 039. No device installation was performed.
fix: deliver conversation replies before queued news
Some checks failed
ci/woodpecker/pr/deploy-tools Pipeline was successful
ci/woodpecker/pr/image-agent Pipeline was successful
ci/woodpecker/pr/quality Pipeline was successful
ci/woodpecker/pr/docs Pipeline was successful
ci/woodpecker/pr/image Pipeline was successful
ci/woodpecker/push/image-smoke Pipeline is pending
ci/woodpecker/push/deploy-access Pipeline was successful
ci/woodpecker/push/deploy-tools Pipeline was successful
ci/woodpecker/push/draft-release Pipeline was successful
ci/woodpecker/push/quality Pipeline was successful
ci/woodpecker/push/docs Pipeline was canceled
ci/woodpecker/push/image Pipeline was canceled
ci/woodpecker/tag/image-release Pipeline was successful
ci/woodpecker/tag/image-agent Pipeline was successful
ci/woodpecker/tag/deploy-release Pipeline was successful
ci/woodpecker/tag/release-android Pipeline was successful
d0a71a8f9e
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
ai/mission-control!74
No description provided.