Repository navigation
fix(mothership): answer a Chat workflow tool paused for a person with its resume link - #9751
Merged
Merged
Conversation
… its resume link A browser-run workflow tool whose run paused at a Human in the Loop block was never answered: the browser reports nothing for a paused run, the execute route's report skipped a non-terminal log, and the lapsed-wait watcher only detaches a running log. The Chat turn parked on the call until it timed out, and the model never learned the run was waiting on the user or where to answer. - Settle the call when its run waits on a person, with the resume page link and an instruction to hand it to the user rather than resume it. A run paused only on time resumes itself and keeps the call held. - The Chat-side waiter re-reads the pause and the call's binding instead of trusting a confirmation's data. - The lapsed-wait watcher answers a human pause if the route's report failed. - Share the pause point parser between run status reads and this check.
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
There was a problem hiding this comment.
1 issue found across 7 files
Reply with feedback, questions, or to request a fix.
Turn on auto-fix | Re-trigger cubic
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="apps/sim/lib/mothership/request/tools/client.ts">
<violation number="1" location="apps/sim/lib/mothership/request/tools/client.ts:391">
P2: A person can submit the form before this waiter re-reads the pause. The pause lookup then returns null while the resumed run is still pending/running, and the fallback reports the original `success` confirmation as `{ success: true }`, falsely telling Chat that the workflow finished. Handle this in-progress-resume case as deferred (using a URL rebuilt from the verified execution identity or waiting for the terminal result) rather than falling through to structural success.</violation>
</file>
Contributor
[Medium impact] The PR appears safe to merge; the resumed-run race now returns a running answer rather than claiming completion. SummaryChat workflow tools now answer a human pause with the resume link instead of leaving the turn waiting.
|
…n its form was submitted before Chat read the pause
Collaborator
Author
Collaborator
Author
|
@cubic-dev-ai review this PR |
Contributor
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
This branch was previously 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.
Summary
run_workflow,run_from_block, …) whose run paused at a Human in the Loop block was never answered: the browser reports nothing for a paused run, the execute route's report skipped a non-terminal log, and the lapsed-wait watcher only detaches arunninglog (a paused run's log stayspending). The turn parked until it timed out and the user never saw where to approveexecution-stateand share it with run status readsType of Change
Testing
workflow-client-settlement.integration.ts(real Postgres + Redis): 25 passing, 4 new. Each new test fails with its guard reverted (route report, watcher net, waiter re-read, waiter binding check); the existing resume/cancel tests now run through a time pause, the case that still holds the callexecution-read-payloads.integration.tsfor the moved parserworkflow-client-fallback,client,execution-status,execution-status-projection, copilotconfirmroute, workflowmutations, toolexecutor(234 passing)check:comment-hygiene,check:source-conventions,check:utils,check:file-names; full type-check andcheck:auditsin CIChecklist
test-auditauthoring gate)