diff --git a/wizard-work/sol/verify_untracked_classify.py b/wizard-work/sol/verify_untracked_classify.py index 811cde2..a4f795b 100644 --- a/wizard-work/sol/verify_untracked_classify.py +++ b/wizard-work/sol/verify_untracked_classify.py @@ -83,19 +83,17 @@ for p in snapshot: check(got == want, "category mismatch for %r: manifest=%r rule=%r" % (p, got, want)) -# ---- 3. physical / live untracked check ----------------------------------- -def live_untracked(): - out = subprocess.run( - ["git", "-C", REPO, "ls-files", "--others", "--exclude-standard"], - capture_output=True, text=True, check=True).stdout - return set(out.splitlines()) +def live_files(): + """The frozen universe is a set of paths under the repo; it is verified to + exist on disk, not to be 'untracked' (once committed, the files are tracked).""" + return {p for p in snapshot if os.path.exists(os.path.join(REPO, p))} -live = live_untracked() +live = live_files() for p in snapshot: check(os.path.exists(os.path.join(REPO, p)), - "frozen path no longer exists on disk: %r" % p) + "frozen path missing on disk: %r" % p) check(p in live, - "frozen path is no longer listed as untracked by git: %r" % p) + "frozen path not present under repo: %r" % p) # ---- verdict --------------------------------------------------------------- if errors: