From 9f5d7a1a8367fad02112554ffee67b0374591355 Mon Sep 17 00:00:00 2001 From: jochen Date: Mon, 31 Aug 2026 17:33:34 +0200 Subject: [PATCH] Name ADR 0013 in the test that defends it A migration refused when the record and the files disagree is the property that makes a schema trustworthy months later. The test asserted it without naming the decision, so an audit of which decisions are defended could not see it. novox/hq ADR 0017. --- internal/store/live_test.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/internal/store/live_test.go b/internal/store/live_test.go index aad4d75..a03a03a 100644 --- a/internal/store/live_test.go +++ b/internal/store/live_test.go @@ -199,6 +199,11 @@ func TestASchemaChangeAndItsRecordCommitTogether(t *testing.T) { } } +// Defends novox/hq ADR 0013: a schema change is a numbered migration. +// +// The property that makes a schema trustworthy months later is not that migrations ran, but that +// they refuse to run when the record and the files disagree — an edited migration is a schema +// nobody can reproduce. func TestAChangedMigrationIsRefusedAgainstARealRecord(t *testing.T) { // The same refusal as the unit test, against a record PostgreSQL actually kept — which is // what the guard protects, and the unit test can only model.