Field Manual - SystemsVol. 01§V · EvidenceHow the hard parts work

How the hard parts work.

Five decisions from systems I shipped, drawn as schematics. Each shows a quiet failure mode in data sync, money, real-time state, or generated content, plus the rule that contains it.

I traced each exhibit back to production code. The highlighted invariant is the condition that must remain true.

erp-sync --keyset-drain

§V · FIG.01
FIG. 01

No-silent-loss ERP sync

The hard part: the ERP’s change-cursor is a minute-resolution timestamp, so a burst of >1000 rows in one minute would silently strand the overflow.

Never advance the watermark unless accepted + rejected == rows_sent. Silent drops are caught, not skipped.

payouts --exactly-once

§V · FIG.02
FIG. 02

Exactly-once payouts

The hard part: a payout API call can time out after the money has already moved. “No response” is not the same as “it failed.”

Release funds only on a provable failure. A maybe-succeeded transfer is never double-paid.

realtime --server-authoritative

§V · FIG.03
FIG. 03

Cheat-resistant real-time6 → 100+ players

The hard part: in a live multiplayer round, the client cannot be trusted. So the correct answer can never reach it, and the score cannot be set by it.

Scoring is server-authoritative and answers are never leaked, so you cannot fake a correct answer. Scales 6-player rooms → 100+ broadcast.

locks --one-global-order

§V · FIG.04
FIG. 04

Deadlock-free money pathsLogistics · Postgres

The hard part: two money flows that lock the same rows in opposite orders will eventually deadlock. Postgres aborts one with 40P01.

A single global lock ordering across every money path, so the cycle that caused 40P01 cannot form.

questions --initial-rollout

§V · FIG.05
FIG. 05

First production AI pipeline30 people → 2

The hard part: a model will produce a confidently wrong exam question, and a wrong question does not look wrong. It looks like a question, right up until it is graded against a student.

In the first production rollout, no generated question reached a student without approval. That boundary exposed the failure modes before later automation removed the routine manual step.

These are the load-bearing parts, drawn small. The full case studies, with context, stack and what shipped, live in ~/work.