From b134fe9aa12b06bbf5a0a77a0a03fbad4358d2cd Mon Sep 17 00:00:00 2001 From: Bryan Van Deusen Date: Fri, 28 Aug 2026 15:24:38 -0400 Subject: [PATCH] fix(tests): the column guard names join tables as _BACKED_UP holds them (#3182) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit _BACKED_UP carries REAL table names — project_rulebook_subscriptions, project_rule_suppressions, project_topic_suppressions, project_rulebook_exclusions — not the shorter keys the payload uses for the same sections. The registry-coverage assertion used the payload spelling and reported four tables unguarded. The integration round trip passed on this run, which is the half that matters: the real restore_full_backup remaps arose_from_id onto the restored origin. --- tests/test_services_backup.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/test_services_backup.py b/tests/test_services_backup.py index e5d2aa4..b58afee 100644 --- a/tests/test_services_backup.py +++ b/tests/test_services_backup.py @@ -242,9 +242,13 @@ def test_the_column_guard_covers_every_table_with_a_row_helper(): with a new helper, and not to the registry, would be unguarded and look guarded. Join tables have no model class and carry both their columns by construction, so they are the only permitted absences.""" + # REAL table names, as _BACKED_UP holds them — not the shorter keys the + # payload uses for the same sections. Getting this wrong is what the guard + # caught on its own first run. join_tables = { - "rulebook_subscriptions", "rule_suppressions", - "topic_suppressions", "rulebook_exclusions", "rule_systems", + "project_rulebook_subscriptions", "project_rule_suppressions", + "project_topic_suppressions", "project_rulebook_exclusions", + "rule_systems", } covered = set(_column_guard_targets()) | join_tables assert set(backup._BACKED_UP) - covered == set()