"""Self-test helper for the test-pass code path: 100 smoke validation crops written as a manifest whose split column says test (scratch folder only).""" import sys from .common import read_manifest, write_tsv rows = read_manifest(sys.argv[1])[:100] hdr = list(rows[0].keys()) write_tsv(sys.argv[2], hdr, [[("test" if h == "split" else r[h]) for h in hdr] for r in rows]) print(len(rows), "rows written with split = test")