Skip to content

ref(task-execution): One runnable check and no Conversation status repair - #2959

Merged
dcramer merged 1 commit into
mainfrom
ref/conversation-execution-status
Nov 9, 2026
Merged

dcramer merged 1 commit into
mainfrom
ref/conversation-execution-status

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Refs #2890. First slice for the Conversation execution status and its SQL copy.

  • SQL stores paused, not awaiting_resume. Migration 0089 renames old rows. Readers accept both names during rollout. feat(conversations): Derive one Conversation status #2951's status SQL matches only paused.
  • One runnable check. The duplicates in store.ts and worker.ts are gone. The store.ts copy counted failed as runnable, so the heartbeat sent wakes that did nothing.
  • No status repair. The decoder and writeConversation no longer turn idle into running or pending. writeConversation now rejects a lease on any status but running/paused, and idle with pending messages. No writer makes these states, and the old repair is older than the 7-day Redis TTL.
  • Heartbeat prunes the active index under the mutation lock. Before, it could remove the entry of work that an append had just made runnable.

Compatibility: Redis v2 records decode unchanged. The migration changes data only. #2951 also adds 0089, so the second PR to merge renumbers.

Left for later: a tagged Execution union with one transition owner (paused means three things today). Turn writes stop setting SQL execution_status/run_id (needs #2951's failed_turn_id). Write the SQL copy from the record that was just saved. Stop mirroring last_*_at. Compute retry exhaustion in one place. Drop the awaiting_resume reader.

via @dcramer.

--

View Session [Sentry]

@vercel

vercel Bot commented Nov 9, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
junior-docs Ready Ready Preview Nov 9, 2026 2:34am UTC

Request Review

@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

13 screenshot changes — 13 changed · 0 added · 0 removed

Review screenshots in Frameshift

Conversation Attachment · Desktop
Conversation Attachment · Desktop
Changed
Conversation Attachment · Mobile
Conversation Attachment · Mobile
Changed
Conversation Attachment Modal · Desktop
Conversation Attachment Modal · Desktop
Changed
Conversation Attachment Zoom · Desktop
Conversation Attachment Zoom · Desktop
Changed
Conversation Captured Memories Popover · Desktop
Conversation Captured Memories Popover · Desktop
Changed
Conversation Captured Memories Popover · Mobile
Conversation Captured Memories Popover · Mobile
Changed
Show 7 more changed screenshots
Conversation Details Watched Linked Work · Desktop
Conversation Details Watched Linked Work · Desktop
Changed
Conversation Details Watched Linked Work · Mobile
Conversation Details Watched Linked Work · Mobile
Changed
Conversation Long Transcript Touch · Mobile
Conversation Long Transcript Touch · Mobile
Changed
Conversation Unsent Answers · Desktop
Conversation Unsent Answers · Desktop
Changed
Conversation Unsent Answers · Mobile
Conversation Unsent Answers · Mobile
Changed
Memories · Mobile
Memories · Mobile
Changed
Settings Mcp · Desktop
Settings Mcp · Desktop
Changed

@dcramer
dcramer marked this pull request as ready for review November 9, 2026 03:32
@github-actions github-actions Bot added the risk: high PR risk score: high label Nov 9, 2026
@dcramer

dcramer commented Nov 9, 2026

Copy link
Copy Markdown
Member

Clean up the PR description here so its more succint

@dcramer
dcramer merged commit bf7c399 into main Nov 9, 2026
46 checks passed
@dcramer
dcramer deleted the ref/conversation-execution-status branch November 9, 2026 04:07
dcramer added a commit that referenced this pull request Nov 11, 2026
Migration 0057 kept `junior_automation_versions.kind`, the
`junior_conversations` `origin_type`/`origin_id`/`origin_run_id`
columns, and `junior_conversations_origin_idx` for one release. Its
comment said 0058 drops them, but no migration did. #2184 already
removed them from the snapshot, and no runtime code reads them.
Migration 0101 drops them with `IF EXISTS`, and the schema test no
longer filters them out.

#2959 stopped writing the `awaiting_resume` Conversation status in
0.288.0. Workers before that release could still write it after 0089
ran, so 0101 repeats the 0089 rename to `paused`, and
`executionStatusFromValue` no longer accepts the old name. The
`awaiting_resume` agent-dispatch outcome is a different contract and
does not change.

A deployment that upgrades straight from before 0057 would have old
workers writing the origin columns during its rollout.

<!-- junior-request-attribution:start -->
via @dcramer.
<!-- junior-request-attribution:end -->

<!-- junior-session-footer:start -->
<!-- junior-conversation-id:agent%3A3321086e7c3262ca03ac3d37c3e087c3 -->

--

[View
Session](https://junior-prod.sentry.dev/conversations/agent%3A3321086e7c3262ca03ac3d37c3e087c3)
[[Sentry]](https://sentry.sentry.io/explore/conversations/agent%3A3321086e7c3262ca03ac3d37c3e087c3/?project=4510944073809921)

<!-- junior-session-footer:end -->

Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com>
Co-authored-by: David Cramer <[email protected]>

This branch was successfully deployed

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

Labels

risk: high PR risk score: high

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant