Skip to content

Commit 52ca253

Browse files
fix: remove slash from webhook proxy add-on name (#1707) (#1709)
* fix: remove slash from webhook proxy add-on name (#1707) HA Supervisor builds the pre-update backup filename from the add-on name and validates it against ^[^/]+\.tar$. The "/" in "Nabu Casa / Webhook Proxy for HA MCP" produced "Nabu_Casa_/_..._.tar", which fails that regex, so running "Update" with "Create backup before update" enabled crashed. Rename to "Nabu Casa - Webhook Proxy for HA MCP" (slug unchanged) and bump the proxy add-on + integration to 1.2.2. Guard against recurrence: add a test asserting no add-on name contains "/", and wire tests/addon/ into the CI unit job (excluding the Docker-only test_addon_startup.py) — these add-on structure tests previously ran nowhere in CI, so the original slash slipped through. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * test: update hardcoded webhook proxy addon name after rename (#1707) The haos_only e2e WEBHOOK_PROXY_NAME constant pinned the old slash name and failed once the add-on was renamed to use a dash. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * docs(addon): correct the Log inbound requests option text (#1708) The description still said requests are logged to the HA log 'NOT this addon log', contradicting the v1.2.1 mirroring — the lines now appear in the addon's own log too. Reword to match. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> --------- Co-authored-by: kingpanther13 <kingpanther13@users.noreply.github.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent de45f85 commit 52ca253

7 files changed

Lines changed: 59 additions & 10 deletions

File tree

.github/workflows/pr.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -311,6 +311,15 @@ jobs:
311311
- name: Run unit tests
312312
run: uv run pytest tests/src/unit/ -n auto --tb=short -v
313313

314+
- name: Run add-on structure tests
315+
# tests/addon/ validates add-on packaging / config.yaml structure (e.g.
316+
# the backup-filename-safe name guard, #1707) — previously these ran
317+
# nowhere in CI. Excludes test_addon_startup.py, which spins up real
318+
# Docker containers (testcontainers) this lint/unit runner doesn't have.
319+
run: >-
320+
uv run pytest tests/addon/ -n auto --tb=short -v
321+
--ignore=tests/addon/test_addon_startup.py
322+
314323
# Comprehensive E2E validation for all PRs
315324
e2e-validation:
316325
name: E2E Validation (${{ matrix.os }})

homeassistant-addon-webhook-proxy/CHANGELOG.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,24 @@
33
<!-- version list -->
44

55

6+
## v1.2.2 (2026-06-29)
7+
8+
### Fixed
9+
10+
- Remove the `/` from the add-on name ("Nabu Casa / Webhook Proxy for HA MCP" ->
11+
"Nabu Casa - Webhook Proxy for HA MCP"). Home Assistant Supervisor builds the
12+
pre-update backup filename from the add-on name and validates it against
13+
`^[^/]+\.tar$`, so the slash made "Update" with "Create backup before update"
14+
enabled fail with `does not match regular expression` (issue #1707).
15+
16+
### Documentation
17+
18+
- Correct the "Log inbound requests" option description. It still said requests
19+
are logged to the Home Assistant log "NOT this addon log", which contradicts
20+
the v1.2.1 mirroring — the lines now appear in this addon's own log as well
21+
(issue #1708).
22+
23+
624
## v1.2.1 (2026-06-28)
725

826
### Added

homeassistant-addon-webhook-proxy/config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
name: "Nabu Casa / Webhook Proxy for HA MCP"
1+
name: "Nabu Casa - Webhook Proxy for HA MCP"
22
description: "Remote access proxy via Nabu Casa or any reverse proxy (Cloudflare, DuckDNS, nginx)"
3-
version: "1.2.1"
3+
version: "1.2.2"
44
slug: "ha_mcp_webhook_proxy"
55
url: "https://github.com/homeassistant-ai/ha-mcp"
66
arch:

homeassistant-addon-webhook-proxy/mcp_proxy/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@
77
"dependencies": ["webhook"],
88
"documentation": "https://github.com/homeassistant-ai/ha-mcp",
99
"iot_class": "local_push",
10-
"version": "1.2.1"
10+
"version": "1.2.2"
1111
}

homeassistant-addon-webhook-proxy/translations/en.yaml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -70,12 +70,13 @@ configuration:
7070
debug_logging:
7171
name: Log inbound requests (Beta)
7272
description: |
73-
Logs every request that reaches this webhook to the Home Assistant log
74-
(Settings -> System -> Logs, filter for "mcp_proxy") — NOT this addon
75-
log, because requests hit Home Assistant directly rather than passing
76-
through this addon. Each line shows the method, a masked webhook path,
77-
the source address, whether an Authorization header was present, and the
78-
upstream response status.
73+
Logs every request that reaches this webhook. The lines appear in this
74+
addon's own log (below) AND in the Home Assistant log (Settings ->
75+
System -> Logs, filter for "mcp_proxy"). The webhook is served inside
76+
Home Assistant rather than this addon, so the integration logs each
77+
request there and the addon mirrors those lines into this log. Each line
78+
shows the method, a masked webhook path, the source address, whether an
79+
Authorization header was present, and the upstream response status.
7980
8081
Use this to confirm whether your MCP client (e.g. Claude.ai) is actually
8182
reaching the server: turn it on, restart the addon, try to connect from

tests/addon/test_addon_structure.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,3 +257,24 @@ def test_translations_cover_every_schema_key(self, addon_dir):
257257
"needs a non-empty `description` (Supervisor renders it "
258258
"as the help tooltip under the toggle)"
259259
)
260+
261+
def test_addon_names_are_backup_filename_safe(self):
262+
r"""No add-on ``name`` may contain ``/``.
263+
264+
Home Assistant Supervisor builds the pre-update backup filename from
265+
the add-on name (spaces -> underscores, other characters kept) and
266+
validates it against ``^[^/]+\.tar$``. A ``/`` in the name therefore
267+
makes "Update" with "Create backup before update" enabled crash with
268+
``does not match regular expression`` (issue #1707). Covers every
269+
``homeassistant-addon*`` flavour so a new add-on can't reintroduce it.
270+
"""
271+
configs = sorted(_REPO_ROOT.glob("homeassistant-addon*/config.yaml"))
272+
assert configs, "no add-on config.yaml files found to validate"
273+
for config_path in configs:
274+
name = yaml.safe_load(config_path.read_text())["name"]
275+
assert "/" not in name, (
276+
f"{config_path.parent.name}: add-on name {name!r} contains "
277+
r"'/', which breaks the Supervisor pre-update backup filename "
278+
r"(^[^/]+\.tar$, issue #1707). Use a different separator "
279+
"such as '-'."
280+
)

tests/src/e2e/haos_only/test_webhook_proxy_addon.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363

6464
pytestmark = [pytest.mark.haos_only]
6565

66-
WEBHOOK_PROXY_NAME = "Nabu Casa / Webhook Proxy for HA MCP"
66+
WEBHOOK_PROXY_NAME = "Nabu Casa - Webhook Proxy for HA MCP"
6767
WEBHOOK_PROXY_SLUG = "local_ha_mcp_webhook_proxy"
6868
DEV_ADDON_SLUG = "local_ha_mcp_dev"
6969

0 commit comments

Comments
 (0)