Skip to content

Adopt canonical upstream-version tracker for multi-key state - #67

Merged
ptr727 merged 4 commits into
developfrom
reconverge-upstream-tracker
Jun 21, 2026
Merged

Adopt canonical upstream-version tracker for multi-key state#67
ptr727 merged 4 commits into
developfrom
reconverge-upstream-tracker

Conversation

@ptr727

@ptr727 ptr727 commented Jun 21, 2026

Copy link
Copy Markdown
Owner

Re-converges the upstream-version tracker onto the canonical template task now that ptr727/ProjectTemplate#169 added structured multi-key state (closing the gap this repo filed in #168), and picks up the follow-up CRLF fix from #172 (closing #170). Tracked here as #66.

Changes

  • Adopt the carried task. Add .github/workflows/check-upstream-version-task.yml (carried from the template; checkout pinned to this repo's v7.0.0) and a thin scheduled entry-point .github/workflows/check-upstream-version.yml whose resolver prints {"esphome":"<pypi>","device_builder":"<pypi>"}. Delete the bespoke check-esphome-version.yml.
  • Restructure the state file. Rename esphome-version.json -> upstream-version.json (repo root, beside version.json), now a sorted JSON object keyed esphome / device_builder - the exact canonical form the task writes.
  • Repoint readers. build-docker-task.yml reads .esphome (image tag + ESPHOME_VERSION) and .device_builder (DEVICE_BUILDER_VERSION); test-pull-request.yml paths-filter watches upstream-version.json; the merge-bot job is renamed merge-upstream-version and matches the new upstream-version-main / upstream-version-develop head refs.
  • Docs. AGENTS.md references updated (tracker name, state file, branch refs, owned-vs-carried split).

Notes

  • State file is CRLF. The canonical task writes the state file as CRLF (honoring .editorconfig's .json rule) after ProjectTemplate#172 resolved Record two container-testing traps in Verification Discipline #170; upstream-version.json is committed CRLF to match. Verified byte-identical to the task's output, so a same-version run is a no-op (no canonicalize PR).
  • Inline comment dropped. The canonical contract is "resolver output == file", so upstream-version.json carries no $comment; the "bot-maintained, do not hand-edit" note moved to AGENTS.md.
  • Resolver hardening (from review): the PyPI curl calls use --show-error --location --fail and emit ::error:: annotations naming ESPHome / esphome-device-builder on resolve failure.

Verification

  • actionlint clean on all workflows; markdownlint-cli2 clean on AGENTS.md.
  • Resolver output passes the task's strict contract check (non-empty JSON object of single-line string values).
  • Smoke Docker build passes against the renamed CRLF state file (validates the by-key read path).

Closes #66.

Replace the bespoke check-esphome-version.yml with the carried
check-upstream-version-task.yml plus a thin scheduled entry-point
(check-upstream-version.yml) whose resolver prints the esphome and
device-builder versions as a JSON object. Rename the state file
esphome-version.json -> upstream-version.json (keyed esphome and
device_builder, sorted JSON) and point build-docker-task.yml, the
merge-bot refs (upstream-version-<base>), and the PR paths-filter at it.

Converges on ptr727/ProjectTemplate#169, which added structured
multi-key state to the canonical task per the gap filed in #168.

Closes #66.
Copilot AI review requested due to automatic review settings June 21, 2026 20:44

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.

Pull request overview

This PR re-converges the repo’s upstream-version tracking onto the canonical template workflow, enabling multi-key (multi-component) pinned state while keeping the existing “rolling bump PR per branch” automation model intact.

Changes:

  • Replaces the bespoke ESPHome-only tracker with a thin entry workflow that calls the carried check-upstream-version-task.yml.
  • Migrates state from esphome-version.json to a canonical multi-key upstream-version.json (esphome + device_builder) and updates consumers accordingly.
  • Updates automation wiring/docs: merge-bot head-ref matching, PR smoke-build path filters, and AGENTS.md references.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.

Show a summary per file
File Description
upstream-version.json Adds canonical multi-key upstream state (esphome, device_builder).
esphome-version.json Removes the legacy single-key-ish state file.
AGENTS.md Updates tracker/state-file/head-ref documentation to match the new canonical tracker.
.github/workflows/test-pull-request.yml Repoints paths-filter to watch upstream-version.json instead of the removed file.
.github/workflows/merge-bot-pull-request.yml Renames and repoints the auto-merge job to match upstream-version-{main,develop} bump branches.
.github/workflows/check-upstream-version.yml Adds the scheduled/dispatch entry workflow that resolves PyPI versions and calls the task.
.github/workflows/check-upstream-version-task.yml Adds the carried canonical task implementing strict multi-key state normalization and rolling bump PR creation.
.github/workflows/check-esphome-version.yml Deletes the bespoke tracker workflow superseded by the canonical task.
.github/workflows/build-docker-task.yml Updates pinned-version reads to .esphome / .device_builder from upstream-version.json.

Re-sync the carried check-upstream-version-task.yml to write the state
file as CRLF (jq emits LF), honoring .editorconfig's .json rule, and
convert upstream-version.json to CRLF to match. Converges on
ptr727/ProjectTemplate#172, which resolved the LF-vs-CRLF state-file
nuance filed in #170.

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.

Pull request overview

Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.

Comment thread .github/workflows/check-upstream-version.yml Outdated
Add --show-error/--location to the PyPI curl calls and emit ::error::
annotations on resolve failure, so a failed scheduled run surfaces a
clear cause. Addresses Copilot review feedback on PR #67.

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.

Pull request overview

Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.

Comment thread .github/workflows/check-upstream-version.yml Outdated
Comment thread AGENTS.md
Reference ESPHome and esphome-device-builder (the PyPI/product names) in
the resolve-failure messages, and update the remaining "ESPHome-version
bump" mention in AGENTS.md to "upstream-version bump". Addresses Copilot
review feedback on PR #67.

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.

Pull request overview

Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.

Comment thread .github/workflows/check-upstream-version-task.yml

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.

Pull request overview

Copilot reviewed 9 out of 9 changed files in this pull request and generated no new comments.

Comments suppressed due to low confidence (1)

upstream-version.json:5

  • upstream-version.json currently ends with an extra blank line after the closing brace. Since the tracker task writes the file deterministically, keeping the state file byte-identical to the task output avoids one-off "canonicalize" churn and keeps diffs minimal.
}

@ptr727
ptr727 merged commit f00c2c9 into develop Jun 21, 2026
11 checks passed
@ptr727
ptr727 deleted the reconverge-upstream-tracker branch June 21, 2026 22:38
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.

2 participants