fix(mothership): report a paused Copilot workflow whose cancel lost the race to an unreported terminal run by waleedlatif1 · Pull Request #9293 · simstudioai/sim · GitHub
Skip to content

fix(mothership): report a paused Copilot workflow whose cancel lost the race to an unreported terminal run - #9293

Merged
waleedlatif1 merged 1 commit into
stagingfrom
fix/paused-cancel-terminal-report
Oct 21, 2026
Merged

waleedlatif1 merged 1 commit into
stagingfrom
fix/paused-cancel-terminal-report

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator

Summary

  • Follow-up to fix(mothership): report a Copilot workflow tool whose paused run settles after a resume or cancel #9290 from the v0.9.31 release review.
  • finalizePausedCancellationForTerminalRun runs when a cancel of a paused run loses the race to another writer that already made the run terminal. That writer may never report the Copilot tool bound to the execution: the stale-execution sweep, or a resume worker killed after its log write. The tool then waits out the Copilot client wait.
  • It now reports through reportCopilotToolForSettledPause, the same as completePausedCancellation. The reporter is idempotent: it does nothing unless the log is terminal, a CAS lets only a running row claimed by this execution through, and it never throws. A report the winner already made is therefore a no-op.

Type of Change

  • Bug fix

Testing

  • workflow-client-settlement.integration.ts: 13/13. New: a paused execution whose cancel lost the race to a run that failed unreported is delivered to the waiting Copilot turn. It goes red without the call.
  • Unit: human-in-the-loop-manager plus lib/execution (1306 pass). check:test-patterns and biome pass. Full type-check and check:audits run in CI.

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing (new tests pass the test-audit authoring gate)
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel

vercel Bot commented Oct 21, 2026

Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 2 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Heads up: you’re close to your flex budget. Increase your flex budget so reviews don’t pause.

Turn on auto-fix | Re-trigger cubic

@greptile-apps

greptile-apps Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

@waleedlatif1
waleedlatif1 merged commit 044805a into staging Oct 21, 2026
55 checks passed
@waleedlatif1
waleedlatif1 deleted the fix/paused-cancel-terminal-report branch October 21, 2026 21:59

This branch was previously deployed

1 inactive deployment
Preview — 1f9850ea Deployed Oct 21, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant