Repository navigation
Conversation
Feature branches no longer run CI. Jobs triggered by pull_request(_target) run only when the head branch is `trunk`; push triggers are limited to main (release/env/tag pushes unchanged). trunk-guard.yml flags any PR into main that does not come from `trunk`.
|
Note Currently processing new changes in this PR. This may take a few minutes, please wait... ⚙️ Run configuration
📒 Files selected for processing (3)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
| ((github.event_name != 'pull_request' && github.event_name != 'pull_request_target') || github.head_ref == 'trunk') && | ||
| (github.event.pull_request.merged == true) |
There was a problem hiding this comment.
🟡 Merged PR trajectories remain uncompacted
When a non-trunk PR merges into main, compact skips its trajectory compaction. Merged PRs outside trunk leave no compacted summary.
Learn more
This workflow runs when a PR targeting main closes. Its original merge condition compacted trajectories for every merged PR, independently of the CI workflow. The new head-branch condition skips merged PRs from other branches, so their summaries are never generated by this job. loadTrajectories only processes trajectories when the compact command runs.
Example: A hotfix PR from fix/crash merges into main. The close event reports merged: true, but the branch gate skips compact, leaving the hotfix trajectories without a summary.
Recommended fix: Restore the merged-only job condition. If compaction is also required for feature PRs merged into trunk, add a separate trunk close trigger and handle that target explicitly.
| ((github.event_name != 'pull_request' && github.event_name != 'pull_request_target') || github.head_ref == 'trunk') && | |
| (github.event.pull_request.merged == true) | |
| if: github.event.pull_request.merged == true |
Was this helpful? React with 👍 or 👎 to provide feedback.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 6a3e425. Configure here.
| if: always() | ||
| if: >- | ||
| ((github.event_name != 'pull_request' && github.event_name != 'pull_request_target') || github.head_ref == 'trunk') && | ||
| (always()) |
There was a problem hiding this comment.
Skipped CI success passes required checks
Medium Severity
The ci-success aggregator, used for branch protection, now skips on non-trunk PRs. GitHub treats a skipped required check as passing, so existing required checks no longer block mis-targeted PRs. trunk-guard fails under a new check name that current protection rules would not require.
Reviewed by Cursor Bugbot for commit 6a3e425. Configure here.
| # `trunk` (via the merge train); CI runs only on the trunk -> main PR. | ||
| on: | ||
| pull_request: | ||
| branches: [main] |
There was a problem hiding this comment.
Trunk guard ignores base branch edits
Low Severity
trunk-guard.yml uses default pull_request types, which omit edited. Changing a PR base to main does not start a new run, so a retargeted feature PR can point at main without the failing guard check.
Reviewed by Cursor Bugbot for commit 6a3e425. Configure here.


Org-wide CI reduction: CI runs only on the
trunk→mainPR and on pushes tomain. Feature branches merge intotrunkand get no CI. Addstrunk-guard.ymlto flag PRs intomainthat don't come fromtrunk. Generated mechanically (jobif:gates + push branch filters); actionlint shows no new findings.🤖 Generated with Claude Code
Note
Medium Risk
Org-wide change to when automated tests and lint run; feature branches no longer get CI on PRs, so quality depends on the trunk merge train and correct branch targeting.
Overview
Restricts GitHub Actions so lint, typecheck, test, build, and the CI Success aggregator run only on pushes to
mainand on pull requests whose head branch istrunk(not on feature-branch PRs intomain).The compact-on-merge job gets the same head-branch gate so trajectory compaction runs only when a
trunk→mainPR is merged.Adds
trunk-guard.yml, which fails any PR targetingmainunless the source branch istrunk, steering feature work to merge intotrunkfirst.Reviewed by Cursor Bugbot for commit 6a3e425. Bugbot is set up for automated code reviews on this repo. Configure here.