Skip to content

feat(runner): a required check a PR's paths filter out passes as skipped (E9) - #379

Merged
PastaPastaPasta merged 3 commits into
masterfrom
feat/e9-path-filtered-checks
Oct 4, 2026
Merged

PastaPastaPasta merged 3 commits into
masterfrom
feat/e9-path-filtered-checks

Conversation

@PastaPastaPasta

@PastaPastaPasta PastaPastaPasta commented Oct 4, 2026 •

Copy link
Copy Markdown
Owner

What

A required check whose workflow a pull request's paths filter leaves out no longer blocks the merge forever. forge-runner now reports it as skipped, which counts as passed, with the reason.

Why

forge-runner honours paths / paths-ignore by not running the workflow, so it posted no check run at all. If the branch policy required one of that workflow's checks, every PR that didn't touch those paths could never meet the policy. This is GitHub's "Expected — waiting for status" trap.

How

  • workflow::plan keeps a third list, path_filtered: the workflows that would run on this pull request but for their path filters (Facts::filtered_by_paths, which re-judges on.pull_request with the changes unknown).
  • run reads the required check names (dg repo policy show) only when that list is non-empty, before any workflow runs. For each filtered job whose check name the policy requires, it posts one completed skipped run on the head: "Skipped: PR Publish the browse index on ordinary pushes #4 changes no file this workflow's paths filters select." A job the runner refuses is reported as the failure it would be anywhere, not as skipped.
  • Checks the policy doesn't require get nothing, because each report is a paid write. The exception is a policy that requires every check: when nothing else reports on the PR, every filtered check is reported. A name that a workflow which does run also reports is never skipped. If the policy can't be read, every filtered check is reported, so a required one is never left waiting.
  • A report that fails twice fails the run, and the next poll tries again.
  • Pull requests only. A push's changed paths are only that push's own commits, so a skip there could pass a required check on a head whose earlier commits it never ran on.
  • A re-run of a skipped check (dg ci rerun) is judged again and reports just that check.
  • Docs: docs/guides/self-host-runner.md.

How tested

  • cargo fmt, clippy -D warnings and cargo test -p forge-runner, with new unit tests for filtered_by_paths (paths, paths-ignore, unknown changes, another base, push never skipped), plan, keep_check and the policy reader.
  • crates/forge-runner/tests/e2e-local.sh gets section 12, run locally with act and Docker:
    • A PR that changes only docs/ gets exactly one report, paths / req (pull_request) completed/skipped on its head with the reason. The workflow's other, unrequired job gets none.
    • With the policy unreadable, both jobs are reported.
    • The whole script passes on the final head.
  • Reviewed with the code-review skill. Fixed in the second commit: the require-every-check policy, names a running workflow also reports, refused jobs, a failed skip report, and re-runs.
  • Evidence: /Users/pasta/workspace/dash-forge-qa/evidence/p0/merge-power/e9-runner-e2e-local-2.txt (final head). The first run, e9-runner-e2e-local.txt, failed once on section 7's v4 artifact upload through Docker Desktop, which this change doesn't touch.

Limits

  • A required check that comes from a push-only workflow with path filters still waits, for the reason above. Use pull_request for required checks.
  • A required check pinned to another runner's identity still gets this runner's skip, which can't count. That costs one write and changes nothing.

🤖 Generated with Claude Code

…ut as skipped

A workflow whose paths / paths-ignore select no file of a PR never ran, so a branch policy that required one of its checks blocked the merge forever. The runner now reports each such required check as completed skipped (which counts as passed), with the reason, and nothing for checks the policy does not require. Pushes are never skipped this way: a push's changes are only its own commits. If the policy can't be read, every filtered check is reported.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@coderabbitai

coderabbitai Bot commented Oct 4, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 59 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: cb19973d-ac90-43b8-b63f-661fb4c76653
📥 Commits

Reviewing files that changed from the base of the PR and between e5ba904 and 91c89ef.

📒 Files selected for processing (4)
  • crates/forge-runner/src/run.rs
  • crates/forge-runner/src/workflow.rs
  • crates/forge-runner/tests/e2e-local.sh
  • docs/guides/self-host-runner.md
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

PastaPastaPasta and others added 2 commits October 4, 2026 14:06
… a failed skip

Path-filtered checks are reported before any workflow runs, never when a workflow that runs reports the same name, and a report that fails twice fails the run so the next poll tries again. A refused job is reported as the failure it would be anywhere. A policy that requires every check gets every filtered one when nothing else reports on the PR, and a re-run reports just the check it asked for.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@PastaPastaPasta
PastaPastaPasta merged commit cfb9b29 into master Oct 4, 2026
29 checks passed
@PastaPastaPasta
PastaPastaPasta deleted the feat/e9-path-filtered-checks branch October 4, 2026 22:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant