STRA-338 size: large inline modules of 15 engine-crate files move to files (extract_modules.py now emits #[path] only for files that are themselves loaded through #[path]); test lists identical (1793). Ratchets raised with reason: path-include +3 cuda-driver, +4 engine, +7 model-format... are the child declarations of files that sit under a #[path]-loaded parent (their children cannot be found otherwise); the follow-up that removes them is turning those parents into directory modules

This commit is contained in:
Pavlo Ratushnyi
2026-11-06 12:53:35 +01:00
parent 7a752b6d92
commit a9d80333b4
58 changed files with 7709 additions and 7568 deletions
+2 -1
View File
@@ -97,7 +97,8 @@ def plan_test_split(text, target, stem, explicit_dir=None, reserved=()):
"""(new parent text, {child name: child text}), or None when there is nothing worth moving."""
items = parse_items(text)
runs = chunks_of(text, items, target)
if len(runs) < 2 and not (runs and lines_of(text) > 400):
# one test fn per file cannot be made smaller by moving it into a module of its own
if len(runs) < 2 and (not runs or len(runs[0]) < 2):
return None
used = set(reserved) | {item.name for item in items if item.kind != "fn"} # a module and a fn live in different namespaces
children = {}