Expected check facts are assertions only; compiler output is the source of truth.

highlighted = computed this step

Honest by construction

Each lesson compiles raw rows and rules, turns recomputed facts into expected assertions, then compiles again.

expected is assertion only\text{expected is assertion only}

Show the guarded check

The guarded check has 3 rules and 3 passing rows.

rules=3\text{rules}=3

Check examples are tiny finite row-rule validations; SQL dialects, DDL timing, CHECK expression languages, enforcement strategy, performance, and product behavior are out of scope.

Guarded check facts: tableidstatusqty1new22done43done5 row rulesnamekindcolumndetailstatus_requirednot_nullstatusnot NULLstatus_domainallowed_valuesstatus[done, new]qty_rangebetweenqty1..5 row pass/failrowstatusfailed rules0pass[]1pass[]2pass[] violationsrowrulecolumnvaluereasonnonenonenonenonenone check factsfactvaluerowCount3ruleCount3passCount3failCount0violationCount0allRowsPassyesnullMeansMissingyes

Try to tamper

Wrong expected facts, derived sidecars, duplicate rules, missing columns, floats, bools, and unsupported rule kinds fail closed.

fail closed before render\text{fail closed before render}

Summary

Book twenty-one stays inside finite row-rule validation.

recomputed check facts\text{recomputed check facts}