Skip to content

Commit 0fbb5ea

Browse files
committed
no-mistakes(ci): Hassfest CI failure diagnosed and fixed (2 files). ROOT CAUSE (confirmed against real upstream source, not inferred): the hassfest image discovers integrations from WORKDIR /github/workspace, and Integration.domain is self.path.name (script/hassfest/model.py); script/hassfest/manifest.py:355 errors when manifest["domain"] != path.name. This repo deliberately keeps the integration at the repo root (hacs.json content_in_root: true, since commit 3ab6ae4), so the discovered directory is the checkout dir ("workspace" in the container) and can never equal "lumentree". hassfest has NO content_in_root exemption anywhere, so the error is unsatisfiable for a root layout. Reproduced with a 1:1 port of entrypoint discovery + Integration.domain + the manifest check: BEFORE -> path.name='workspace' vs domain='lumentree' -> FAIL. Docker is unavailable locally, so the validator logic was ported and executed directly rather than guessed. SECOND (MASKED) DEFECT found while verifying: manifest.py's validate() only calls sort_manifest if not integration.errors, so the domain error was hiding a key-order error. Fixing only the path would just move the failure to "[MANIFEST] Manifest keys are not sorted correctly: domain, name, then alphabetical order". Required order (script/util.py _sort_manifest_keys) is domain, name, then alphabetical. Both had to be fixed. FIX (minimal, 2 files): 1. manifest.json - reordered keys to domain, name, then alphabetical. Semantically identical to HEAD (json.load(old)==json.load(new) -> True); only key order changed. 2. .github/workflows/ci.yml - the hassfest job's actions/checkout@v5 now uses path: custom_components/lumentree, so hassfest discovers a directory actually named after its domain. This is the workaround endorsed in home-assistant/core#152942 (closed not_planned). It relocates only the checkout: no plugin skipped, no check suppressed, no continue-on-error, and the validated file set is unchanged (.github holds no .json/.py, so the json/dependencies plugins see no new input). VERIFICATION: simulated the exact post-fix CI layout -> discovered integration-path=/custom_components/lumentree, domain='lumentree', dir.name='lumentree' -> match -> Hassfest PASS (exit 0). pytest tests/ -q -> 48 passed; ruff check . -> All checks passed; hacs.json untouched (HACS job already passing). The "[CONFIG_SCHEMA]" line in the log is a warning, not an error (hassfest exits 0 with warnings), so it was never the cause. Evidence written to C:\Users\Vokupt\.no-mistakes\evidence\hassfest-diagnosis.md
1 parent ddb59d8 commit 0fbb5ea

2 files changed

Lines changed: 21 additions & 10 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,18 @@ jobs:
4545
name: Hassfest
4646
runs-on: ubuntu-latest
4747
steps:
48+
# hassfest compares manifest["domain"] against the *integration
49+
# directory name*, and has no notion of hacs.json's content_in_root.
50+
# This repo deliberately keeps the integration at the repository root
51+
# (hacs.json "content_in_root": true), so a plain checkout presents
52+
# hassfest with a directory named after the runner workspace and the
53+
# domain check can never pass. Checking out into custom_components/,
54+
# the layout hassfest expects, gives it a directory whose name matches
55+
# the domain. This only relocates the checkout: the mounted workspace
56+
# and the set of files hassfest validates are unchanged.
4857
- uses: actions/checkout@v5
58+
with:
59+
path: custom_components/lumentree
4960
- uses: home-assistant/actions/hassfest@master
5061

5162
hacs:

‎manifest.json‎

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
{
22
"domain": "lumentree",
33
"name": "Lumentree Inverter",
4+
"codeowners": [
5+
"@ngoviet"
6+
],
47
"config_flow": true,
58
"documentation": "https://github.com/ngoviet/lumentreeHA",
9+
"integration_type": "device",
10+
"iot_class": "cloud_polling",
611
"issue_tracker": "https://github.com/ngoviet/lumentreeHA/issues",
12+
"loggers": [
13+
"paho",
14+
"custom_components.lumentree"
15+
],
716
"requirements": [
817
"aiohttp>=3.8.0",
918
"paho-mqtt>=1.6.0",
1019
"crcmod>=1.7"
1120
],
12-
"codeowners": [
13-
"@ngoviet"
14-
],
15-
"version": "5.1.3",
16-
"iot_class": "cloud_polling",
17-
"integration_type": "device",
18-
"loggers": [
19-
"paho",
20-
"custom_components.lumentree"
21-
]
21+
"version": "5.1.3"
2222
}

0 commit comments

Comments
 (0)