Skip to content

Adopt the hub's reusable workflow chain and WORKFLOW.md contract - #326

Merged
ptr727 merged 4 commits into
developfrom
feature/hub-workflow-chain
Oct 22, 2026
Merged

ptr727 merged 4 commits into
developfrom
feature/hub-workflow-chain

Conversation

@ptr727

@ptr727 ptr727 commented Oct 22, 2026

Copy link
Copy Markdown
Owner

Summary

Implements #319: this repository now reaches the hub's reusable workflow chain instead of carrying its own copies, and its WORKFLOW.md is the hub's current contract.

  • Caller stubs, pinned to hub release 2.0.1122. test-pull-request.yml calls validate-task.yml and, with smoke: true, build-release-task.yml. publish-release.yml gains the validate job the interface contract requires, gates publish on needs.validate.result == 'success', takes the ref-scoped concurrency group with the hub stub's push suffix, and publishes the Docker Hub overview through publish-docker-readme-task.yml. merge-bot-pull-request.yml is the hub stub with delete-branch: true. check-upstream-version.yml calls check-upstream-version-task.yml.
  • Hooks for this repository's own behavior, under .github/actions/:
    • docker-prepare reads upstream-version.json, passes ESPHOME_VERSION and DEVICE_BUILDER_VERSION, and adds the :<esphome version> tag on a main build. The hub core adds LABEL_VERSION from NBGV.
    • validate is the firmware compile test, unchanged in what it compiles, and it builds from the docker-prepare entry so it cannot drift from the published build. It always compiles on a publisher run. On push CI it keeps the old change gate (Docker/, .github/compile-test/, upstream-version.json, feature branches diffed against their merge-base with develop) and adds the hooks and the two stubs carrying the hub pin, so a hub release bump is compile-tested before it auto-merges.
    • resolve-upstream is the tracker's PyPI lookup, replacing the removed resolver-command input.
  • Deleted the six hub-hosted task copies and repo-config/, which the hub now hosts.
  • WORKFLOW.md is the hub contract (sections 1 to 6) plus a section 7 holding this repository's pipeline and its own guarantees, renumbered from D10: Docker Hub authentication (was D4.7), the upstream pins (new), the compile test (was D11), and the upstream-dependency watcher (was D8.4). The stale "push CI leaves it off" paragraph is corrected.
  • References swept in README.md, OPERATIONS.md, the repo-local AGENTS.md intro, and GOVERNANCE.md "Repository Layout". Dependabot's github-actions entries now also scan .github/actions/*.
  • Docker/entrypoint/: the hub lint block runs shellcheck and shfmt over *.sh, which this repository's own lint did not, so the sourced paths are quoted and a trailing blank line removed. No behavior change.

Behavior changes worth knowing

  • The compile test runs without a Docker Hub login, since a composite hook cannot read secrets. It pulls the public base image and reads the public buildcache anonymously.
  • Smoke builds and CI stay push-triggered with no paths filter, as before. WORKFLOW.md section 7 records both as deliberate choices against the hub's D1.1 and D1.4.
  • check-upstream-dependency.yml stays a repository-owned workflow. The hub task runs one resolve-upstream hook path, which the version tracker already uses, and accepts only string values, so the watcher cannot be a second caller without a workaround.

Verification

  • python3 scripts/docker_lint.py --root <worktree> (all six linters) and the hub's repo_gate.py pass locally.
  • The compile-test decide step was exercised against a scratch clone for the feature-branch, publisher, dispatch, new-branch, unchanged-diff, pin-change, and missing-base cases.
  • python3 spec/audit.py --branch feature/hub-workflow-chain ESPHome-NonRoot (run 2026-10-22T00:13:49Z, hub fb7f02b2) reports no hub-only:, interface:, or concurrency: finding. What remains is outside this change: a stale DOCKER_HUB_PASSWORD Dependabot secret, date-based intent hints on .editorconfig-checker.json, cspell.json, and version.json, and the Docker Hub short description missing its final period.
  • A local strict review ran two rounds. Round 1 raised eight findings, seven fixed in 0da7641 and one, the hub ruleset payload's Copilot review settings, left to the maintainer as hub policy. Round 2 found nothing new.

Part of #319, which closes once a real publish succeeds after promotion.

🤖 Generated with Claude Code

ptr727 and others added 3 commits October 21, 2026 17:00
Replace the carried build, version, plan, validate, and upstream-version
task copies with caller stubs pinned to hub release 2.0.1122, and move
this repo's own behavior into composite-action hooks: docker-prepare for
the upstream pins and the ESPHome version tag, validate for the firmware
compile test and its change gate, and resolve-upstream for the PyPI
lookup. The publisher gains the validate job and the ref-scoped
concurrency group, the merge-bot becomes the hub stub with
delete-branch, and Docker Hub README publishing moves to the hub task.

Delete repo-config/, which the hub now hosts, sync WORKFLOW.md to the
hub contract with this repo's own guarantees in a section 7 numbered
from D10, sweep references to the removed files, extend Dependabot to
the hooks, and quote the sourced paths in the entrypoint so the hub
lint block's shellcheck and shfmt pass.

Closes #319

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…he hub pin

The validate hook now reads its context, Dockerfile, cache repository,
and build-args from the docker-prepare hook, so the compile test cannot
drift from the published build. A hub pin bump in either stub now runs
the compile test before it auto-merges. Correct the docs on new-branch
gating, tracker pin convergence, the repo-gate command, and the prose
gate a push-only CI never runs.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Copilot AI lite review requested due to automatic review settings October 22, 2026 00:14
@ptr727 ptr727 added the comments Permits the comment lines the pull request adds or edits, which the prose gate otherwise refuses label Oct 22, 2026
@ptr727

ptr727 commented Oct 22, 2026

Copy link
Copy Markdown
Owner Author

A recorded local strict-review pass covers head 0da7641d77056f20a4eed198c7b18933d15a33da, the content this pull request carries at that commit against develop, and it recorded 0 findings.

@coderabbitai

coderabbitai Bot commented Oct 22, 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 36 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: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: a088e4d6-1077-4810-be55-806cef8378e6
📥 Commits

Reviewing files that changed from the base of the PR and between c202ac6 and 211b835.

📒 Files selected for processing: 26
  • .github/actions/docker-prepare/action.yml
  • .github/actions/resolve-upstream/action.yml
  • .github/actions/validate/action.yml
  • .github/dependabot.yml
  • .github/workflows/build-docker-task.yml
  • .github/workflows/build-release-task.yml
  • .github/workflows/check-upstream-version-task.yml
  • .github/workflows/check-upstream-version.yml
  • .github/workflows/get-version-task.yml
  • .github/workflows/merge-bot-pull-request.yml
  • .github/workflows/publish-plan-task.yml
  • .github/workflows/publish-release.yml
  • .github/workflows/test-pull-request.yml
  • .github/workflows/validate-task.yml
  • AGENTS.md
  • Docker/entrypoint/cache.sh
  • Docker/entrypoint/entrypoint.sh
  • GOVERNANCE.md
  • OPERATIONS.md
  • README.md
  • WORKFLOW.md
  • repo-config/README.md
  • repo-config/configure.sh
  • repo-config/ruleset-develop.json
  • repo-config/ruleset-main.json
  • repo-config/settings.json
  • 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 entrypoint lacks the required shell safety header, and the operations runbook still references tooling paths removed by this migration.

1 open issue
What changed in this PR

This pull request migrates the repository to the hub’s pinned reusable workflow chain while retaining repository-specific Docker preparation, firmware validation, and upstream-version hooks.

Changes:

  • Replaces locally hosted workflow tasks and repository configuration with hub caller stubs.
  • Adds docker-prepare, validate, and resolve-upstream composite hooks.
  • Updates workflow contracts, operational documentation, repository references, Dependabot coverage, and Docker entrypoint formatting.
  • Removes the retired repo-config/ files.

Review comments identify a missing required set -Eeuo pipefail header in Docker/entrypoint/entrypoint.sh ([P1], moderate) and outdated hub-tooling paths in OPERATIONS.md ([P2], nit).

File Description
WORKFLOW.md Adopts the hub workflow contract and documents repository-specific pipeline guarantees.
repo-config/​settings.json Deleted; repository settings are now hub-hosted.
repo-config/​ruleset-main.json Deleted; the main ruleset is now hub-hosted.
repo-config/​ruleset-develop.json Deleted; the develop ruleset is now hub-hosted.
repo-config/​README.md Deleted with the retired repository-configuration surface.
repo-config/​configure.sh Deleted; configuration management is now hub-hosted.
README.md Updates pipeline references to the Docker preparation hook.
OPERATIONS.md Updates local verification and workflow-operation guidance.
GOVERNANCE.md Updates the repository layout for hub tasks and local hooks.
Docker/​entrypoint/​entrypoint.sh Quotes sourced paths and documents ShellCheck rationale.
Docker/​entrypoint/​cache.sh Removes a trailing blank line.
AGENTS.md Documents the hub workflow chain and local hooks.
.github/​workflows/​validate-task.yml Deleted in favor of the hub validator.
.github/​workflows/​test-pull-request.yml Converts CI into a pinned hub-task caller with the required aggregator.
.github/​workflows/​publish-release.yml Converts publishing into pinned plan, validation, release, and Docker Hub overview callers.
.github/​workflows/​publish-plan-task.yml Deleted in favor of the hub release-plan task.
.github/​workflows/​merge-bot-pull-request.yml Converts merge automation into a pinned hub-task caller with branch deletion enabled.
.github/​workflows/​get-version-task.yml Deleted in favor of the hub version task.
.github/​workflows/​check-upstream-version.yml Converts upstream tracking into a pinned hub-task caller.
.github/​workflows/​check-upstream-version-task.yml Deleted in favor of the hub upstream-version task.
.github/​workflows/​build-release-task.yml Deleted in favor of the hub release task.
.github/​workflows/​build-docker-task.yml Deleted in favor of the hub Docker task.
.github/​dependabot.yml Adds composite-action directories to GitHub Actions dependency scanning.
.github/​actions/​validate/​action.yml Adds the repository-specific firmware compile validation hook.
.github/​actions/​resolve-upstream/​action.yml Adds the PyPI upstream-version resolver hook.
.github/​actions/​docker-prepare/​action.yml Adds pinned upstream build arguments and Docker tag preparation.

Review effort: Lite

Comment thread OPERATIONS.md Resolved
@ptr727

ptr727 commented Oct 22, 2026

Copy link
Copy Markdown
Owner Author

A recorded local strict-review pass covers head 211b83577e0efccde2221116329a521bdc327298, the content this pull request carries at that commit against develop, and it recorded 0 findings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comments Permits the comment lines the pull request adds or edits, which the prose gate otherwise refuses

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants