fix(phase-32): T2c (1) — split_indicator's population is derived from the yamls (was a stale stored 213-name list; tools-health said "213 OK of 213" over 218 binaries); R32 denominator assertion

This commit is contained in:
Drew T
2026-09-05 00:08:44 -06:00
parent 6853c0c341
commit 8b2bbff831
2 changed files with 14 additions and 5 deletions
+13 -5
View File
@@ -297,12 +297,20 @@ if __name__ == '__main__':
a = ap.parse_args()
if a.self_test:
sys.exit(self_test())
bins = [a.binary] if a.binary else \
(open('.run/S70_bins_sorted.txt').read().split()
if os.path.exists('.run/S70_bins_sorted.txt')
else ['main'] + sorted(os.path.basename(p)[len('splat.'):-len('.yaml')]
# THE POPULATION IS DERIVED FROM THE YAMLS (R33/R36; P32 T2c). `.run/S70_bins_sorted.txt` used to BE the
# population when present — a stored list that went stale the moment a binary was onboarded (R51): tools-health
# printed "213 OK of 213" over a 218-binary fleet and nobody could tell. It is now an ORDER hint only; every
# yaml-derived binary it does not name is appended, and the denominator is asserted (R32).
derived = ['main'] + sorted(os.path.basename(p)[len('splat.'):-len('.yaml')]
for p in glob.glob('config/splat.*.yaml')
if 'us.exe' not in p and 'template' not in p))
if 'us.exe' not in p and 'template' not in p)
if a.binary:
bins = [a.binary]
else:
order = open('.run/S70_bins_sorted.txt').read().split() if os.path.exists('.run/S70_bins_sorted.txt') else []
known = set(derived)
bins = [b for b in order if b in known] + [b for b in derived if b not in set(order)]
assert sorted(bins) == sorted(derived), "split_indicator: population != yaml-derived set (R32)"
bad = 0
for b in bins:
st, lines = check(b)