Repository navigation
docs(orchestration-v2): task_cancel describes queued-only tasks and when it rejects #34517
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
4e0df05
c5b42a9
32dd2c6
ff00d36
dc8490c
87ae413
316f407
072f742
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -328,13 +328,18 @@ the published task result. | |
| ### `task_cancel` | ||
|
|
||
| Stops every task the child delegated, then the child thread with the internal | ||
| `thread.stop` command, and disposes automatic parent delivery. Like a user Stop, | ||
| `thread.stop` interrupts the running turn, holds queued turns, and ends pull request | ||
| watches. A nonterminal task with no interruptible run is rejected unless its finished | ||
| turn still waits on background work or delegated tasks. Once a cancelled task's turn ends, | ||
| a completed result settles as `interrupted` and a failed one stays `failed`. A terminal task | ||
| returns its existing status, and its child thread still stops, including later | ||
| runs and watch wakes. Published task results remain available. It accepts an | ||
| `thread.stop` command, cancels the task's own queued turn, and disposes automatic | ||
| parent delivery. Like a user Stop, `thread.stop` interrupts the running turn, holds | ||
| queued turns, and ends pull request watches. The task's own queued turn is cancelled | ||
| even if Stop already held it, so a task that is only queued can be cancelled; other | ||
| queued turns in the child stay held for Resume. A nonterminal task is rejected when | ||
| it has no interruptible run, no queued turn of its own, and its finished turn no | ||
| longer waits on background work or delegated tasks. Once a cancelled task's turn | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| ends, a completed result settles as `interrupted` and a failed one stays `failed`. A | ||
| terminal task returns its existing status, and its child thread still stops, | ||
| including later runs and watch wakes. In both cases, a follow-up that lost its child | ||
| run but still shows as running on the parent is cancelled there and reported as | ||
| `cancelled`. Published task results remain available. It accepts an | ||
| optional cancellation reason. | ||
|
|
||
| ### `create_threads` | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Script executed:
Repository: pingdotgg/t3code
Length of output: 3232
Script executed:
Repository: pingdotgg/t3code
Length of output: 19090
Script executed:
Repository: pingdotgg/t3code
Length of output: 12343
Script executed:
Repository: pingdotgg/t3code
Length of output: 10228
Script executed:
Repository: pingdotgg/t3code
Length of output: 21442
Script executed:
Repository: pingdotgg/t3code
Length of output: 7982
Script executed:
Repository: pingdotgg/t3code
Length of output: 16812
Script executed:
rg -n -F -- 'cancelDelegatedTask' apps/server/src/orchestration-v2/ThreadManagementService.tsRepository: pingdotgg/t3code
Length of output: 317
Script executed:
rg -n -F -- 'cancelDelegatedTask' apps/server/src/orchestration-v2/Orchestrator.tsRepository: pingdotgg/t3code
Length of output: 374
Script executed:
Repository: pingdotgg/t3code
Length of output: 4848
Document the buffered provider notification exception.
thread.stopcancels buffered provider notifications already queued when Stop runs, including held ones. Resume cannot restore those notifications.Suggested fix