Model value vocabulary
Boolean values in the model vocabulary today are raw Lisp t and nil, which conflates explicitly false with not specified: getf cannot tell present-nil from absent, and add-to-plist merges with (or new old), so an explicit nil overlay can never beat a non-nil value underneath. The ambiguity has already forced workarounds in three places — stage-3's re-emission of :page-description-open nil (an overlay nil is indistinguishable from an absent key), the member-on-plist presence checks for :api-roles and :guest-auto in top-level-settings, and the deliberately deferred :sortable nil case in "Timestamp field overrides" (2026-10-26).
Change the authoring language, not the engine: boolean-valued keys take :true / :false / :absent. An absent key or an explicit :absent means default, not specified; :true means on; :false means off. Defaults and overlays then layer honestly — an author override carrying :false beats a compiler-injected t — and the presence-check dances collapse (absent getf nil is the unspecified signal by definition). The compiler normalizes :true / :false to Lisp t / nil at compile time, so the compiled model, the JSON wire, and the frontend are untouched: a model-syntax vocabulary change, not an engine change.
One-time mechanical migration: every explicit nil meaning false in existing models — models/, models/local/, models/test/, *base-model*, and test fixtures — becomes :false; every t becomes :true; absent keys stay absent (explicit nil and absent are equivalent today everywhere except :guest-auto, whose present-nil the sweep rewrites to :false — so the rewrite is meaning-preserving). After the sweep, bare t and nil as values are compile errors (see the settled vocabulary below). The sweep touches every boolean-ish key on both paths — type keys (:display, :tree, :is-leaf, :fs-backed, :user-setting, :internal, :suppress-roles, :rollup, :guest-allowed, :guest-auto, :repl), field keys (:sortable, :not-null, :update, :searchable, :identity, :column, :path), :ui subkeys (:read-only, …), booleanp and the valid-top-level-field predicates in lisp/model.lisp, docs/model-reference.md, and every test fixture.
Third spelling: :absent — not specified, exactly equivalent to a dropped key, same meaning in every context. After the :false migration no key needs present-nil to differ from absence, so the workaround dances dissolve rather than persist: the member-on-plist presence checks in top-level-settings become plain getf + default, and the present-nil rejections (:api-roles nil, :page-description nil) become legal-unspecified. :absent carries the tinkering workflow — flipping a value to :absent is a one-token edit, no hunting both ends of a key/value pair in a nested plist, which is exactly how a designer disables a setting while experimenting. Bare t and nil are compile errors once the sweep lands (settled 2026-10-26): tolerance would keep the two-spellings ambiguity alive forever, and it would silently reinterpret the likeliest authoring mistake — an LLM or a Lisp habit writing nil meaning off — as not specified; rejection makes the compiler force the choice, and the error itself teaches the vocabulary (report-ve naming the candidates :true / :false / :absent). Final vocabulary: :true / :false / :absent, with a dropped key equivalent to :absent — keywords, strings, numbers, and lists are the only legal model syntax. Documentation convention, not enforcement (docs/model-reference.md when implemented): drop :absent-valued pairs once the model is stable — the stable form carries only keys that say something.
Reserved for later: :none as the explicit-empty token for value-taking keys (deliberately no value; cancels an injected or inherited default — the :false trick generalized, non-nil so it survives (or new old) overlay merging), adopted per-key only when a key actually gains an injectable default; no future keyword enum takes :none as a member. Deliberately not :nil: EQ to nil in some implementations (implementation-defined; SBCL keeps them distinct), and it reads as nil to humans and LLMs regardless — a token whose name is another token's name.
Parked at the bottom of MVP Now deliberately: it churns every model file at once, so it lands after the blog-surface features freeze their fixtures — not mid-stream.
- Slot
- 9500
- Status
- 10 Open
- Tags
- model, compiler
- Contributors
- Donnie