Repository navigation
Commit ddb59d8
committed
no-mistakes(ci): Repo: ngoviet/lumentreeHA, PR #5 (audit/robustness-and-thread-safety). Both checks fail on the current head with live annotations (confirmed via check-run annotations + job logs, not stale runs). **ci-1 HACS — FIXED (code change).**
<Validation hacsjson> failed: extra keys not allowed @ data['domains']. hacs.json carried two keys that are not in HACS_MANIFEST_JSON_SCHEMA (hacs/integration@main custom_components/hacs/utils/validate.py), which is declared extra=vol.PREVENT_EXTRA. Both domains and iot_class are hassfest/manifest concepts, not HACS concepts — the HACS analogue (HacsManifest dataclass) has no such fields. Removed both keys; kept name, content_in_root, homeassistant, render_readme. Verified by validating the file against the real schema reconstructed from upstream (voluptuous 0.16.0) → PASS. **ci-2 Hassfest — 2 of 3 errors FIXED, 1 not fixable in this PR.** (a) FIXED: [TRANSLATIONS] Invalid strings.json: not a valid option at 'translations'. strings.json carried a top-level translations key holding a vi block. hassfest's gen_strings_schema (script/hassfest/translations.py, home-assistant/core@dev) enumerates an explicit optional-key list with no translations entry, and HA has no such component — a locale belongs in translations/<locale>.json. Removed the key (strings.json:76-152) and relocated the Vietnamese block verbatim to the new translations/vi.json (CRLF preserved, content byte-identical; title/config/entity all preserved exactly). Verified fail-before/pass-after against the real schema: base-commit strings.json FAILs with the exact reported wording, current file PASSes. (b) NOT FIXED — not caused by this PR and structurally unsatisfiable. [MANIFEST] Domain does not match dir name: hassfest compares manifest["domain"] (="lumentree") to integration.path.name, and Integration.domain returns self.path.name (script/hassfest/model.py:151). For a root manifest.json the Docker entrypoint passes the repo root as --integration-path, so path.name is the checkout directory ("workspace"), never "lumentree". This is unsatisfiable for the deliberate content_in_root: true flat layout adopted in v5.0.0 (commit 3ab6ae4) and required by hacs.json. Upstream home-assistant/core#152942 reports exactly this and was closed not_planned. hassfest has no content_in_root exemption anywhere. The only "fix" would be relocating the integration to custom_components/lumentree/, abandoning the intentional layout — a large restructure that contradicts the PR's design, not a minimal root-cause fix. **Scope note.** git diff base..HEAD -- hacs.json strings.json manifest.json translations/ was empty: both defects pre-exist at base 602e5a5f. The only file this PR changed among config files is the deliberately-added .github/workflows/ci.yml, which surfaces them. Per the removal-first rule both fixes are pure deletions (80 lines removed, 2 files, +1 relocated file), verified against the real consumer schemas rather than by substring matching. **Local baseline after change:** pytest tests/ -q → 48 passed; ruff check . → All checks passed; all touched JSON parses. Docker is unavailable here, so the hassfest image could not be executed locally; the validators were reconstructed from upstream sources and exercised directly. **Residual:** error (b) will keep the Hassfest check red until the layout question is decided by the owner (either keep the flat layout and accept the known false positive, or restructure to custom_components/lumentree/)1 parent a73e1ec commit ddb59d8
3 files changed
Lines changed: 156 additions & 80 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | | - | |
6 | 4 | | |
7 | 5 | | |
8 | 6 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | | - | |
146 | | - | |
147 | | - | |
148 | | - | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | 75 | | |
154 | 76 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
0 commit comments