Files
houseplan-card/scripts/schema-compat-allowlist.mjs
T
Codex 24681ee26f feat: schema manifest, parity allow-list and lifecycle fixtures (#33)
The Voluptuous schema is now dumped into a deterministic committed
manifest (265 leaf paths); a pytest fails on drift. A parity test
compares manifest enums with the exported frontend const lists through
a machine-readable allow-list that also refuses to rot. The field
registry gains passports (allow-extra / lovelace-card), enforcedBy
citations for mechanisms that already shipped, and passports for the
v1.68-v1.69 fields; a completeness test bans dead decisions. Lifecycle
fixtures (oldest / current / future) prove lossless loading, and the
config auditor gains the 0/3/2 exit-code contract.

User-Visible: yes
Issue: #33
2026-08-30 12:42:31 +03:00

43 lines
1.3 KiB
JavaScript

/**
* #33: the machine-readable list of LEGITIMISED enum divergences between the
* backend schema manifest (scripts/config-schema-manifest.json) and the
* frontend const declarations.
*
* The parity test fails on any divergence that is not listed here — and on
* any entry here that no longer corresponds to a real divergence, so the
* list cannot rot. Every entry names the owning side, the value, the reason
* and the issue that owns the decision.
*/
export const SCHEMA_COMPAT_ALLOWLIST = Object.freeze([
{
pair: 'space.fill_mode',
side: 'backend-only',
value: 'glow',
reason: 'legacy stored value from the pre-#20 glow era; the space editor '
+ 'projects it and never writes it back',
issue: '#33',
},
{
pair: 'room.fill_mode',
side: 'backend-only',
value: 'glow',
reason: 'same read-compatibility as the space level',
issue: '#33',
},
{
pair: 'marker.display',
side: 'backend-only',
value: 'ripple',
reason: 'read-compatibility value; normalizeDeviceDisplay canonicalises '
+ 'it to icon_ripple and the editor rewrites it on every write',
issue: '#33',
},
{
pair: 'marker.tap_action',
side: 'backend-only',
value: 'cover',
reason: 'read/backend compatibility token; the editor no longer offers it',
issue: '#33',
},
]);