From 3642397f6372700dfdc738711d0dbcfb48375a85 Mon Sep 17 00:00:00 2001 From: npeter83 Date: Sun, 4 Oct 2026 21:50:48 +0200 Subject: [PATCH] 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. --- scripts/audit_metrics.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/audit_metrics.py b/scripts/audit_metrics.py index 95a1aa2f..f7bc80ce 100644 --- a/scripts/audit_metrics.py +++ b/scripts/audit_metrics.py @@ -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"),