ci(e2e): always report status on PRs, short-circuit for irrelevant paths - #2398
Conversation
Remove `paths:` filter from `pull_request_target` so the e2e workflow triggers on all PRs. Add a "Check for e2e-relevant changes" step that queries the PR's changed files via the API and short-circuits when no e2e-relevant paths are touched. This ensures the `e2e` required check always reports a status, unblocking docs-only and config-only PRs from the merge queue. This restores the approach from #1988 which was inadvertently lost when the e2e workflow was refactored to use pull_request_target with a gate/e2e job split. Fixes #1989 Assisted-by: Claude claude-opus-4-6 <noreply@anthropic.com> Signed-off-by: Ralph Bean <rbean@redhat.com>
|
🤖 Finished Review · ✅ Success · Started 9:07 PM UTC · Completed 9:19 PM UTC |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
ReviewFindingsMedium
Low
Info
Previous runReviewFindingsMedium
Low
Info
|
waynesun09
left a comment
There was a problem hiding this comment.
Review Squad — 4 findings (MEDIUM+)
Agents: 5 (Claude x3, Gemini, Codex) · Models: Claude, Gemini, Codex
Two findings below are inline on the changed lines. Two more reference unchanged code (not suitable for inline):
MEDIUM — Regex pattern divergence risk with push.paths filter
Lines: push.paths (L12-24) vs grep regex (L92)
The push.paths glob list and the grep -qE regex encode the same path set in two syntaxes. They must stay synchronized manually — adding a path to one but not the other causes silent divergence.
Suggestion: Add sync comments above both locations:
# SYNC-WITH: grep regex in "Check for e2e-relevant changes" step
paths:# SYNC-WITH: push.paths filter above
if echo "$FILES" | grep -qE '...'; thenFlagged by 1/5 agents
MEDIUM — Gate job runs on all PRs including docs-only
Lines: gate job (L45-78, unchanged)
Removing paths: from pull_request_target means the gate job now runs checkout + authorization (~1-2 min) for every PR, including docs-only PRs that will short-circuit in the e2e job.
Suggestion: Acceptable trade-off for the initial fix. Can optimize in a follow-up by moving the path-relevance check into gate and propagating a relevant output.
Flagged by 3/5 agents
Assisted-by: Claude (review x3), Gemini (review), Codex (review)
| REPO: ${{ github.repository }} | ||
| run: | | ||
| FILES=$(gh api "repos/${REPO}/pulls/${PR_NUMBER}/files" --paginate --jq '.[].filename') | ||
| if echo "$FILES" | grep -qE '\.go$|^go\.(mod|sum)$|^e2e/|^internal/scaffold/fullsend-repo/|^internal/security/hooks/|^internal/dispatch/gcf/mintsrc/|^internal/sentencetoken/english\.json$|^Makefile$|\.github/workflows/e2e\.yml$|\.github/actions/check-e2e-authorization/|^scripts/check-e2e-authorization\.sh$'; then |
There was a problem hiding this comment.
HIGH — Missing ^ anchor on .github/ regex patterns
Two patterns lack start anchors: \.github/workflows/e2e\.yml$ and \.github/actions/check-e2e-authorization/. All other exact-match patterns are correctly anchored (^go\.(mod|sum)$, ^Makefile$, etc.).
The original paths: globs were implicitly root-anchored by GitHub — the regex should match. A path like vendor/.github/workflows/e2e.yml would incorrectly trigger a full e2e run.
Suggestion:
^\.github/workflows/e2e\.yml$|^\.github/actions/check-e2e-authorization/Flagged by 4/5 agents (strong consensus)
| PR_NUMBER: ${{ github.event.pull_request.number }} | ||
| REPO: ${{ github.repository }} | ||
| run: | | ||
| FILES=$(gh api "repos/${REPO}/pulls/${PR_NUMBER}/files" --paginate --jq '.[].filename') |
There was a problem hiding this comment.
MEDIUM — No error handling if gh api fails
If the API is unavailable, rate-limited, or errors, $FILES is empty → grep doesn't match → relevant=false is set — silently skipping e2e tests on a PR that may need them.
Suggestion: Default to running tests on API failure:
FILES=$(gh api "repos/${REPO}/pulls/${PR_NUMBER}/files" --paginate --jq '.[].filename') || {
echo "::warning::Failed to fetch PR files — running e2e tests as a precaution"
echo "relevant=true" >> "$GITHUB_OUTPUT"
exit 0
}Flagged by 3/5 agents (consensus)
- Anchor .github/ regex patterns with ^ to match only repo-root paths - Default to running e2e tests when gh api call fails (fail-open) - Add SYNC-WITH comments linking push.paths and grep regex Assisted-by: Claude claude-opus-4-6 <noreply@anthropic.com> Signed-off-by: Ralph Bean <rbean@redhat.com>
Site previewPreview: https://657bcdf5-site.fullsend-ai.workers.dev Commit: |
waynesun09
left a comment
There was a problem hiding this comment.
All 4 findings from the review squad addressed. LGTM.
Assisted-by: Claude (review x3), Gemini (review), Codex (review)
|
🤖 Finished Review · ✅ Success · Started 9:31 PM UTC · Completed 9:42 PM UTC |
|
🤖 Finished Retro · ✅ Success · Started 12:06 AM UTC · Completed 12:14 AM UTC |
Retro: PR #2398 — ci(e2e): always report status on PRs, short-circuit for irrelevant pathsWorkflow went well. This was a clean, efficient cycle: human-authored CI fix → review agent + review squad caught real issues (missing regex anchor, missing error handling) → author fixed in one iteration → merged within ~3 hours. Timeline
Observations
ProposalsNo new proposals filed — the two improvement areas identified are already covered by existing open issues (#1144, #1552). The workflow performed well overall with a single rework iteration and meaningful review findings. |
Summary
paths:filter frompull_request_targetso the e2e workflow triggers on all PRse2estatus instead of no status at allThis restores the approach from #1988 which was lost when the e2e workflow was refactored to use
pull_request_targetwith a gate/e2e job split. Without this fix, any PR that doesn't touch Go files is blocked from the merge queue becausee2eis a required check that never starts.Fixes #1989
Test plan
e2ereports a passing status with the "No e2e-relevant files changed" noticee2eruns the full test suite as before🤖 Generated with Claude Code