Skip to content

ci(rccl): build the coco PR baseline at the PR's merge-base - #14105

Open
speriaswamy-amd wants to merge 1 commit into
developfrom
users/speriaswamy/rccl-coco-merge-base
Open

speriaswamy-amd wants to merge 1 commit into
developfrom
users/speriaswamy/rccl-coco-merge-base

Conversation

@speriaswamy-amd

Copy link
Copy Markdown
Contributor

Motivation

The coco PR gate built its develop baseline at develop tip on every run, because each run uses a fresh output directory. A PR was therefore measured against code it did not contain. In 18 replayed ruby64 runs, seven unrelated PRs showed another commit's 1-node reduce_scatter change (#12928) as their own.

Technical Details

rccl_resolve_coco_run.py now, for PR runs:

  • resolves the PR's base branch (GET /pulls/{n}) and its merge-base with the head (GET /compare/{base}...{head}), using the job's GITHUB_TOKEN;
  • appends --baseline-sha <merge-base> to coco_args, which already flows into both the build-only and the test coco pr calls;
  • passes the flag only when the checked-out coco harness supports it (coco pr --baseline-sha, ROCm/tRCCL), and otherwise emits a workflow warning. This change is therefore safe to land before the harness release that adds the flag;
  • fails the setup job when the merge-base cannot be resolved or equals the PR head, rather than silently comparing the wrong code.

Periodic runs are unchanged. The flag ships in coco 1.4, so pinning starts when the gate's default coco_ref moves from 1.3.x to 1.4.x. Until then, runs log the warning and behave as today.

Issue Tracking

JIRA ID: AICOMRCCL-2204

Test Plan

  • Unit tests in .github/scripts/tests/rccl_resolve_coco_run_test.py (21 pass):
    • args with and without a pin;
    • merge-base resolution against the PR's own base branch;
    • refusal of a head that is its own merge-base, and of a malformed SHA;
    • periodic runs;
    • an older harness without the flag.
  • Formatted with the repo's black 26.5.1.
  • Resolved a real PR's merge-base through the new code: ci(rccl): build device-api with rocSHMEM GIN #12752 → a22b7e7847, matching gh api compare.

Test Result

All pass. A ruby64 gate run on a PR, once the harness has the flag, should show --baseline-sha in the coco pr command line and an RCCL version line at the merge-base on the baseline stack.

Submission Checklist

The coco PR gate built its develop baseline at develop tip on every run,
so changes merged after a PR branched read as the PR's own. Resolve the
PR's merge-base with its base branch and pass it as --baseline-sha when
the coco harness supports the flag, warning when it does not.

Signed-off-by: speriaswamy-amd <surya.periaswamy@amd.com>
@github-actions github-actions Bot added the github actions Pull requests that update GitHub Actions code label Oct 22, 2026
@therock-pr-bot

Copy link
Copy Markdown

✅ All Policy Checks Passed

Check Status Details
📝 PR Description ✅ Pass —
⛔ Forbidden Files ✅ Pass —
🧪 Unit Test ✅ Pass —
🚫 Draft PR 🔜 To Be Enabled —
🚩 Feature Flag 🔜 To Be Enabled —
📊 Code Coverage 🔜 To Be Enabled —

🎉 All policy checks passed!

📖 Need help? See the Policy FAQ for details on every check and how to fix failures.

🙋 Wish to Override Policy?

@speriaswamy-amd
speriaswamy-amd marked this pull request as ready for review October 23, 2026 20:52
@speriaswamy-amd
speriaswamy-amd requested a review from a team as a code owner October 23, 2026 20:52

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

github actions Pull requests that update GitHub Actions code organization: ROCm

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant