You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(automations): a run answered together with another message no longer reads as failed - #47043
A scheduled/event run whose prompt reached a chat mid-turn is answered in that same turn. Its prompt was handled; only its own result post is skipped. It was still stored as dispatch_failed, so the automation row, its hover and the run list showed a red Failed icon and offered a rerun.
Fix
A run whose turn was shared with another message now completes (completed, no output) and keeps the existing notice as its run detail: "This run's message was answered together with another message, so its result wasn't posted." That is the same shape as other completed runs whose result could not be posted.
Runs stored as failed by earlier builds with exactly that notice are read back as completed when the profile loads (and saved that way).
Other result-unavailable cases (message removed or edited before it went, unattributed, unreadable) keep failing as before.
Readers checked
Status icons and tones (automation-last-run, row status, mobile rows), failure filters/counts (runs dashboard, list groups), rerun (canRerunAutomationRun), run details banner, CLI format and webhook outcomes all key on dispatch_failed, so they now treat these runs as completed. The shared case never sent a could-not-finish notice, so notifications are unchanged.
Test
src/main/bots/bot-run-results.test.ts: the shared turn end completes, and a stored failed row with the notice loads as completed. Both fail with the fix reverted.
Performance
None, because the change only picks a different run status for one result case and adds one string comparison per stored run at profile load.
No actionable comments were generated in the recent review.
Walkthrough
When a shared turn is unavailable because a prompt was answered with another message, the bot run result is now completed, with a null output snapshot and a shared-answer notice. During loading, saved runs with dispatch_failed status and that exact notice are changed to completed. Tests cover the result, matching status repair, and preservation of other failed runs.
Merge Risk: Minimal · up to 44a40
Automation runs answered together with another message will now show as completed instead of failed. Earlier matching failed rows are repaired when loaded. The change is small and well covered by tests, so the merge risk is minimal.
Pre-merge checks: 3 · 1
Failed checks: 1 warning
Check name
Status
Explanation
Resolution
Description check
The description explains the problem, the fix, the readers checked, the tests, and the performance impact, so it covers the substance of the change. It does not follow the repository template. It has …
Add the missing template sections: ELI5 (plain-language summary); What Changed and Why (the before/after as a user sees it, and why this approach over alternatives); Linked Issue (an actual issue reference, since this is required for outsid…
Passed checks: 3 passed
Check name
Status
Explanation
Title check
The title names the main change: a run answered together with another message no longer appears failed. It is specific and matches the changeset, which returns completed for shared turns and repairs s…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Title check
Explanation
The title names the main change: a run answered together with another message no longer appears failed. It is specific and matches the changeset, which returns completed for shared turns and repairs stored dispatch_failed rows with the notice. The title uses the conventional fix(automations) prefix and is 88 characters long, slightly above typical length but still readable.
Full details: Description check
Explanation
The description explains the problem, the fix, the readers checked, the tests, and the performance impact, so it covers the substance of the change. It does not follow the repository template. It has no ELI5, Why, Linked Issue, Visual Proof, Testing checklist, Risk level, AI Disclosure, or Notes sections. The Performance section is present and filled in. The author gives no reason for the lack of a visual proof section, which the template requires for behavior changes. No linked issue is given (Fixes # is missing). The Risk section is missing, which the template calls for when saved data is touched, and this PR rewrites persisted run status at profile load. The testing checklist is absent.
Resolution
Add the missing template sections: ELI5 (plain-language summary); What Changed and Why (the before/after as a user sees it, and why this approach over alternatives); Linked Issue (an actual issue reference, since this is required for outside contributors, or confirm that you are a maintainer); Visual Proof (before and after evidence for the status icon and run list change, or N/A with reason); Testing (manual test steps, platforms tested, and the checked testing boxes); Risk (level, the riskiest part, and how to back it out, covering the saved-data rewrite at profile load); AI Disclosure if applicable; and the Review, Agent skill upstream boundary, and Checklist sections.
Finishing Touches
Fix failing CI checks
Commit to this branch
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.
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
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.
Problem
A scheduled/event run whose prompt reached a chat mid-turn is answered in that same turn. Its prompt was handled; only its own result post is skipped. It was still stored as
dispatch_failed, so the automation row, its hover and the run list showed a red Failed icon and offered a rerun.Fix
completed, no output) and keeps the existing notice as its run detail: "This run's message was answered together with another message, so its result wasn't posted." That is the same shape as other completed runs whose result could not be posted.Readers checked
Status icons and tones (
automation-last-run, row status, mobile rows), failure filters/counts (runs dashboard, list groups), rerun (canRerunAutomationRun), run details banner, CLI format and webhook outcomes all key ondispatch_failed, so they now treat these runs as completed. The shared case never sent a could-not-finish notice, so notifications are unchanged.Test
src/main/bots/bot-run-results.test.ts: the shared turn end completes, and a stored failed row with the notice loads as completed. Both fail with the fix reverted.Performance
None, because the change only picks a different run status for one result case and adds one string comparison per stored run at profile load.