MiniCTRMSearch

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.

Before you start

The lessons this one builds on: 523 The first vertical slice: one swap from ticket to blotter, 612 Operations: confirms, invoices and operational events, 622 Running jobs in parallel: the end of day in ten minutes, not twenty.

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 / 16
What a system does when something goes wrong
What goes wrong, and the rule for each

What goes wrong, and the rule for each

2 / 16
What goes wrong, and the rule for each
What goes wrong, and the rule for each

An audit of every write, and one door per kind

3 / 16
An audit of every write, and one door per kind
All or nothing, in plain words

Two rules you already have, made standing

4 / 16
Two rules you already have, made standing
All or nothing, in plain words

Every write all or nothing, and one rebuild

5 / 16
Every write all or nothing, and one rebuild
All or nothing, in plain words

Validation in plain words, every message read by a test

6 / 16
Validation in plain words, every message read by a test
Safe to call twice

Idempotence, from zero

7 / 16
Idempotence, from zero
Safe to call twice

An idempotency key on every create, the retry door everywhere

8 / 16
An idempotency key on every create, the retry door everywhere
A system activity log

What belongs in a system log, and what never does

9 / 16
What belongs in a system log, and what never does
A system activity log

The system activity log and the System Logging screen

10 / 16
The system activity log and the System Logging screen
Every failure tested, then ship

A failure you have not staged

11 / 16
A failure you have not staged
Every failure tested, then ship

One Robustness suite, and the rules into CLAUDE.md

12 / 16
One Robustness suite, and the rules into CLAUDE.md
Every failure tested, then ship

Ship it

13 / 16
Ship it
How MiniCTRM did it

System Logging

14 / 16
System Logging
How MiniCTRM did it

Troubleshooting, and the doors behind it

15 / 16
Troubleshooting, and the doors behind it
What you have now

What you have now

16 / 16
What you have now

You have finished lesson 632, Robustness: transactions, one door per write, validation, retries, the activity log.

Where next?

← → move · N notes · Home / End