From ba830e9d128a676d3f45167b9b55dca3f9dbcc68 Mon Sep 17 00:00:00 2001 From: Gadi Evron Date: Thu, 28 May 2026 12:48:27 -0700 Subject: [PATCH] docs(validate_dataset_schema): cite experiment.py analyze_unit() instead of drifting line numbers Two comments in validate_unit() cited hardcoded experiment.py line numbers ("lines 186-196", "line 192") that had drifted: experiment.py:186-196 is now load_application_context(), unrelated to unit.code/files_included. The actual code/files_included handling lives in experiment.py analyze_unit(). Replace the brittle line-number citations with the stable function-name anchor so they cannot re-drift. Doc/comment-only: no behavioral change, no regression test. Verified: 0 residual "experiment.py lines N" citations remain; experiment.py analyze_unit() handles code_field + files_included; ruff clean (venv py3.11). Co-Authored-By: Claude Opus 4.7 (1M context) --- libs/openant-core/validate_dataset_schema.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/openant-core/validate_dataset_schema.py b/libs/openant-core/validate_dataset_schema.py index 7f65a7c..8ede007 100755 --- a/libs/openant-core/validate_dataset_schema.py +++ b/libs/openant-core/validate_dataset_schema.py @@ -18,7 +18,7 @@ def validate_unit(unit, index): if not unit.get("id"): errors.append(f"Unit {index}: missing 'id'") - # 2. Check unit.code structure (experiment.py lines 186-196) + # 2. Check unit.code structure (built by experiment.py analyze_unit()) code_field = unit.get("code", {}) if not isinstance(code_field, dict): errors.append(f"Unit {index}: 'code' must be dict, got {type(code_field)}") @@ -43,7 +43,7 @@ def validate_unit(unit, index): elif not isinstance(primary_origin.get(deps_inlined_key), bool): errors.append(f"Unit {index}: 'code.primary_origin.deps_inlined' must be bool") - # 6. CRITICAL: Check files_included (experiment.py line 192) + # 6. CRITICAL: Check files_included (set by experiment.py analyze_unit()) if "files_included" not in primary_origin: errors.append(f"Unit {index}: MISSING 'code.primary_origin.files_included'") elif not isinstance(primary_origin.get("files_included"), list):