Same shape three times in one day.
| Safeguard | Meant to block | Actually blocked |
|---|---|---|
pgrep guard | Duplicate runs | Itself — immediate exit every time |
| Lock file | Overlap | Every later run — permanent block after a crash |
Ever-growing seen set | Reprocessing | All candidates — the filter exhausted them and the system went silent |
★ Whenever you write a safeguard, ask: "Can this block the body, not just the target?"
About the seen set
A deduplication list that grows without bound eventually drives candidates to zero. Give it a TTL, or count it against the population and watch for exhaustion. Zero candidates may not mean "none"; it may mean "all filtered out."
The other direction — the safeguard lets the target through
The three above are safeguards that blocked the body. It also runs the other way.
| Safeguard | Meant to catch | Actually did |
|---|---|---|
| Regex detecting bad tracking numbers | An order number typed into the tracking-number field | Put ^\d{10,14}$ on the allow-list — the exact shape of the incident |
Back-test a detection rule against past incidents. If it doesn't fire on them, the rule doesn't exist. Details in chapter 02, "The validator had the very shape it was meant to catch on its allow-list."