feat: tell FTW it runs as the Home Assistant bundle - #5
Conversation
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>
miravoss26
left a comment
There was a problem hiding this comment.
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
left a comment
There was a problem hiding this comment.
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.
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_VERSIONenv contract in three places, defence-in-depth:ftw/config.yaml— declaresFTW_BUNDLE=home_assistant_addonin the add-on environment.ftw/Dockerfile— bakesFTW_BUNDLEandFTW_BUNDLE_VERSION=${BUILD_VERSION}into the image ENV.ftw/run.sh— re-exportsFTW_BUNDLE=home_assistant_addonalongside 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_BUNDLEis unknown to the currently pinned Core (v1.10.0-beta.1, percompatibility.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.pypasses.ftw/add-on wrapper; no runtime code paths changed for the current pinned Core.