From 98d859cf5002673807a270edd06c1abc088bcc1c Mon Sep 17 00:00:00 2001 From: Yavor Panayotov Date: Tue, 16 Jun 2026 17:10:16 +0300 Subject: [PATCH] Document default field-schema validation (drift) Adds validation rule 24b: every field in a `default` object literal must be declared on the named entity/value type, recursing into nested object literals, so field renames/removals surface as drift errors at check time. Complements the existing 24a (qualified-type schema resolution) and 14c (empty-list element type). Implemented in juxt/allium-tools#46. Refs #43 Co-Authored-By: Claude Opus 4.8 (1M context) --- skills/allium/references/language-reference.md | 1 + 1 file changed, 1 insertion(+) diff --git a/skills/allium/references/language-reference.md b/skills/allium/references/language-reference.md index b24e555..b3f39bf 100644 --- a/skills/allium/references/language-reference.md +++ b/skills/allium/references/language-reference.md @@ -1949,6 +1949,7 @@ A valid Allium specification must satisfy: 23. Each binding name must be unique within the `given` block 24. Unqualified instance references in rules must resolve to a `given` binding, a `let` binding, a trigger parameter or a default entity instance 24a. A qualified type name in a `default` declaration (`default alias/Type name = { ... }`) must resolve against the imported module's entity declaration; the literal's field set and types are validated against that canonical schema +24b. Every field set by a `default` object literal must be a field declared on the named entity or value type; a field the type does not declare is an error. This applies recursively to nested object literals (validated against the nested field's type), so renaming or removing a field surfaces as a drift error at check time **Config validity:** 25. Config parameters must have explicit types. Parameters with default values must declare them explicitly (literal, qualified reference or expression). Parameters without defaults are mandatory: consuming modules must supply a value