validation: select the frozen DFG manifest without reading the checkout

36ad523 made a manifest file missing from the checkout a 'Source mismatch',
which also broke the tests' manifest-selection helper: it reused
verify_source with hashing neutralised but still read the (renamed) files.
run_refined_dfg.source_manifest(collision, observation_mode) now owns the
frozen-manifest selection; verify_source uses it, then verifies the
checkout. The test helper calls source_manifest directly; source identity
stays owned by test_source_pin. Same errors, manifests and pins.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Claude
2026-10-26 22:20:21 +00:00
co-authored by Claude Opus 5.5
parent 36ad523662
commit a0700ab370
2 changed files with 12 additions and 22 deletions
+9 -4
View File
@@ -281,16 +281,21 @@ def host_geometry(source, h, collision="SRT", jet_scenario="none", placement="wi
return cfg, pair, body, host
def verify_source(source, collision="SRT", observation_mode="last_base_step", jet_scenario="none", observe_cv=False):
def source_manifest(collision="SRT", observation_mode="last_base_step"):
"""The frozen historical manifest for this collision/observation mode (no checkout read)."""
if collision not in ("SRT", "MRT"):
raise ValueError("Matched collision must be SRT or MRT")
if observation_mode not in ("last_base_step", "window"):
raise ValueError("Unknown refined observation mode")
if observe_cv and jet_scenario == "none":
raise ValueError("--observe-cv requires an explicit public Jet scenario")
name = ("source_manifest_window.json" if observation_mode == "window" else
"source_manifest.json" if collision == "SRT" else "source_manifest_mrt.json")
expected = json.loads((HERE / "data/refined_dfg" / name).read_text())
return json.loads((HERE / "data/refined_dfg" / name).read_text())
def verify_source(source, collision="SRT", observation_mode="last_base_step", jet_scenario="none", observe_cv=False):
expected = source_manifest(collision, observation_mode)
if observe_cv and jet_scenario == "none":
raise ValueError("--observe-cv requires an explicit public Jet scenario")
if jet_scenario != "none":
if collision != "MRT" or observation_mode != "window":
raise ValueError("Public Jet scenarios require MRT and --exchange-window")