Skip to content

fix(ci): sync workflow SHA refs + fix auto-merge in bump-sha#169

Merged
YiWang24 merged 1 commit into
mainfrom
fix/sync-workflow-shas
May 26, 2026
Merged

fix(ci): sync workflow SHA refs + fix auto-merge in bump-sha#169
YiWang24 merged 1 commit into
mainfrom
fix/sync-workflow-shas

Conversation

@YiWang24

@YiWang24 YiWang24 commented May 26, 2026

Copy link
Copy Markdown
Collaborator

Fixes

1. Sync workflow file SHA references

Workflow files had stale SHA 9b40a02a from before the revert-workflow approach. Updated all 13 files to 34a93579 (current manifest.yml SHA). Future auto-bumps will keep them in sync via RELEASE_PAT.

2. Fix auto-merge

gh pr merge --auto requires branch protection rules on main (GitHub GraphQL error: enablePullRequestAutoMerge). Switched to direct squash merge (--squash --delete-branch). The guard condition prevents infinite loops when the bump merge triggers the workflow again.

no-issue


View with Codesmith Autofix with Codesmith
Need help on this PR? Tag @codesmith with what you need. Autofix is disabled.

Greptile Summary

This PR performs two changes: a bulk sync of stale SHA references (9b40a02a34a93579) across 13 workflow files, and a fix to the on-main-bump-sha workflow that switches the bump PR merge from --auto (requires branch protection) to an immediate --squash --delete-branch.

  • SHA sync (12 files): All uses: YiAgent/OpenCI/...@<sha> and reusable-*.yml@<sha> references are mechanically updated to the current manifest.yml SHA. These changes are correct.
  • test.yml corruption: The SHA replacement accidentally clobbered the word bootstrap in four places — two comments, one workflow_dispatch input description, and one step name — leaving strings like self-34a93579aac0d1682cc65ab8b7c2c9e2d06b0953ping that are visible in the GitHub Actions UI.
  • Auto-merge change (on-main-bump-sha.yml): The switch to direct squash merge avoids the enablePullRequestAutoMerge GraphQL error, and the guard pattern correctly prevents infinite loops, but it also means the bump PR is now merged into main without waiting for any CI checks to pass on that PR.

Confidence Score: 3/5

Merge is blocked by corrupted text in test.yml that should be fixed before landing on main.

The bulk SHA update across 12 workflow files is correct. However, test.yml has four corrupted strings where the word "bootstrapping" was mangled into "34a93579...ping" — affecting an input description and a step name that are surfaced in the GitHub Actions UI. That corruption came from the same bump operation this PR is meant to fix, and it would land on main as-is. The auto-merge switch in on-main-bump-sha.yml is functional but removes the CI gate on bump PRs, which is a lesser concern compared to the test.yml issue.

.github/workflows/test.yml needs the four "bootstrapping" strings restored before merging.

Important Files Changed

Filename Overview
.github/workflows/test.yml Four occurrences of "bootstrapping" were corrupted — the word "bootstrap" was replaced with the new SHA, leaving garbled step names, comments, and a workflow_dispatch input description visible in the GitHub Actions UI
.github/workflows/on-main-bump-sha.yml Switched auto-merge from --auto (waits for checks) to immediate --squash --delete-branch; guard pattern correctly detects squash-merged bump commits to break infinite loops, but CI on bump PRs is no longer enforced
.github/workflows/reusable-ci.yml Eight resolve-openci action references updated from stale SHA 9b40a02 to 34a9357 — mechanical SHA bump, no logic changes
.github/workflows/reusable-pr.yml Three resolve-openci action references updated from stale SHA 9b40a02 to 34a9357 — mechanical SHA bump, no logic changes
.github/workflows/reusable-self-test.yml Four resolve-openci action references updated to 34a9357 — mechanical SHA bump, no logic changes
.github/workflows/issue-ops.yml Three reusable-issue workflow references updated to 34a9357 — mechanical SHA bump
.github/workflows/ci.yml reusable-ci.yml reference updated from stale SHA to 34a9357 — mechanical SHA bump

Sequence Diagram

sequenceDiagram
    participant M as Main Branch
    participant W as on-main-bump-sha
    participant S as bump-self-sha.sh
    participant G as Guard Step
    participant PR as Bump PR
    participant GH as gh pr merge

    M->>W: push to main (non-bump commit)
    W->>G: "check commit message & author"
    G-->>W: "skip=false"
    W->>S: run bump-self-sha.sh
    S->>S: resolve new SHA from remote HEAD
    S->>S: perl replace old SHA in manifest.yml + workflow files
    S-->>W: files updated
    W->>PR: git push chore/bump-self-sha-SHA
    W->>PR: gh pr create
    W->>GH: gh pr merge --squash --delete-branch (immediate, no CI wait)
    GH-->>M: squash commit merged
    M->>W: push triggered again (bump commit)
    W->>G: check commit message
    G-->>W: "skip=true (matches chore(manifest): bump YiAgent/OpenCI SHA)"
    W-->>W: workflow exits early
Loading

Reviews (1): Last reviewed commit: "fix(ci): sync workflow file SHA referenc..." | Re-trigger Greptile

Greptile also left 2 inline comments on this PR.

Workflow files had stale SHA 9b40a02 (pre-dating the revert-workflow
approach). Now that RELEASE_PAT is used for git-push, all SHAs will
stay in sync going forward via bump-self-sha.sh.
@qodo-code-review

Copy link
Copy Markdown

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

@coderabbitai

coderabbitai Bot commented May 26, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@YiWang24, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 10 minutes and 18 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: afbd4c5c-ea17-4334-92f7-5cf5c61760ad

📥 Commits

Reviewing files that changed from the base of the PR and between 229bf7c and a924644.

📒 Files selected for processing (14)
  • .github/workflows/agent.yml
  • .github/workflows/ci-self-test.yml
  • .github/workflows/ci.yml
  • .github/workflows/dependencies.yml
  • .github/workflows/docs.yml
  • .github/workflows/issue-ops.yml
  • .github/workflows/on-main-bump-sha.yml
  • .github/workflows/on-maintenance.yml
  • .github/workflows/pull-request.yml
  • .github/workflows/release.yml
  • .github/workflows/reusable-ci.yml
  • .github/workflows/reusable-pr.yml
  • .github/workflows/reusable-self-test.yml
  • .github/workflows/test.yml
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/sync-workflow-shas

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@YiWang24 YiWang24 merged commit f6d93cb into main May 26, 2026
10 of 16 checks passed
@YiWang24 YiWang24 deleted the fix/sync-workflow-shas branch May 26, 2026 03:03
@sonarqubecloud

Copy link
Copy Markdown

@openbot-dev openbot-dev Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SHA bump introduces corrupted text in test.yml due to overly aggressive find-and-replace in bump-self-sha.sh

Repo-wide notes:

  • highscripts/bump-self-sha.sh: The global sed/perl replacement s|\Q${old_sha}\E|${new_sha}|g matches the SHA anywhere in the file, including inside comments and prose text. It should be scoped to only replace SHAs that appear in valid contexts (e.g., after '@' in uses: lines, or as a value in manifest.yml). This caused the corruption in test.yml and will recur on future bumps.

@@ -1,12 +1,12 @@
# test.yml — Self-bootstrapping comprehensive test suite for OpenCI.
# test.yml — Self-34a93579aac0d1682cc65ab8b7c2c9e2d06b0953ping comprehensive test suite for OpenCI.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high — The old SHA (9b40a02...) was blindly replaced with the new SHA inside comments/descriptions, turning 'self-bootstrapping' into 'self-34a93579aac0d1682cc65ab8b7c2c9e2d06b0953ping'. This is a correctness bug — the word 'bootstrapping' was corrupted because the old SHA appeared as a substring of 'bootstrapping' (starting with '9b40a02').

self-34a93579aac0d1682cc65ab8b7c2c9e2d06b0953ping comprehensive test suite

# part of the triggering merge. The guard condition prevents
# infinite loops when this merge triggers the workflow again.
# Uses direct squash-merge because auto-merge (--auto) requires
# branch protection rules on main, which aren't configured.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium — The merge strategy changed from --auto (queue for merge after checks) to an immediate --squash merge. While the comments explain the rationale (no branch protection rules), this removes the safety net of required status checks — the bump PR is merged immediately without waiting for CI to pass on the PR itself.

gh pr merge "${pr_number}" --squash --delete-branch \

@@ -1,12 +1,12 @@
# test.yml — Self-bootstrapping comprehensive test suite for OpenCI.
# test.yml — Self-34a93579aac0d1682cc65ab8b7c2c9e2d06b0953ping comprehensive test suite for OpenCI.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 SHA regex accidentally clobbered "bootstrap" text

The SHA bump script replaced the word bootstrap with the new SHA (34a93579...) in four places in this file — lines 1, 9, 30, and 260. This leaves the file comment (Self-34a93579...ping), a workflow_dispatch input description, and the step name Run self-34a93579...ping E2E test all corrupted. The step name and description are user-visible in the GitHub Actions UI when triggering or inspecting the workflow. Looking at scripts/bump-self-sha.sh, the replacement uses perl -pi -e "s|\Q${old_sha}\E|${new_sha}|g" which is a literal match, so this points to old_sha being read as bootstra (8 chars) from manifest.yml rather than the intended hex SHA — causing bootstrapping<SHA>pping. All four corrupted strings need to be restored to bootstrapping.

Comment on lines 219 to +222
if [ -n "${pr_number}" ]; then
gh pr merge "${pr_number}" --auto --squash \
gh pr merge "${pr_number}" --squash --delete-branch \
--subject "chore(manifest): bump YiAgent/OpenCI SHA to ${short_new} (#${pr_number})" \
|| echo "::warning::Auto-merge not enabledrepo may lack 'Allow auto-merge' setting."
|| echo "::warning::Failed to auto-merge PR #${pr_number}manual merge required."

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Direct merge bypasses CI checks on the bump PR

Switching from gh pr merge --auto to gh pr merge --squash --delete-branch merges the bump PR immediately, before any CI checks triggered by the PR (e.g., pull-request.yml) have a chance to run or pass. If the bump PR ever contains an unintended change (e.g., a test.yml with corrupted text like in this very PR), it gets squashed directly into main with no gating. The --auto path at least waited for required checks. If branch protection rules can't be enabled, a sleep-and-poll approach, or a separate check-pr-status step that waits for checks to finish before merging, would preserve the safety net.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant