-
Notifications
You must be signed in to change notification settings - Fork 0
Smart CI planner exhausts merge-ref retries before GitHub updates a PR head #3316
Copy link
Copy link
Open
Labels
Priority IIThe active direction's next tranche: wedge capabilities, significant defects, near-term hardening.The active direction's next tranche: wedge capabilities, significant defects, near-term hardening.bugSomething isn't workingSomething isn't workingciCI/CD pipeline, workflow, and build infrastructure changes.CI/CD pipeline, workflow, and build infrastructure changes.testingTest coverage, harnesses, regression prevention, and verification pipeline work.Test coverage, harnesses, regression prevention, and verification pipeline work.
Description
Activity
Metadata
Metadata
Assignees
Labels
Priority IIThe active direction's next tranche: wedge capabilities, significant defects, near-term hardening.The active direction's next tranche: wedge capabilities, significant defects, near-term hardening.bugSomething isn't workingSomething isn't workingciCI/CD pipeline, workflow, and build infrastructure changes.CI/CD pipeline, workflow, and build infrastructure changes.testingTest coverage, harnesses, regression prevention, and verification pipeline work.Test coverage, harnesses, regression prevention, and verification pipeline work.
Projects
- StatusShow more project fieldsPending
Summary
The
pull_request_targetSmart CI planner can fail closed on a valid same-repository PR because GitHub's syntheticrefs/pull/<n>/mergestill names the previous head when the workflow begins.resolve-merge-ref.mjsretries three times, but the merge ref is sometimes updated only after that window.This is distinct from an ambiguous or malicious binding: the PR API already reports the intended head, changed-file count and eventually a current merge commit; the short-lived merge ref simply lags the event.
Exact evidence
PR #3315, base
307c3b8b50bec1cb0bfaea3e570a942bcb1d4451, head07c59d655fc4b225ab7c1c85c7d5f0e269601ce2:35540674080: all three merge-ref attempts reportedhead mismatch; planner emitted the full R4 error plan and the Required Gate failed.mergeable: truewith a currentmerge_commit_sha, a close/reopen generated fresh run35540751034; all three attempts again reportedhead mismatchbefore the synthetic ref caught up.The fail-closed rule is correct. The defect is the observation window and event timing: a valid merge ref becomes available after the planner has already committed an error receipt.
Expected contract
merge_commit_sha/mergeability and fetch that exact ref until it binds to the event head, or fail closed at the deadline with the last observed identities.merge-ref-not-yet-currentfrom a stable wrong-head/wrong-base binding.Acceptance
Refs #2326, #2327, #2508. Found while qualifying #3315; product CI remains independently authoritative for that draft.