Repository navigation
fix(automations): Link runs to their Automation when they start - #2174
Closed
sentry-junior[bot] wants to merge 4 commits into
Closed
sentry-junior[bot] wants to merge 4 commits into
sentry-junior[bot] wants to merge 4 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 16a2ca5. Configure here.
Co-Authored-By: David Cramer <[email protected]>
sentry-junior
Bot
force-pushed
the
fix/automation-run-link-at-start
branch
from
October 16, 2026 23:13
16a2ca5 to
35df1fc
Compare
createTask left the title empty, so the create tool asked the live title model through AI Gateway. The gateway host is on the test allow-list. In a sandbox with gateway credentials the model returned a title. In CI the call failed, generation returned undefined, and readers fell back to the first instruction line. Two tests depended on which side they ran on. Set an explicit title in the fixture and assert one exact title.
dcramer
approved these changes
Oct 16, 2026
dcramer
left a comment
Member
There was a problem hiding this comment.
at some point we're going to have to figure out how to simplify this
Runs created before the start-time link have no origin_id. Run history still names them. Remove the fallback after those runs age out. Co-Authored-By: David Cramer <[email protected]>
6 tasks
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

An Automation run's Conversation now records which Automation and run it belongs to as soon as the run is enqueued. Before, the only link was the run history row, and that row is written only when the run finishes.
The link uses the existing
origin_type,origin_idandorigin_run_idcolumns onjunior_conversations. Until now these columns were always written as null. InenqueueAgentDispatch, therecordActivitycall that creates the run's Conversation now passes anautomationRun(Automation id, kind, and run id). Event runs use the dispatch id as the run id. Scheduled runs use the scheduled run id. The store writes:origin_type: the Source kind,event_automationorscheduled_automationorigin_id: the Automation idorigin_run_id: the run idThe origin upsert is now set-once (
coalesce(current, excluded)), the same assource. Before, every later write replacedorigin_typewith the conversation source ("plugin"), which would have overwritten the link. Nothing readsorigin_typetoday, and for other Conversations it already matched the set-oncesource. So the only behavior change is for Automation runs.readAutomationTitlesByConversationId(from #2169) now uses the Conversation's origin first. Runs created before this change have no origin, so it falls back to run history for them. As a result, the Automation-name title fallback also works while a run is still in progress.Run history (
junior_task_executions) is unchanged. It is still a log of finished runs. This PR has no migration and no new status.via David Cramer.
--
View Junior Session [Sentry]