You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(cloud): add --cancel-previous to supersede the previous CI run
Sends the opt-in flag with the submission; the API derives the CI context
(repo + branch/PR + check name) from the run metadata and cancels the
previous run's still-queued tests.
The superseded run's own CLI, still polling, now exits 0 instead of failing
the build: any result carrying `superseded_by:` settles the verdict as
SUPERSEDED, even alongside a test that had already failed, because this run
no longer speaks for the commit. The failure is still printed and still in
tests[] under --json, where SUPERSEDED is a third value of an existing
documented field.
Sent as its own field rather than inside `config`, which is stamped onto
every result row and shipped to the runner — this is a submission directive,
not run configuration. Not exposed on the MCP tool: it has no CI metadata to
derive a context from, so the flag could only ever be a no-op there.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: src/config/flags/execution.flags.ts
+6Lines changed: 6 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,12 @@ import type { ArgsDef } from 'citty';
4
4
* Test execution and flow management flags
5
5
*/
6
6
exportconstexecutionFlags={
7
+
'cancel-previous': {
8
+
type: 'boolean',
9
+
default: false,
10
+
description:
11
+
'Cancel the still-queued tests of the previous run from the same CI context (repo + branch/PR + check name, read from your CI metadata). Tests already running are left to finish; cancelled tests are refunded at 75%. Does nothing outside CI.',
0 commit comments