Repository navigation
fix(OMN-20978): several merged change-control companions for one PR resolve to the latest merged - #1956
Merged
Conversation
…esolve to the latest merged select_merged_companion refused whenever two merged companions named one product PR, so a PR whose head moved after its first companion merged waited on a record that could never change (omniclaude#2661: OCC#13596 and OCC#13675). The companion merged last into the shared base is now cited: the change-control branch is squash-only and linear, so its merge commit carries every earlier companion's records. Missing or unparseable merge times, split bases and tied latest times still fail closed as ambiguous.
onexbot-occ-writer Bot
pushed a commit
to OmniNode-ai/onex_change_control
that referenced
this pull request
Oct 11, 2026
…omnibase_core#1956 OCC companion by node_pr_lifecycle_fix_effect (OMN-13317 F1 / OMN-13990 / OMN-14285). Product PR head 452f11a53c6151c1f151a7e0e8e4786e150c56e8.
jonahgabriel
enabled auto-merge (squash)
October 11, 2026 19:28
jonahgabriel
pushed a commit
to OmniNode-ai/onex_change_control
that referenced
this pull request
Oct 11, 2026
…base_core (#13693) * evidence(OMN-20978, OMN-20940): author OCC companion for OmniNode-ai/omnibase_core#1956 OCC companion by node_pr_lifecycle_fix_effect (OMN-13317 F1 / OMN-13990 / OMN-14285). Product PR head 452f11a53c6151c1f151a7e0e8e4786e150c56e8. * evidence(OMN-20978, OMN-20940): self-bind OCC#13693 + rebind contract_sha256 --------- Co-authored-by: omnimarket-bot <bot@omninode.ai>
…idence / dod-verify verifies it Cause: repo-evidence / dod-verify refused on head 452f11a with 'pull request cites OMN-20978 but carries no contracts/OMN-20978.yaml'; the OCC path admitted, so the shadow comparison failed as unclassified_difference and CI Summary failed closed on that L4 external context. Fix: the in-repo contract binds AC1 (-k multiple_merged), AC2 (-k other_pr) and AC3 (the gate passes on the latest of two merged companions, the omniclaude#2661 shape) to this PR's own tests. node_dod_verify reports all three verified at the head tree and all three failed at the merge base 60ce70d.
This was referenced Oct 12, 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.
OMN-20978
Cause
select_merged_companion(OMN-18338) refused whenever two or more MERGED change-control companions named one product PR, andresolve_evidence_source_from_recordturned that refusal into a retryable wait that can never resolve, because merged records do not change. A PR whose head moves after its first companion merged gets a second companion, and from then on occ-preflight / eligibility, the companion-merged gate in CI Summary and the receipt-gate probe all wait to their deadline and fail. Observed on omniclaude#2661 at head 6305f9576: OCC#13596 (bound head ad7cb80, merged 2026-10-10T19:00:36Z) and OCC#13675 (bound head 9aaf535, merged 2026-10-11T14:15:02Z). Because occ-preflight checks this script out at core-ref dev, the defect is live for every repository.Fix
When several distinct merged companions name the PR, the one merged last into their shared base is cited. The change-control branch is squash-only and linear, so that merge commit has every earlier companion's merge commit as an ancestor. A receipt-gate checkout at it, or the occ-preflight durable tip that contains it, therefore carries every record the earlier companions did, and choosing it cannot hide evidence. The candidate read adds
mergedAt,baseRefNameto the onegh pr listcall it already makes, and the three consumers share the resolver, so no extra API calls are made.Shapes the rule cannot order still fail closed with an
ambiguousdetail: a missing, unparseable or timezone-less merge time, candidates merged into different or unreadable bases, and two candidates tied on the latest time. Open, closed-unmerged and other-PR records are excluded before ordering, as before. The result cap of 50 and the unreadable-lookup refusal are unchanged.Verification
git checkout origin/dev -- scripts/ci/check_occ_companion_merged.py), gave 17 failed and 1 passed.tests/unit/scripts/ci/test_check_occ_companion_merged.pyplustests/ci/test_companion_side_binding_omn18338.pygave 97 passed. The neighbouring occ-preflight-wait, receipt-gate-shape and contract-compliance binding suites gave 138 passed.mypy --strictclean on the script, and the commit and push pre-commit hooks passed.-k multiple_merged) and AC2 (-k other_pr) are covered by the new test class. AC3 (occ-preflight / eligibility passes on omniclaude#2661) is verified by a rerun after this lands on dev.Lab: not runtime-affecting (CI gate script only, no runtime image or compose input changes), so there is no lab lane to exercise. Instead I replayed the real omniclaude#2661 records through the fixed resolver. Merge times were read from the onex_change_control canonical clone: da751e72 (#13596) at 2026-10-10T19:00:36Z and 211f3f25 (#13675) at 2026-10-11T14:15:02Z.
git merge-base --is-ancestor da751e72 211f3f25exits 0, and the resolver returns OCC#13675.Unblocks omniclaude#2661, the gh shim commit-object gateway that lets lanes commit change-control receipts again. It also unblocks any other PR that has two merged companions.
Evidence-Ticket: OMN-20978
Evidence-Source: OCC#13693