fix(ci): address post-merge Bugbot findings (cancel scope, self-test CLI, root-commit diff) - #888
Merged
Merged
Conversation
- react-doctor.yml: only cancel in-progress runs on pull requests, so rapid merges to main no longer cancel each other and every main commit still posts its React Doctor commit status (was cancel-in-progress: true for all events). - react-doctor.yml: build the workspace CLI and point the local action at it (version: ./packages/react-doctor) so the self-test dogfoods the PR's own action AND CLI rather than react-doctor@latest from npm. - action-version-bump.yml: on an all-zero before-SHA, fall back to the git empty tree (not HEAD) for a root commit with no parent, so its files register as changed instead of diffing HEAD against itself. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
commit: |
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.
Why
Follow-up to #885. Cursor Bugbot posted three findings after that PR merged; this addresses all three.
What changed
react-doctor.ymlcancel-in-progressis now gated topull_requestonly —cancel-in-progress: ${{ github.event_name == 'pull_request' }}— matchingci.yml/code-quality.yml/publish-any-commit.yml. Rapid merges tomainno longer cancel each other, so everymaincommit still posts its React Doctor commit status.version: ./packages/react-doctor, so the job runs the PR's own action and CLI instead ofreact-doctor@latestfrom npm. Kept the slim triggers/concurrency from ci: action version-bump guard + faster CI (turbo remote cache, concurrency) #885.action-version-bump.ymlbeforeSHA, the bump job now falls back to the git empty tree (git hash-object -t tree /dev/null) whenHEADhas no parent, instead ofHEAD. Previously a root commit diffedHEADagainst itself (empty) and missed its action-surface changes. Edge case (only withAUTO_BUMP_ACTION_TAGon, on a repo's first commit), but now correct.Before (root commit, all-zero before-SHA):
After:
Test plan
git diff <empty-tree> HEADverified locally to list the commit's files as added.pnpm exec vp fmt --checkpasses on both workflows.react-doctorjob (CI on this PR) exercises the restoreduses: ./+ local build path end to end.Note
Low Risk
Workflow-only changes with no runtime product impact; low blast radius aside from slightly longer React Doctor runs on main.
Overview
Follow-up CI fixes for React Doctor and action version bump workflows.
react-doctor.ymlnow only cancels in-progress runs on pull requests (cancel-in-progress: ${{ github.event_name == 'pull_request' }}), aligned withci.ymland peers, so rapid merges tomainno longer drop commit statuses. The job again installs the workspace, buildsreact-doctor, and runs the local action withversion: ./packages/react-doctorandblocking: none, plus Turbo env, timeout, and checkout hardening.action-version-bump.ymlfixes base-SHA selection whenbeforeis missing or all zeros: ifHEADhas no parent, the diff base is the git empty tree instead ofHEAD, so a root commit’s action-surface files are detected instead of an empty self-diff.Reviewed by Cursor Bugbot for commit ba66b99. Bugbot is set up for automated code reviews on this repo. Configure here.