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

highlighted = computed this step

Honest by construction

Each lesson compiles raw parent and child rows, 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 still has 3 references and valid is yes.

references=3\text{references}=3

Key examples are tiny finite table checks; SQL dialects, indexing, query planning, deferrable constraints, enforcement timing, performance, and product behavior are out of scope.

Guarded key facts: parent tablecustomer_idname1Ada2Ben3Cy Guarded key facts: child tableorder_idcustomer_idtotal101150102230103170 key columnsparent keychild foreign keycustomer_idcustomer_id child-to-parent linkschildRowchildValueparentRowsstatus01[0]match12[1]match21[0]match duplicate parent keysvalueparentRowsnonenone dangling referenceschildRowvaluestatusnonenonenone key factsfactvalueparentRowCount3childRowCount3duplicateParentKeyCount0referenceCount3danglingReferenceCount0parentKeyUniqueyesvalidyesdeleteStatusnone

Try to tamper

Wrong expected facts, derived sidecars, duplicate columns, missing key columns, and unsupported delete modes fail closed.

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

Summary

Book twenty stays inside finite primary-key and foreign-key checks.

recomputed key facts\text{recomputed key facts}