fix(tooling): audit_metrics counts the demo footprint by the banned word

Its pattern also matched "demote" and the Hungarian "Demokratikus", so
the footprint read 5 after the demo was gone (and 56, not 53, in the S1
baseline). It now uses the removedFeatures contract test's pattern.
This commit is contained in:
2026-10-05 00:19:38 +02:00
parent 6d8b7be6d8
commit 3642397f63
+2 -1
View File
@@ -144,7 +144,8 @@ def _footprint(
) -> dict[str, int]:
"""Files that still mention a feature marked for removal: 0 once it is gone."""
patterns = {
"demo_files": re.compile(r"\bdemo|isDemo|is_demo", re.IGNORECASE),
# the word removedFeatures.contract.test.ts bans: not "demote", not "Demokratikus"
"demo_files": re.compile(r"demo(?!t(e|ion)|kr)", re.IGNORECASE),
"chat_files": re.compile(r"\bchat\b|\bmessages?\.py|\bChat[A-Z]|message_keys"),
# the public form, not the admin's access-request queue (that stays)
"access_request_form_files": re.compile(r"request[-_]access|requestAccess|AccessRequestIn"),