Skip to content

feat: tell FTW it runs as the Home Assistant bundle - #5

Open
HuggeK wants to merge 1 commit into
srcfl:mainfrom
HuggeK:feat/ftw-bundle-env
Open

feat: tell FTW it runs as the Home Assistant bundle#5
HuggeK wants to merge 1 commit into
srcfl:mainfrom
HuggeK:feat/ftw-bundle-env

Conversation

@HuggeK

@HuggeK HuggeK commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

What

Identify this image to FTW as the Home Assistant bundle so the FTW web UI can show a single bundled FTW version in Settings → System, instead of the per-container Core/Optimizer breakdown (with Update/Rollback buttons that Supervisor-managed installs can't use).

This sets the FTW_BUNDLE / FTW_BUNDLE_VERSION env contract in three places, defence-in-depth:

  • ftw/config.yaml — declares FTW_BUNDLE=home_assistant_addon in the add-on environment.
  • ftw/Dockerfile — bakes FTW_BUNDLE and FTW_BUNDLE_VERSION=${BUILD_VERSION} into the image ENV.
  • ftw/run.sh — re-exports FTW_BUNDLE=home_assistant_addon alongside the existing self-update/transport hardening, so an injected environment can't make Core present itself as anything but the bundle.

Docs updated (ftw/DOCS.md, ftw/CHANGELOG.md).

Why

The add-on ships Core + Optimizer in one image and Supervisor owns update/rollback, so the per-container version breakdown and update buttons are misleading here. The single "bundled FTW version" answers the question users actually have: which FTW is this add-on?

Companion PR

The UI rendering that reads this contract lives upstream in Core: srcfl/ftw#701. This add-on change is the producer side of the contract.

Rollout / no-op note

FTW_BUNDLE is unknown to the currently pinned Core (v1.10.0-beta.1, per compatibility.yaml), which simply ignores the extra env vars — so this is a no-op until a Core release containing srcfl/ftw#701 is pinned. Merging it now means the add-on is ready the moment that Core bump lands, with no second change needed.

Testing

  • python scripts/validate.py passes.
  • Diff is limited to the ftw/ add-on wrapper; no runtime code paths changed for the current pinned Core.

Set FTW_BUNDLE=home_assistant_addon and FTW_BUNDLE_VERSION in the add-on image so the FTW web UI (from Core v1.10.1+ once the bundle-aware UI ships) reports the single bundled FTW version instead of a per-container Core/Optimizer breakdown. Unknown to the currently pinned Core, so this is a no-op until the next Core bump.

Co-authored-by: HuggeK <48095810+HuggeK@users.noreply.github.com>
@HuggeK
HuggeK marked this pull request as ready for review July 29, 2026 13:50
@HuggeK
HuggeK requested a review from frahlg as a code owner July 29, 2026 13:50

@miravoss26 miravoss26 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.

Small and clean. Adds FTW_BUNDLE=home_assistant_addon (+ FTW_BUNDLE_VERSION) across the Dockerfile, config.yaml and run.sh so the FTW web UI reports one bundled version instead of a per-container breakdown. Docs + changelog match.

Nice touch: the run.sh export is belt-and-suspenders against an injected env flipping the bundle identity, same pattern as the existing self-update/transport guards. All five checks green.

Safe to merge from my read, no security surface. Not on my auto-merge allowlist, so leaving the button to a human.

@miravoss26 miravoss26 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.

Sets the FTW_BUNDLE=home_assistant_addon / FTW_BUNDLE_VERSION env contract in three places (config.yaml, Dockerfile ENV, run.sh export) plus CHANGELOG + DOCS, so the FTW web UI reports one bundled version instead of the per-container Core/Optimizer breakdown with update buttons Supervisor can't use.

Small and coherent. The three-place defence-in-depth matches the existing self-update/transport hardening in run.sh. No secrets, no new deps, no network or authz surface. CI green. Safe to merge from my read.

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.

3 participants