The Gate Defends State From Its Own Author

A gate that mutates state before it validates is not a gate. Enforcement has to fail fast before the write, and it has to serialize the writer against itself — because the first thing that corrupts canon is a second concurrent write from the same hand.

The picture of a gate is usually an external attacker held at the door. The likelier failure is quieter: the system's own writer, validating after it has already touched the filesystem, leaving an orphaned temp file or half-written canon when the input turns out to be bad. A gate that mutates before it checks has already lost the thing it was meant to protect.

Enforcement at a write boundary has two requirements. Validate before any mutation, so a rejected write leaves the state exactly as it was. And serialize writers against each other, so two concurrent operations cannot interleave into corruption. The gate's first adversary is not an intruder — it is the author's own next write, and the discipline is to defend state from it.