From dcc82ed781dc5a2b99b6da66cd6e6ab7651e9ac4 Mon Sep 17 00:00:00 2001 From: Ed_ Date: Fri, 26 Jun 2026 14:18:34 -0400 Subject: [PATCH] fix(audit): use LEGACY_PRIVATE_NAMES + LEGACY_PUBLIC_NAMES in audit_no_models_config_io Per post_module_taxonomy_de_cruft_20260627 Phase 0a (FR1). The audit script's find_violations() function iterated over 'LEGACY_NAMES' but only LEGACY_PRIVATE_NAMES + LEGACY_PUBLIC_NAMES were defined (the single LEGACY_NAMES was split into two in module_taxonomy_refactor Phase 3b but the function reference wasn't updated). This caused a NameError that crashed the audit with --strict mode. The spec claimed the bug was in scripts/generate_type_registry.py but that was a misdiagnosis. generate_type_registry.py works correctly (verified: 'Registry in sync (29 files checked)'). The actual bug was in audit_no_models_config_io.py. This commit: - Updates line 95: 'for pattern, name in LEGACY_NAMES:' -> 'for pattern, name in LEGACY_PRIVATE_NAMES + LEGACY_PUBLIC_NAMES:' - The function now iterates over both legacy name lists (private + public), matching the actual variables defined in the file. Verification: VC3 (audit_no_models_config_io passes --strict) uv run python scripts/audit_no_models_config_io.py --strict # Output: 'OK - no violations found.' --- scripts/audit_no_models_config_io.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/audit_no_models_config_io.py b/scripts/audit_no_models_config_io.py index 598e9032..1dfc85d2 100644 --- a/scripts/audit_no_models_config_io.py +++ b/scripts/audit_no_models_config_io.py @@ -92,7 +92,7 @@ def find_violations() -> list[dict[str, object]]: "text": line.rstrip(), "severity": "error", }) - for pattern, name in LEGACY_NAMES: + for pattern, name in LEGACY_PRIVATE_NAMES + LEGACY_PUBLIC_NAMES: if pattern.search(line): violations.append({ "file": path,