Restrict holdout overlap check to holdout vs dev/full only

dev and full are allowed to share files — only holdout must be strictly
isolated. When creating dev or full, only compare against holdout.manifest;
when creating holdout, compare against all other manifests in the dir.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-26 11:24:05 +02:00
parent f56a45690d
commit caaf3c6102
2 changed files with 22 additions and 1 deletions
+7 -1
View File
@@ -263,7 +263,13 @@ def check_holdout_overlap(
new_set = set(resolved_new_files)
overlaps: list[tuple[str, Path]] = []
for existing in sorted(manifest_dir.glob("*.manifest")):
# When creating holdout, check against all other manifests (dev, full, …).
# When creating dev/full, only check against holdout — dev vs full overlap is allowed.
if output_resolved.name == "holdout.manifest":
candidates = sorted(manifest_dir.glob("*.manifest"))
else:
candidates = [holdout_path]
for existing in candidates:
if existing.resolve() == output_resolved:
continue
try: