Private
Public Access
conductor(chronology): Phase 9 completeness check passed — diff is empty (FR6)
This commit is contained in:
@@ -0,0 +1,31 @@
|
|||||||
|
"""Phase 9 completeness check: folder set vs row set diff."""
|
||||||
|
from __future__ import annotations
|
||||||
|
import sys
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
|
sys.path.insert(0, str(Path(__file__).resolve().parent.parent.parent))
|
||||||
|
from scripts.audit.generate_chronology import walk_track_folders # noqa: E402
|
||||||
|
|
||||||
|
folders: set[str] = set()
|
||||||
|
for parent in (Path("conductor/tracks"), Path("conductor/archive")):
|
||||||
|
if parent.is_dir():
|
||||||
|
for child in parent.iterdir():
|
||||||
|
if child.is_dir():
|
||||||
|
folders.add(child.name)
|
||||||
|
|
||||||
|
rows = walk_track_folders(Path("conductor"))
|
||||||
|
row_ids = {r["track_id"] for r in rows}
|
||||||
|
|
||||||
|
missing_folders = folders - row_ids
|
||||||
|
extra_ids = row_ids - folders
|
||||||
|
|
||||||
|
print(f"Total folders: {len(folders)}")
|
||||||
|
print(f"Total row IDs in chronology.md: {len(row_ids)}")
|
||||||
|
print(f"Folders without rows: {len(missing_folders)}")
|
||||||
|
if missing_folders:
|
||||||
|
for f in sorted(missing_folders):
|
||||||
|
print(f" MISSING: {f}")
|
||||||
|
print(f"Rows without folders: {len(extra_ids)}")
|
||||||
|
if extra_ids:
|
||||||
|
for x in sorted(extra_ids):
|
||||||
|
print(f" EXTRA: {x}")
|
||||||
Reference in New Issue
Block a user