mirror of
https://github.com/Matysh/houseplan-card
synced 2026-09-29 03:09:36 +00:00
fix: the schema dump must not match the HACS *manifest.json glob (#33)
repo-hygiene caught it: HACS globs *manifest.json over the whole clone and rejects a repository with two. The dump is scripts/config-schema.json. User-Visible: no Issue: #33
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
|
||||
The Voluptuous schema in custom_components/houseplan/validation.py is the
|
||||
single owner of the persisted config/layout shape. This walker turns it into
|
||||
scripts/config-schema-manifest.json — the machine-readable manifest the
|
||||
scripts/config-schema.json — the machine-readable manifest the
|
||||
frontend parity test and the field registry completeness test consume.
|
||||
|
||||
Determinism contract: two runs on the same tree produce byte-identical
|
||||
@@ -25,7 +25,7 @@ import types
|
||||
from pathlib import Path
|
||||
|
||||
REPO = Path(__file__).resolve().parent.parent
|
||||
OUT = REPO / "scripts" / "config-schema-manifest.json"
|
||||
OUT = REPO / "scripts" / "config-schema.json"
|
||||
|
||||
|
||||
def _safe_repr(value) -> str:
|
||||
@@ -271,7 +271,7 @@ def main() -> int:
|
||||
current = OUT.read_text(encoding="utf-8") if OUT.exists() else ""
|
||||
if current != rendered:
|
||||
sys.stderr.write(
|
||||
"config-schema-manifest.json is stale: run python3 scripts/dump-config-schema.py\n")
|
||||
"config-schema.json is stale: run python3 scripts/dump-config-schema.py\n")
|
||||
return 1
|
||||
print(f"manifest fresh: {len(manifest['fields'])} paths")
|
||||
return 0
|
||||
|
||||
@@ -742,7 +742,7 @@ const MUTANT_DEFINITIONS = [
|
||||
+ 'bless) is exactly the schema drift #33 exists to catch — the manifest mutation '
|
||||
+ 'simulates the backend change without the frontend pair',
|
||||
patches: [{
|
||||
file: 'scripts/config-schema-manifest.json',
|
||||
file: 'scripts/config-schema.json',
|
||||
find: " \"config.spaces[].settings.fill_mode\": {\n \"enum\": [\n \"custom\",",
|
||||
replace: " \"config.spaces[].settings.fill_mode\": {\n \"enum\": [\n \"phantom-33\",\n \"custom\",",
|
||||
}],
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* #33: the machine-readable list of LEGITIMISED enum divergences between the
|
||||
* backend schema manifest (scripts/config-schema-manifest.json) and the
|
||||
* backend schema manifest (scripts/config-schema.json) and the
|
||||
* frontend const declarations.
|
||||
*
|
||||
* The parity test fails on any divergence that is not listed here — and on
|
||||
|
||||
Reference in New Issue
Block a user