Repository navigation
feat(board): Stop a running task; confirm before running a needs-human ticket - #230
Merged
Merged
Conversation
…n ticket to the AI A member started the whole M1 epic of the first real project by mistake and had no way to stop it short of killing the CLI process by hand. Stop (end to end): - TaskStopRegistry (Web, singleton): a running task's cancellation keyed by tenant + task — it outlives the circuit that started it; a rerun cancels and replaces the older run. - The Tasks table shows Stop on a running row; the token cancels the Fast engine's LLM dispatch and the Thorough engine's pipeline stream; the task and its unfinished repos read "Stopped", Try again restarts it. - Broker raises Cancelled when a dispatch is abandoned (caller cancelled or timed out); the transport sends "Cancel" to that runner, which kills the CLI run's whole process tree (git/dotnet/npm children too). Before, a timed-out run kept working unseen on the member's machine. Guard: "Work on this" on a ticket labelled needs-human / epic shows why it is meant for a person and keeps "Start working" disabled until "Run it anyway". Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018WAdQ7Rm24xss5QDSvXtJB
| using var second = registry.Begin("t1", Task1); | ||
|
|
||
| first.Token.IsCancellationRequested.ShouldBeTrue(); | ||
| first.Dispose(); |
Comment on lines
+1904
to
+1910
| foreach (var child in await sessRepo.ListReposForTenantAsync(capturedTenantId, capturedSession.Id).ConfigureAwait(false)) | ||
| { | ||
| if (child.Status is "Pending" or "Running") | ||
| { | ||
| await sessRepo.UpdateRepoRunResultAsync(capturedTenantId, child.Id, "Failed", null, null, "Stopped").ConfigureAwait(false); | ||
| } | ||
| } |
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.
Change description
A member started the M1 epic of the first real project (DeltaByteLab/VNChessAcademy#1) by mistake and could only stop it by killing the CLI process by hand.
Cancelso the runner kills the CLI process tree. A timed-out dispatch is cancelled on the runner too (before, it kept working unseen).TaskStopRegistry: process-wide, keyed by tenant + task, outlives the circuit; a rerun cancels/replaces the older run.Type of change
Checklist
dotnet buildReleaseTaskStopRegistryTests, broker cancel/timeout tests); UI E2E standalone 50, 0 failed🤖 Generated with Claude Code
https://claude.ai/code/session_018WAdQ7Rm24xss5QDSvXtJB