Repository navigation
Conversation
- CI gates also require the head repo to be this repository and the base to be main (a fork branch named trunk, or trunk into another branch, no longer runs CI). - Trunk guard runs via pull_request_target (loaded from the base branch, so a PR cannot edit it to pass), re-runs on base edits, and checks head repo. - Workflows that only react to a PR closing are no longer gated.
Contributor
There was a problem hiding this comment.
🔍 Devin Review: 1 flag
Not posted on this PR by your GitHub settings — view it in Devin Review. (Configure)
Relayfile Eval ReviewRun: Passed: 4 | Needs human: 0 | Reviewable: 0 | Missing output: 0 | Failed: 0 | Skipped: 0 Human Review CasesNo reviewable human-review cases captured Relayfile output. |
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.
Hardens the trunk-only CI gating per review on AgentWorkforce/relay#1932: head repo + base branch checks in every gate; guard via
pull_request_targetwithedited; closed-only workflows ungated.🤖 Generated with Claude Code
Note
Medium Risk
Changes merge policy enforcement and when CI runs on PRs; misconfigured conditions could block legitimate trunk→main merges or skip required checks on forks.
Overview
Tightens trunk-only CI so heavy jobs run on pull requests only when the head branch is this repo’s
trunk, the PR targetsmain, and the head ref is not from a fork. The sameifexpression is applied across CI, Contract, and Relayfile Evals jobs (replacing a head-ref-onlytrunkcheck).Hardens the trunk guard by switching from
pull_requesttopull_request_target(withopened,synchronize,reopened,edited), setting empty workflow permissions, and failing when the head branch is nottrunkor the PR head repo is not the upstream repository. The guard workflow is documented as using base-branch workflow definitions and not checking out PR code.Reviewed by Cursor Bugbot for commit ef5ecfc. Bugbot is set up for automated code reviews on this repo. Configure here.