Schema contract tests: metadata completeness and secret-safety #139
Notifications
Due Date
No due date set.
Depends on
Reference: sam/archie#139
Reference in new issue
Block a user
Assert every field the schema exposes carries type, label, and section; assert restart_required and editable are set deliberately (not zero-value defaults hiding an unreviewed field); assert secrets still never appear (extend the existing TestHandleConfigNeverLeaksSecrets pattern to the schema response); assert the frontend's generic renderer can render the full schema fixture without any field-specific branch (a JS test walking the schema and asserting no field key appears literally in settings.js).
Close reason
Most of this issue's assertions were already covered incrementally by tests added in .1-.4 (key/label/type completeness, structured/locked non-editability, secret-leak guard on the schema block, schema values matching their flat-field source). This issue adds the two pieces still missing: TestConfigFieldDescriptorsRestartRequiredIsDeliberate pins the exact RestartRequired value per key against the reload.go evidence documented in configFieldDescriptors' own comment, so a reclassification without checking reload.go fails loudly. ui/test/settings-schema.test.js renders settingsPage against a schema fixture containing a field settings.js has never heard of (proving the renderer needs no field-specific branch to show it correctly) and asserts, by reading settings.js's own source text, that none of the generically-rendered section's field keys appear literally in it -- the direct regression test for archie-core-b6ew.3's whole point.
Imported from beads
archie-core-b6ew.5· GitHub #692 · type task · priority P2 · created 2026-09-02 · closed 2026-09-02