Skip to content

feat(cloud): add --cancel-previous to supersede the previous CI run - #164

Merged
finalerock44 merged 1 commit into
devfrom
feat/cancel-previous-run
Sep 17, 2026
Merged

finalerock44 merged 1 commit into
devfrom
feat/cancel-previous-run

Conversation

@finalerock44

@finalerock44 finalerock44 commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

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 fix
  • feat — new feature
  • perf — performance improvement
  • refactor — code change that's neither a fix nor a feature
  • docs — documentation only
  • chore / ci / build / test — tooling, no user-facing change
  • Breaking change (title has ! or PR notes a BREAKING CHANGE:)

Checklist

  • PR title follows the Conventional Commits format (see comment above)
  • pnpm lint passes
  • pnpm typecheck passes
  • pnpm build passes
  • I have not bumped the version or edited CHANGELOG.md (release-please handles this)
  • I have signed the CLA (the bot will prompt on first contribution)
  • Docs / README.md / STYLE_GUIDE.md updated if behaviour or output changed

How to test

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>
@finalerock44 finalerock44 self-assigned this Sep 17, 2026
@claude

claude Bot commented Sep 17, 2026

Copy link
Copy Markdown

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

@finalerock44
finalerock44 merged commit 169036d into dev Sep 17, 2026
15 checks passed
@finalerock44
finalerock44 deleted the feat/cancel-previous-run branch September 17, 2026 12:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant