
Writing
Verified, Not Trusted: Expense Analysis, Part Two
Imperative Python controls expense analysis and verifies model contributions through source evidence, reconciliation, and exact calculations. Models handle bounded judgments.

Topic
Checking untrusted input and output at system boundaries while keeping internal flows clear.
7 pages

Writing
Imperative Python controls expense analysis and verifies model contributions through source evidence, reconciliation, and exact calculations. Models handle bounded judgments.

Writing
Interface tests verify wire conversion and exception translation at their owning boundaries. Controller Hooks, middleware checks, and hosted HTTP scenarios complement domain acceptance.

Writing
Validate and clean data at the front and back doors; skip checks on internal formal arguments. Immutable DTOs preserve trust, one exception reports all errors, and black box tests exercise the doors.

Writing
Method contracts let callers rely on completed work and let failures propagate. C# examples distinguish retrieval from search, validate domain entry points, and assign handling to its owner.

Writing
A Configuration Provider hides the source and returns validated, typed settings. Useful exceptions and composed settings providers keep configuration rules in one place.

Writing
A model should express required fields, genuine absence, and distinct variants in its type. Python unions and C# records encode those promises, while boundaries check external values.

Chapter
C# methods tell callers what they do through explicit visibility, truthful signatures, and returns that express action, query, and cardinality; their bodies orchestrate at one level.