ci: scope commitizen bump detection, tag only merged bumps, stop cancelling pending bumps - #253
Merged
Merged
Conversation
…ged bumps Scope each package's bump_pattern/bump_map to its own name so a sibling package's breaking change cannot major it, only tag after the bump PR really merges, and give each merge its own release concurrency group so a queued merge cannot cancel a pending bump. Co-Authored-By: Larry Osakwe <larry@keycard.ai>
Contributor
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
…verage Review round: one refused bump must not cancel sibling bumps (that is how the mcp bump was lost on the incident rerun), the scoped breaking-change requirement is now documented for contributors, and the root package joins the increment tests.
Larry-Osakwe
approved these changes
Aug 31, 2026
Larry-Osakwe
left a comment
Contributor
There was a problem hiding this comment.
Reviewed against the authoring prompt plus a follow-up fix round (fail-fast, scoped-breaking docs, root package coverage). Attempt-level evidence for the incident narrative is in the description.
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.
Summary
keycardai-mcpwas released as 3.0.0 on Aug 28 when it should have been 2.2.0. Three independent defects in the release automation combined to produce it; this PR closes all three. Workflow/config only — no package version is bumped, andci/build-scoped commits (i.e. this PR) do not trigger a release.Defect 1 — a queued merge cancelled a pending bump.
main.ymlshared one concurrency group across every push to a branch, and a group only ever holds a single pending run: when PR #245 landed, its run replaced the still-queued run for6350810(PR #246), sokeycardai-mcp's bump never fired.cancel-in-progress: falsealone did not help — the cancellation happens in the pending slot. Fix: one group per commit, so each merge bumps its own packages.Evidence note: run 33224003769 shows
failuretoday because the incident-day recovery rerun (attempt 2) overwrote the conclusion; attempt 1 is the record for this defect —cancelled, zero jobs started. Attempt 2 also exposed two more problems this PR fixes: the old bump script treatedNO_COMMITS_FOUNDas a crash instead of a clean no-op (now handled alongsideNO_COMMITS_TO_BUMP), and the matrix's defaultfail-fastcancelled the sibling package's bump when one job failed (fail-fast: falseadded, review round). The review round also documents the scoped breaking-change requirement in CLAUDE.md and adds the root package to the increment tests.Since runs for the same package can now overlap,
bump-package.yml's job getsconcurrency: bump-<package_name>-<target_branch>withcancel-in-progress: falseso same-package bumps still serialise on the bump branch/tag.Defect 2 — increment detection ignored the commit scope. Each package set only
changelog_patternunder[tool.commitizen.customize]; with nobump_pattern/bump_map, commitizen falls back to its default classifier (^((BREAKING[- ]CHANGE|\w+)(\(.+\))?!?):+ default map), which majors on anyfeat(...)!:. Thefeat(keycardai-oauth)!: multi-resource web-app flowcommit sat inkeycardai-mcp's window, so the manualworkflow_dispatchrecovery loggedincrement detected: MAJORand shipped 3.0.0. Everypyproject.tomlnow scopes detection to its own package:bump_map_major_version_zeromirrors it withMINORfor breaking changes, preserving today's pre-1.0 behaviour for themajor_version_zero = truepackages.changelog_patterndropsbuild|ciso CI-only commits are not release-relevant.scripts/test_bump_increment.py(new, wired into CI viajust test-release-tooling) builds throwaway git repos from each package's real commitizen block and asserts increments throughcz bump --dry-run: the 3.0.0 scenario (feat(keycardai-oauth)!+fix(keycardai-mcp)) now yields2.1.1, a sibling breaking commit alone yields no bump, own!/BREAKING CHANGEfooters still major, andci/build/test/chore/docscommits produce neither a bump nor a changelog entry.Defect 3 — the tag was created even though the bump PR never merged. When branch policy refused the direct merge of bump PR #250,
wait_for_pr_mergefell back togh api -X PATCH repos/<repo>/git/refs/heads/main -f sha=<PR head>, i.e. it force-moved the branch outside the policy and then tagged, publishing 3.0.0 before the bump landed and leaving main's version file behind PyPI. That fallback is deleted: a refused merge now leaves auto-merge armed, and the poll returningNonefails the job with the PR link and no tag, so a tag can only ever point at a real merge commit.Regression tests in
scripts/test_bump_package.pyassert that a refused merge touches neitherPATCHnorgit/refs, and that an unmerged bump PR never reachescreate_and_push_tag.Verified:
just check,just test-coverage,just test-release-tooling(18 tests), andscripts/version_preview.pyreports[]for this branch (no release).just typecheckis not runnable here or in CI —tyis not a declared dependency.Link to Devin session: https://app.devin.ai/sessions/6a25aef8314d4d7aa459521d0dac768a
Open in Devin Desktop: https://app.devin.ai/desktop/session/6a25aef8314d4d7aa459521d0dac768a?variant=devin
Requested by: @Larry-Osakwe