Skip to content

Promote: run CI on pull requests with the hub's paths filter - #333

Merged
ptr727 merged 1 commit into
mainfrom
develop
Oct 22, 2026
Merged

ptr727 merged 1 commit into
mainfrom
develop

Conversation

@ptr727

@ptr727 ptr727 commented Oct 22, 2026 •

Copy link
Copy Markdown
Owner

Summary

Promotes #332 from develop to main.

  • test-pull-request.yml runs on pull_request into main or develop plus workflow_dispatch, in the hub smoke stub's shape, with a changes paths filter gating the smoke build. The hub's prose gate now runs on every pull request.
  • The validate hook's compile gate diffs the test merge commit against its first parent with --no-renames.
  • WORKFLOW.md section 7 drops the push-only S2/S3 deviation, and OPERATIONS.md adds the bumped release task to what pull request CI cannot exercise.

This promotion is itself the first pull request into main under the new trigger.

Closes #328

🤖 Generated with Claude Code

Summary by CodeRabbit

  • CI
    • Pull request checks now run for changes targeting main or develop, with manual runs still available.
    • Smoke builds run for manual dispatches and changes to image or compile-related files; workflow-only and documentation-only changes skip them.
    • Compilation checks compare the pull request’s merge commit with its first parent. If fetching the commit fails, compilation runs unconditionally.
  • Documentation
    • Updated workflow and operations guides to reflect pull-request checks, smoke-build behavior, and local validation instructions.

* Run CI on pull requests with the hub's paths filter

Move test-pull-request.yml from push to the hub's pull_request trigger,
and gate the smoke build on a paths filter over the image, so a docs-only
or workflow-only pull request skips it per D1.1 and D1.4. The validate
hook's compile gate now diffs the test merge commit against its first
parent, which keeps a later docs-only push from retiring a compile test.
WORKFLOW.md section 7 drops the push-only deviation record.

Closes #328

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Correct the hub pin bump coverage claim and drop a dead guard

The compile test runs the docker-prepare hook under a bumped validate
task, but the bumped build-release task first calls it at the next
publish, which is the cost D1.4 accepts. The merge-commit guard in the
compile gate checked a shape a pull_request run cannot produce. Split
the long sentences this change wrote.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Name the one bumped task a pin bump exercises before merge

The compile test runs under the bumped validate task only, so the two
remaining "new tasks" claims now say so, and OPERATIONS.md lists the
bumped release task among what pull request CI cannot reach, with the
dispatch that forces the smoke build. The diff fallback after a
successful depth-2 fetch was unreachable and is gone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Count both sides of a rename in the compile gate

git diff detects renames by default and names only the destination, so
moving a compile input out of a gated path skipped the compile test.
Pass --no-renames, and say that only a failed history fetch compiles
unconditionally. The dispatch that forces a smoke build on a hub pin
bump now disables the merge-bot's auto-merge first, and the hook's
header comment gets its verb back.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Dispatch on the merged branch to smoke-build a hub pin bump

The merge-bot auto-merges a Dependabot pin bump and deletes its branch,
so a dispatch on the bump's branch usually comes too late. A dispatch
on the branch it merged into always smoke-builds instead.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Bound the bumped release task's first hook run by the next publish

An image-touching pull request between a hub pin bump and the next
publish, such as the tracker's upstream-version bump, smoke-builds
under the bumped pin first, so the next publish is the upper bound
rather than the first run.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* State only what a workflow-only pin bump skips

The timing bounds for the bumped release task's first run kept
depending on which branch and which pull request came next. Say what
holds regardless: a workflow-only bump's own pull request never runs
the bumped build-release-task.yml, and a dispatch on the branch it
merged into does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Scope the workflow-only pin bump sentence to workflow files

Dependabot's actions-deps group can carry a pin bump inside a composite
action beside the hub pin, which the paths filter marks, so only a bump
touching workflow files alone skips the smoke build.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Name the gated stubs by the tasks they pin

Four stubs carry the hub pin, and the compile gate names the two that
pin the validate and release tasks, so "both hub-pinned stubs" and "the
two stubs carrying the hub pin" miscounted. The smoke build also runs on
every dispatch, which the section 7 workflow bullet now says.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Warn that a dispatch lands on an open pull request's check

A dispatch posts the required check on the branch head without the
prose gate, so it also answers any open pull request headed by that
branch. Name the hub issue tracking it, and list the repo gate in the
docs-only scenario's expected output.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* State the dispatch constraint instead of citing an issue

The prose gate refuses an issue reference in docs, so say what the
dispatch does to an open pull request's check in place of the link.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Correct three claims about the gates each run carries

The pull request leg adds the prose gate and change-gates the compile
test, so it is not identical to the publish gate. A dispatch and a
pull request run share one required check, and the last to finish
decides it. A fork smoke build fails on missing credentials wherever
the paths filter marks the image, not only on image paths.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings October 22, 2026 03:26
@coderabbitai

coderabbitai Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: fb33bc93-3557-419b-9852-cc54588cc7ea
📥 Commits

Reviewing files that changed from the base of the PR and between 54f9694 and f2b5cd5.

📒 Files selected for processing: 5
  • .github/actions/validate/action.yml
  • .github/workflows/publish-release.yml
  • .github/workflows/test-pull-request.yml
  • OPERATIONS.md
  • WORKFLOW.md

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

📝 Walkthrough

The CI workflow now runs on pull requests targeting main or develop, with smoke builds selected by changed paths or manual dispatch. The compile gate compares the pull request merge commit with its first parent. The required status handles skipped smoke builds separately from failed jobs.

Changes: Pull request CI

Layer / File(s) Summary
Pull request trigger and compile gate
.github/workflows/test-pull-request.yml, .github/actions/validate/action.yml, .github/workflows/publish-release.yml, OPERATIONS.md, WORKFLOW.md
The workflow now runs on pull requests to main or develop and filters changes to the listed image-related paths. For pull request runs of this workflow, the validation action fetches the merge commit and compares it with its first parent; a fetch failure compiles unconditionally. The documentation describes the updated trigger and compile gate.
Smoke-build selection and required status
.github/workflows/test-pull-request.yml, OPERATIONS.md, WORKFLOW.md
The smoke build runs on dispatch or when the changes job detects relevant paths. The build task uses the pull request base branch when available. The required status requires successful changes and validation jobs, and accepts a smoke build that succeeds or is skipped. The documentation describes these conditions and dispatch behavior.

Priority: ➖ Normal

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Feature · Severity of issue fixed: Medium

Sequence Diagram(s)

sequenceDiagram
  participant GitHubActions
  participant ChangesJob
  participant ValidateJob
  participant SmokeBuild
  participant StatusJob
  GitHubActions->>ChangesJob: Filter pull request paths
  GitHubActions->>ValidateJob: Run validation
  ChangesJob->>SmokeBuild: Run on dispatch or when release changes are detected
  ChangesJob->>StatusJob: Provide changes result
  ValidateJob->>StatusJob: Provide validation result
  SmokeBuild->>StatusJob: Provide success, skipped, or failure result
Loading

Possibly related issues

  • ProjectTemplate issue 3325: The change updates the validation hook’s event and diff derivation for pull request runs.
  • ProjectTemplate issue 3334: The workflow retains dispatch and a shared required status; the operations documentation notes that dispatch runs can affect the check on open pull requests.
  • ESPHome-NonRoot issue 331: The workflow and compile gate implement the described pull request trigger, path filtering, and compile-gate updates.
Merge Risk: ⚪ Minimal · up to f2b5c

This change moves CI to pull request triggers with a path-filtered smoke build and updates the related docs. No actionable merge-blocking risk remains.

Pre-merge checks: Passed 5
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly summarizes the main change: running CI on pull requests with the hub paths filter.
Linked Issues check Passed Issue #328 requirements are implemented. .github/workflows/test-pull-request.yml uses pull_request for main and develop, retains workflow_dispatch, and applies the target paths filter to the…
Out of Scope Changes check Passed The reviewed changes stay within issue #328. Workflow changes implement the trigger, paths filter, status aggregation, and compile gate. WORKFLOW.md, OPERATIONS.md, and workflow comments document …
Docstring Coverage Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Full details: Linked Issues check

Explanation

Issue #328 requirements are implemented. .github/workflows/test-pull-request.yml uses pull_request for main and develop, retains workflow_dispatch, and applies the target paths filter to the smoke build. The validate job runs for every pull request. .github/actions/validate/action.yml compares the pull request merge commit with its first parent using git diff --no-renames and gates compilation on Docker, compile-test, hook, workflow-stub, and upstream-version.json changes. The reviewed documentation removes the S2/S3 deviation and describes pull-request validation.

Full details: Out of Scope Changes check

Explanation

The reviewed changes stay within issue #328. Workflow changes implement the trigger, paths filter, status aggregation, and compile gate. WORKFLOW.md, OPERATIONS.md, and workflow comments document the changed pull-request behavior and its limits. No unrelated product or runtime changes are shown in the supplied pull-request summary.

Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files. (5 skipped: 5 unsupported.)

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · 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.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The workflow contains unresolved critical and moderate issues affecting required pull-request checks and manual dispatches.

1 open issue
What changed in this PR

This pull request promotes the pull-request CI and documentation changes from develop to main, adding paths-filtered smoke builds and updating compile-gate behavior.

Changes:

  • Runs validation for pull requests targeting main or develop, with manual dispatch support.
  • Gates smoke builds on relevant path changes and updates the required status aggregator.
  • Compares the pull-request merge commit with its first parent for compile validation.
  • Updates workflow and operations documentation for the new CI model and its limitations.
File Reviewed changes and final comments
WORKFLOW.md Documents the pull-request trigger, paths filter, compile gate, and updated scenarios. Nit (1 vote): Narrow the Dependabot credential explanation to pull requests whose changed paths select the smoke build.
OPERATIONS.md Updates local verification guidance and documents pull-request CI limitations, including the bumped release task. No final comments.
.github/​workflows/​test-pull-request.yml Adds pull-request triggers, change detection, conditional smoke builds, and aggregation. Critical (2 votes): Prevent manual dispatch runs from satisfying the required PR check. Moderate (1 vote): Ensure the changes job succeeds on manual dispatches.
.github/​workflows/​publish-release.yml Updates the validation workflow comment for the new pull-request CI model. No final comments.
.github/​actions/​validate/​action.yml Changes compile-gate diffing to inspect the pull-request merge commit against its first parent. No final comments.

Review effort: Lite

Comment thread .github/workflows/test-pull-request.yml Resolved
@ptr727

ptr727 commented Oct 22, 2026

Copy link
Copy Markdown
Owner Author

Outcomes for the two findings Copilot's review body raised without a thread:

  • Ensure the changes job succeeds on manual dispatches (moderate). Not real. A dispatch of test-pull-request.yml on develop at this head, run 39718984164, passed: Detect changed targets job succeeded, the smoke build ran and built the image, the compile test ran ("not a pull request workflow run"), and the aggregator succeeded.
  • Narrow the Dependabot credential explanation in WORKFLOW.md (nit). Real, deferred to Scope D10.1's Dependabot smoke-build reason to filter-marked pull requests #334 so it rides with the next documentation pull request rather than costing its own promotion cycle.

@ptr727
ptr727 merged commit 2073104 into main Oct 22, 2026
38 checks passed
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.

Adopt the hub's pull_request trigger and paths filter for CI

2 participants