Skip to content

fix(task-execution): Centralize conversation wakes - #708

Merged
dcramer merged 2 commits into
mainfrom
dcramer/fix/centralize-conversation-wakes
Jul 1, 2026
Merged

dcramer merged 2 commits into
mainfrom
dcramer/fix/centralize-conversation-wakes

Conversation

@dcramer

@dcramer dcramer commented Jul 1, 2026

Copy link
Copy Markdown
Member

Centralize conversation wake scheduling behind ensureConversationWake so ordinary wake requests coalesce on the durable enqueue marker instead of each business path sending and marking queue nudges directly.

This addresses the duplicate-wake loop risk from #705 without taking on the larger explicit wake-state redesign. The helper derives the queue payload destination from durable conversation state, requires explicit idempotency keys, keeps replacement wakes limited to consumed or known-stale deliveries, and clears consumed no-work wake markers so later inbound messages can wake immediately.

The PR also updates task-execution docs with the centralized wake contract and adds an interface-design policy note discouraging one-hop wrappers and pass-through helper layers, which came up while cleaning up the worker call sites.

Refs #705

Move production conversation wake sends through one helper that coalesces ordinary nudges on the durable enqueue marker. Keep replacement wakes only for consumed or known-stale deliveries, and clear consumed no-work markers so later inbound work can wake immediately.

Add focused coverage for continuation, completion, error, heartbeat, and consumed-wake paths. Update the task execution spec and interface design policy to document the centralized wake contract and discourage pass-through wrapper layers.

Refs #705
Co-Authored-By: GPT-5 Codex <[email protected]>
@vercel

vercel Bot commented Jul 1, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
junior-docs Ready Ready Preview, Comment Jul 1, 2026 3:32am

Request Review

@dcramer
dcramer marked this pull request as ready for review July 1, 2026 01:38
@github-actions github-actions Bot added the risk: medium PR risk score: medium label Jul 1, 2026
Coalesced conversation wakes now reuse the first accepted follow-up nudge while the active worker finishes. Update the integration case to assert the durable queue behavior instead of expecting a new completion requeue.

Co-Authored-By: GPT-5 Codex <[email protected]>
@dcramer
dcramer merged commit bb620e3 into main Jul 1, 2026
19 checks passed
@dcramer
dcramer deleted the dcramer/fix/centralize-conversation-wakes branch July 1, 2026 03:55

This branch was successfully deployed

1 active deployment
Preview – junior-docs — 07401886 Deployed Jul 1, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: medium PR risk score: medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant