docs(6209): test prose in the present tense — "used to", "previously", "before this" restated as the failure shape

Twenty-eight test files described the code they guard by what it did
before a fix. Each is now the property and the failure it prevents, in the
present tense: the backfill snapshot, the per-dial calibration query, the
rule scope, the lesson trigger filter, the subshell global, the trash owner
scope, the version readout fallback, and others. A docstring line that
narrated the backup suite's own history is removed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-21 21:46:57 -04:00
co-authored by Claude Opus 5.5
parent 914f31359c
commit 4c150cbc2f
28 changed files with 96 additions and 105 deletions
+11 -16
View File
@@ -7,9 +7,7 @@ need only a stand-in and a builder.
The full FK-remapping round-trip needs real Postgres and lives in the
`test_integration_backup_*_roundtrip.py` modules, which drive the real
`restore_full_backup`. That sentence used to read "it is not written yet";
four of those files exist now, the newest covering the three `code_shapes`
columns the import guard below found missing.
`restore_full_backup`.
"""
from datetime import datetime, timezone
from types import SimpleNamespace
@@ -268,18 +266,16 @@ def test_every_column_is_exported_or_declared_excluded(table):
"""THE COLUMN GUARD — _NOT_INCLUDED's shape, one level down.
The table guard below catches a whole table going missing. It cannot catch
a COLUMN going missing from a table it already considers covered, which is
how nine of them vanished from `notes` alone: note_type and task_kind, so
every snippet and process restored as a plain note and every issue and
spike as `work`; arose_from_id, so every provenance edge went; the
recurrence pair, so recurring tasks stopped recurring. Plus milestones.body
— which IS the plan — and repo_bindings.ref.
a COLUMN going missing from a table it already considers covered, and the
cost is large: without note_type and task_kind every snippet and process
restores as a plain note and every issue and spike as `work`; without
arose_from_id every provenance edge goes; without the recurrence pair
recurring tasks stop recurring.
Each arrived the same way: added to the model and the migration, both of
which fail loudly, and never to the serialiser, which fails silently.
A new column must now be exported or named in _COLUMN_EXCLUSIONS with a
reason. Forgetting is no longer expressible.
A column arrives in the model and the migration, both of which fail loudly,
and is easy to leave out of the serialiser, which fails silently. So a new
column must be exported or named in _COLUMN_EXCLUSIONS with a reason, and
forgetting is not expressible.
"""
model, helper = _column_guard_targets()[table]
[row] = helper([_stand_in(model)])
@@ -536,8 +532,7 @@ def test_every_table_is_either_backed_up_or_explicitly_excluded():
)
# And the reverse: a name in either list that no longer exists is a lie the
# guard would otherwise keep telling. This half is what caught "embeddings",
# "invitations" and "password_resets" — three entries that named nothing.
# guard would otherwise keep telling.
phantom = accounted - schema
assert not phantom, (
f"backup lists table(s) that are not in the schema: {sorted(phantom)}. "