Repository navigation
fix(pr-pipeline): stop check-trusted-trigger on a PR whose base is not the default branch - #9019
Conversation
…t the default branch Lanes read the trusted-actor list and scripts from the default branch, so only it is a trusted base. A listed author's PR stacked on another branch passed the gate. It now stops with untrusted-base on pull_request, workflow_dispatch and workflow_run, as does a payload without repository.default_branch. The reason has no skip mapping, so report-check-run posts failure, not neutral. Closes #8979 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
claude-security-review reviewed No security findings in PR #9019 at head 53063be. Scope: The PR adds an Logic:
Failure vs neutral:
Manifests: No plugin manifests changed, so no Instruction surfaces: No standing instruction was deleted or softened. The changes to Actions hardening: No workflow triggers, permissions or pins changed. |
|
claude-review reviewed No findings. I read the full diff, the PR context and the surrounding Closing issue #8979
Checks that came out clean
Manifest items: the diff touches no Paved paths, path-scoped rules: nothing flagged. |
Closes #8979
Summary
check-trusted-triggerreturnedproceed: truefor a pull request without checking its base branch. Lanes read the trusted-actor list and their scripts from the default branch, so only the default branch is a trusted base, and a listed author's PR stacked on another branch passed the gate.Fix
evaluateTriggernow stops with a new reason,untrusted-base, when the PR'sbase.refis not the event payload'srepository.default_branch. It also stops when the payload has no default branch or the value fails the branch-name pattern. The check runs once, after the PR is resolved, so it coverspull_request,workflow_dispatch(fetched PR) andworkflow_run(PR looked up from the run's head SHA) with no extra API call. It runs before the actor checks, so a stacked PR from an unlisted actor also getsuntrusted-base.untrusted-baseis not inreport-check-run/gate-skip-reasons.json, so the check posts failure, not neutral.decide.test.mjsgets a case that pins this.require-pr: falsepath (push,workflow_dispatchandissueswithout a PR) has no PR base, so the check does not apply there.repository.default_branch, as real payloads do. Two existing tests that removed the default branch now expectuntrusted-base, which the new check returns before the dispatcher and reconciler checks run.action.ymlanddocs/conventions/pr-pipeline/pr-run-activity.mdlist the new reason, and a pr-pipeline changelog fragment records the fix.Verification
pull_request, missing default branch,workflow_dispatchandworkflow_runwith a non-default base). The matching-base test (default branchtrunk, basetrunk) passed.node --testin.github/actions/check-trusted-trigger: 303 passed, 0 failed.node --testin.github/actions/report-check-run: 100 passed.resolve-config/callers.test.mjs: 86 passed.check-signed-commits: 33 passed.check-affectedhook passed after mergingorigin/main.Related
🤖 Generated with Claude Code