Record a person's Stop as a stop, not a failed action - #406
Merged
Conversation
davidmckayv
requested review from
MikeRyanDev,
guidovizoso and
tylerslaton
as code owners
September 6, 2026 17:55
# Conflicts: # CHANGELOG.md
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.
What this changes
A person pressing Stop mid-action aborts the request, and the transport reports it as
The action was stopped.. The gateway wrote that outcome beside the decision row as a failure — the samecomputer.action_failedtype it writes for an unreachable computer or a timeout. The row's message was right, but anything counting failures by type (the natural way to watch for outages) read every Stop as one. This was surfaced as a follow-up while merging #403, which fixed the message but not the type.A stop now writes its own event type,
computer.action_stopped:ComputerStoppedError(a subclass ofComputerUnavailableError, so everything catching an unavailable computer to tell the model is unchanged) is thrown on both stop paths inclient.ts— the pre-fetch guard and the mid-flight abort.computer.action_stopped, carrying the same message.outcome.ts), and a policy dry-run skips it the way it skips a failure (policy-dry-run.ts) — both sit beside a decision row that is already scored.REPLAYABLE_EVENT_TYPESnever included either, so the dry-run query already excludes it.Where it runs
Boundary and audit
AbortSignal.Proof
computer-client.test.ts: an already-stopped request rejects withComputerStoppedError, which is still an instanceofComputerUnavailableError.computer-gateway.test.ts: a permitted command stopped mid-flight recordscomputer.action_allowedthencomputer.action_stopped(notaction_failed), message still says stopped.bun test server/→ 1807 pass, 0 fail; format/lint/typecheck/build clean.