Repository navigation
fix(OMN-20482): auto-merge concurrency group carries the event class - #1878
Merged
Merged
Conversation
The auto-merge concurrency group in .github/workflows/auto-merge.yml was auto-merge-${{ <pr number chain> }} with cancel-in-progress true. A check_suite run for a PR shared the group auto-merge-<pr> with that PR's pull_request run and cancelled it (annotation: "Canceling since a higher priority waiting request for auto-merge-1869 exists"). The check_suite run executes at the default branch sha, so its Enable Auto-Merge check-run lands on dev's sha, not the PR head; the head keeps only the cancelled copy. The real pair was pull_request run 37125245233 cancelled by check_suite run 37125283147 for PR 1869.
The group is now auto-merge-${{ github.event_name }}-${{ <same chain> }}; cancel-in-progress stays true.
New test: tests/unit/validation/test_auto_merge_concurrency_event_class_omn20482.py renders the group expression and replays four real run pairs through GitHub's concurrency rules; it failed 8 of 12 before the change and passes after.
Not runtime-affecting; CI workflow change only.
jonahgabriel
enabled auto-merge (squash)
October 4, 2026 01:35
jonahgabriel
pushed a commit
to OmniNode-ai/onex_change_control
that referenced
this pull request
Oct 4, 2026
…12707) * evidence(OMN-20482): author OCC companion for OmniNode-ai/omnibase_core#1878 OCC companion by node_pr_lifecycle_fix_effect (OMN-13317 F1 / OMN-13990 / OMN-14285). Product PR head 94771aec8e9507d638597142c8bc8328998a47b6. * evidence(OMN-20482): self-bind OCC#12707 + rebind contract_sha256 --------- Co-authored-by: omnimarket-bot <bot@omninode.ai>
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
This PR fixes a concurrency race in the Auto-Merge workflow where
check_suiteruns were incorrectly cancellingpull_requestruns for the same PR. This change updates the concurrency group to include the event name, ensuring that runs of different event classes do not cancel each other. Ticket: OMN-20482.Lab: host=h201 (hostname omninode-pc) lane=automerge-cancel-race command=
uv run --frozen pytest tests/unit/validation/test_auto_merge_concurrency_event_class_omn20482.py tests/unit/validation/test_auto_merge_workflow_shape.py tests/unit/scripts/ci/test_auto_merge_hold_omn18179.py -o addopts=""observed 73 passed; before the change the new test file failed 8 of its 12 tests, after it all 12 pass.Cause
A
check_suiterun and apull_requestrun for the same PR shared the concurrency groupauto-merge-<pr>. Becausecancel-in-progresswas set to true, thecheck_suiterun would cancel thepull_requestrun.Evidence:
check_suiterun's job log explicitly named the same PR ("PR: 1869").check_suiterun executes at the default branch SHA, meaning its "Enable Auto-Merge" check-run lands ondev's SHA, never on the PR head. Consequently, the PR head retains only the cancelled copy of the check.pull_requestrun / cancellingcheck_suiterun) were identified for specific PRs:Fix
The concurrency group in
.github/workflows/auto-merge.ymlis updated fromauto-merge-${{ <pr number chain> }}toauto-merge-${{ github.event_name }}-${{ <same chain> }}. Thecancel-in-progresssetting remains true.A new test file,
tests/unit/validation/test_auto_merge_concurrency_event_class_omn20482.py, is added. This test renders the group expression and replays four real run pairs through GitHub's concurrency rules (one running and one pending run per group) to verify that no event class cancels another.Behavior after fix:
pull_requestrun.check_suitecompletion still cancels the oldercheck_suiterun for that PR.Measurement
Between 2026-10-03T00:40Z and 2026-10-04T01:30Z, 12
pull_requestruns were cancelled in this repo's Auto-Merge workflow. 10 of these cancellations occurred on heads with no successful Auto-Merge run. No head had CI Summary failing only on the cancelled copy in that window; every sampled head also carried other non-green check-runs.The deferred test-passes gate in this repo already treats an annotated concurrency cancellation as superseded (OMN-17427). This change removes the source of the cancellations.
Not runtime-affecting
This change is limited to the CI workflow and tests. The
.201compose lanes are untouched. The surfaces exercised are the workflow concurrency expression, the pytest files listed in the Lab section, and the pre-commit hooks that run at commit.Evidence-Ticket: OMN-20482
Evidence-Source: OCC#12707