Skip to content

ci(release): hand a published stable to the Home Assistant app too - #2101

Merged
frahlg merged 2 commits into
masterfrom
onboarding-ha-stable-pin
Nov 28, 2026
Merged

frahlg merged 2 commits into
masterfrom
onboarding-ha-stable-pin

Conversation

@frahlg

@frahlg frahlg commented Nov 28, 2026 •

Copy link
Copy Markdown
Member

Paired with srcfl/home-assistant-addons#57 (the stable app, ftw-0x). CI only, so no changeset.

Problem

native-release.yml hands only a published beta to srcfl/home-assistant-addons (if: inputs.channel == 'beta'). The new stable app there must take every 0.x stable, and the beta app follows Core's beta channel, so a stable that outranks every beta should reach it too. Today a stable would need someone to dispatch the pin by hand.

Change

The ha-addon job now runs for both channels:

  • beta: tag v0.X.Y-beta.N, release marked prerelease, receipt channel beta (as before);
  • stable: tag v0.X.Y, release not marked prerelease (the publish job sets --prerelease only for a beta), receipt channel stable;
  • the event is still ftw-native-release, now with channel from the run (beta or stable). The app repo's sync-native.yml already reads only client_payload.tag; Add EV Charger settings tab #57 routes a stable tag to its apps.

The job is renamed "Offer the published release to the Home Assistant app", and ha-app-pin.yml names it so.

The watch in ha-app-pin.yml follows the same rule. .github/scripts/ha_app_pin.py read only 0.X.Y-beta.N, so once a stable outranks the beta pin (the beta app then holds 0.X.Y), every run would have failed. rank() now orders across channels (v0.X.Y-beta.N < v0.X.Y < v0.X.(Y+1)-beta.1), pinned() accepts a stable, and the check compares the pin with the newest release of either channel. The report says "release" where it said "beta". The issue title, which is its search key, is unchanged. A dry run still sends nothing, and a missing HA_ADDON_DISPATCH_TOKEN still only logs a notice.

#1798 (draft) adds a gate step to the publish job and statuses: read. This PR touches only the ha-addon job, so the two should not conflict.

Evidence

  • scripts/test_ha_addon_dispatch.py runs the job's script against fake gh answers: 7 tests OK, 3 of them new. A published stable sends {tag: v0.154.1, channel: stable} with the dispatch token. A beta tag on the stable channel, a stable release marked prerelease, a stable receipt that says beta, and an unknown channel send nothing.
  • .github/scripts/test_ha_app_pin.py: 18 tests OK, 3 of them new. They cover a stable above every beta (behind until pinned, quiet once pinned), a stable below the beta pin, and the order across channels. Old-line stables, drivers-stable and drafts never count.
  • make release-workflow-test passes locally. Both workflows parse as YAML.
  • Rebased onto origin/master (d43e80d9).

Not tested

  • No real release run; I dispatched no workflow. The job's if: and env wiring only run on a real dispatch.
  • Merge order: if this lands before Add EV Charger settings tab #57, the first stable's event reaches a sync-native.yml that refuses stable tags. It fails with "not a 0.x beta tag" and changes nothing.

Refs srcfl/home-assistant-addons#57

🤖 Generated with Claude Code

frahlg and others added 2 commits November 28, 2026 07:06
The ha-addon job in native-release.yml sent only betas to
srcfl/home-assistant-addons. Its stable app (srcfl/home-assistant-addons#57)
must take every stable, and its beta app follows the beta channel, so a
stable that outranks every beta reaches it as well.

The job now runs for both channels. It checks the tag form and the
release's prerelease flag per channel, requires the receipt to name the
same channel, and sends {tag, channel} in the same ftw-native-release
event. ha-app-pin.yml names the renamed job.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Fredrik Ahlgren <fredrik@sourceful-labs.com>
ha_app_pin.py read only `0.X.Y-beta.N`. Once a stable outranks the beta
pin, srcfl/home-assistant-addons' beta app holds `0.X.Y` and every run
would have failed with "pins no 0.x beta".

rank() now orders across channels (v0.X.Y-beta.N < v0.X.Y <
v0.X.(Y+1)-beta.1), pinned() accepts a stable, and the check compares
the pin with the newest release of either channel. The report says
"release" where it said "beta"; the issue title, its search key, is
unchanged. The issue text names the app repo's renamed pin workflow.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Fredrik Ahlgren <fredrik@sourceful-labs.com>
@frahlg
frahlg force-pushed the onboarding-ha-stable-pin branch from 4e98087 to dc4c870 Compare November 28, 2026 06:07
@frahlg frahlg added the no-changeset PR intentionally exempt from the changeset requirement (dev tooling / non-shipping) label Nov 28, 2026
@frahlg
frahlg marked this pull request as ready for review November 28, 2026 06:12
@frahlg
frahlg merged commit 07cee94 into master Nov 28, 2026
20 of 21 checks passed
@frahlg
frahlg deleted the onboarding-ha-stable-pin branch November 28, 2026 06:12
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 28, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-28T06:13:47.532633Z dc4c870 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

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

Labels

no-changeset PR intentionally exempt from the changeset requirement (dev tooling / non-shipping)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant