From e5d1c1e33b2a278c33bf16316592afceb02dbeb8 Mon Sep 17 00:00:00 2001 From: Brummel Date: Sun, 10 May 2026 12:48:21 +0200 Subject: [PATCH] =?UTF-8?q?design-md-consolidation=203.3:=20ast.rs=20doc-c?= =?UTF-8?q?omment=20names=20DESIGN.md=20=C2=A7Data-model=20as=20canonical?= =?UTF-8?q?=20schema,=20drift=20test=20as=20enforcement?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crates/ailang-core/src/ast.rs | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/crates/ailang-core/src/ast.rs b/crates/ailang-core/src/ast.rs index 36d903a..20020d3 100644 --- a/crates/ailang-core/src/ast.rs +++ b/crates/ailang-core/src/ast.rs @@ -1,10 +1,12 @@ //! AST nodes for the AILang language. //! -//! Every type in this module is the in-memory mirror of a node in the -//! AILang JSON schema documented in `docs/DESIGN.md`. The serde -//! attributes carry the schema: field renames (`as`, `type`, `fn`, -//! `paramTypes`, `retType`), enum tags (`kind`, `t`, `k`, `p`), and -//! `skip_serializing_if` predicates that keep the canonical-JSON +//! **The canonical schema lives in `docs/DESIGN.md` ยง"Data model"**; +//! this module is the Rust-side projection of it. When the two drift, +//! `crates/ailang-core/tests/design_schema_drift.rs` fires. +//! +//! The serde attributes carry the schema: field renames (`as`, `type`, +//! `fn`, `paramTypes`, `retType`), enum tags (`kind`, `t`, `k`, `p`), +//! and `skip_serializing_if` predicates that keep the canonical-JSON //! representation backwards compatible across schema extensions. //! //! The entry type is [`Module`]. The two helpers [`def_name`] and