fix(ci): support external and Dependabot PR service test workflows#578
fix(ci): support external and Dependabot PR service test workflows#578vishal-bala wants to merge 5 commits into
Conversation
🛡️ Jit Security Scan Results✅ No security findings were detected in this PR
Security scan by Jit
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: fa184c3103
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 3a968fb. Configure here.
# Conflicts: # .github/workflows/lint.yml

Motivation
This PR updates the CI flow for external pull requests and Dependabot pull requests while tightening the trust boundary around any secret-bearing execution.
The original goal was to support maintainers running service tests against fork PRs and same-repo Dependabot PRs without breaking regular PR coverage. Review feedback exposed a few places where that policy was still too loose or too brittle, especially around skipped jobs, secret-backed notebook paths, and how the manual external-PR workflow resolved and executed code. This final version hardens those paths so the normal test workflow stays predictable and the manual external-PR workflow is pinned to an explicitly reviewed commit.
Changes
.github/workflows/test.ymlso lint is folded into the main test workflow while preserving the historicalStyle-checkstatus names.service-testsskipped for Dependabot PRs in the regular workflow, and also exclude Dependabot from the secret-backed Google auth and notebook steps.test.ymlso newer PR pushes cancel older in-flight runs instead of multiplying the full matrix..github/workflows/test-fork-pr.ymlto support fork PRs and same-repodependabot[bot]PRs, but require bothpr_numberand anexpected_head_shainput and fail if the live PR head has changed.dependabot/*branches whose changes are limited to dependency manifest and lockfile paths.always()finalizer that completes the custom check for success, failure, or cancellation.Note for Reviewers
The main policy choice in this branch is still that the regular
testmatrix is no longer gated behindservice-tests; both now depend on lint. That preserves regular test coverage for Dependabot PRs and avoids reintroducing skip-cascade logic, but it does trade some fast-fail behavior for simpler workflow semantics.For the manual external-PR path, the remaining trust model is intentional: a maintainer may explicitly dispatch the workflow against a reviewed PR commit, and the workflow will then run the checked-out PR code with repository secrets. The hardening in this PR is aimed at ensuring that this happens only after trusted pre-checkout validation, against the exact commit the maintainer intended to run, and with the privileged orchestration sourced from trusted workflow content.
Note
Medium Risk
Changes modify CI execution paths that can run untrusted PR code with repository secrets (manual external-PR workflow) and adjust gating/concurrency in the main test workflow, so misconfiguration could impact security or test coverage.
Overview
Consolidates linting into the main
test.ymlworkflow (removing the standalonelint.yml), adds PR-scoped concurrency cancellation, and makesservice-tests/secret-backed notebook+GCP steps skip Dependabot PRs while keeping the main test matrix running.Reworks the manual external PR workflow to validate
pr_number+ pinnedexpected_head_sha, support same-repo Dependabot PRs with strict file/branch allowlisting, add per-PR concurrency/timeout, and run tests via trusted inline steps (with a singlealways()check-run finalizer) instead of invoking a PR-controlled local action.Bumps the editable package version in
uv.lockfrom0.17.1to0.18.0.Reviewed by Cursor Bugbot for commit 2b393a3. Bugbot is set up for automated code reviews on this repo. Configure here.