feat(cloud): add --cancel-previous to supersede the previous CI run - #164
Merged
Merged
Conversation
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>
Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. |
This was referenced Sep 17, 2026
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.
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.What & why
Type of change
fix— bug fixfeat— new featureperf— performance improvementrefactor— code change that's neither a fix nor a featuredocs— documentation onlychore/ci/build/test— tooling, no user-facing change!or PR notes aBREAKING CHANGE:)Checklist
pnpm lintpassespnpm typecheckpassespnpm buildpassesCHANGELOG.md(release-please handles this)README.md/STYLE_GUIDE.mdupdated if behaviour or output changedHow to test