STRA-338: architecture gate forbids new mechanical file names (impl_*, *_fn, numbered), baseline lists the 964 existing; rustsplit names modules after what they hold

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
Pavlo Ratushnyi
2026-11-08 00:50:17 +01:00
co-authored by Claude Sonnet 5.5
parent 4b04c24981
commit ac60df040f
14 changed files with 1124 additions and 42 deletions
+3 -5
View File
@@ -2,6 +2,7 @@
import re
from .items import parse_items, significant
from .names import distinct
from .lexer import tokenize
from .retarget import INCLUDE, _path_edits, _restricted_visibility_edits
@@ -64,11 +65,8 @@ def topic(items):
def unique(name, used):
candidate, n = name, 2
while candidate in used:
candidate, n = f"{name}_{n}", n + 1
used.add(candidate)
return candidate
"""`name`, or `name` plus a word when it is taken (see `names.distinct`)."""
return distinct(name, used, MAX_NAME)
def remove_ranges(text, ranges):