MiniCTRM - Build Tutorial 632: Robustness: transactions, one door per write, validation, retries, the activity log
→ to begin · N for the speaker notes
On a phone: Next or a swipe left to begin, Notes for the words.
What you'll learn
Every write in one transaction through the one door for its kind, with a test that walks the code; one rebuild for the derived tables; validation in plain words with a Reference for the unexpected; every create safe to call twice and every background write through the retry door; a system activity log kept apart from the deal's history; and one Robustness suite with a test per way things go wrong.
What goes wrong, and the rule for each – The kinds of failure a trading system meets, one rule each, and an audit of every write with a test that keeps one door per kind.
All or nothing, in plain words – Every write one transaction with the rollback proof generalized, one rebuild for the derived tables, and every message a trader can act on.
Safe to call twice – Idempotence from zero: a retried save that must not book two deals, an idempotency key, and the retry door used everywhere.
A system activity log – System-wide actions nothing else records, written through one service, never a trade; a screen with a switch per kind.
Every failure tested, then ship – One suite named for it with a test per failure kind, the rules into CLAUDE.md as hard rules, and /ship.
How MiniCTRM did it – System Logging and Troubleshooting, live, and the one-door list behind them.
Copyright 2026-2027 Brian Shydlo. MiniCTRM is source-available under the PolyForm Strict License 1.0.0 (https://polyformproject.org/licenses/strict/1.0.0): free for learning and other noncommercial use; no changes and no redistribution; commercial use needs permission.
Welcome
What a system does when something goes wrong
1 / 16What goes wrong, and the rule for each
What goes wrong, and the rule for each
2 / 16What goes wrong, and the rule for each
An audit of every write, and one door per kind
3 / 16All or nothing, in plain words
Two rules you already have, made standing
4 / 16All or nothing, in plain words
Every write all or nothing, and one rebuild
5 / 16All or nothing, in plain words
Validation in plain words, every message read by a test
6 / 16Safe to call twice
Idempotence, from zero
7 / 16Safe to call twice
An idempotency key on every create, the retry door everywhere
8 / 16A system activity log
What belongs in a system log, and what never does
9 / 16A system activity log
The system activity log and the System Logging screen
10 / 16Every failure tested, then ship
A failure you have not staged
11 / 16Every failure tested, then ship
One Robustness suite, and the rules into CLAUDE.md
12 / 16Every failure tested, then ship
Ship it
13 / 16How MiniCTRM did it
System Logging
14 / 16How MiniCTRM did it
Troubleshooting, and the doors behind it
15 / 16What you have now
What you have now
16 / 16
You have finished lesson 632, Robustness: transactions, one door per write, validation, retries, the activity log.