Recheck immutable benchmark manifest and candidate commit at completion

This commit is contained in:
Digital Drosophila Archive
2026-10-01 14:35:32 +08:00
parent 906e6f17c0
commit 5abb3e6463
@@ -160,6 +160,7 @@ def main(args):
try:
queues_before = idle_queues()
gpu_before = gpu_snapshot(args.uuid)
initial_manifest_pins = {str(p): sha(p) for p in args.manifest}
fixtures, common_identity = load_fixtures(args.manifest)
backend = CudaEligibility(device_index=0)
cp = backend.cp
@@ -177,7 +178,7 @@ def main(args):
assert subprocess.check_output(['git', '-C', str(source), 'status', '--porcelain'], text=True) == '', 'Candidate source worktree dirty'
save(args.output / 'authority.json', dict(device=device, queues_before=queues_before,
candidate_commit=commit, common_full_mapping_identity=common_identity,
fixture_manifests={str(p): sha(p) for p in args.manifest}, repeats=20, warmups=3,
fixture_manifests=initial_manifest_pins, repeats=20, warmups=3,
all_source_files={p.name: sha(p) for p in sorted(source.iterdir()) if p.is_file()},
scope='eligibility/delta replay only; no brain, training, or installation',
original_experiment_resumed=False, created_utc=datetime.now(timezone.utc).isoformat()))
@@ -226,9 +227,12 @@ def main(args):
print(json.dumps(dict(fixture=f_id, exact=True,
median_ms=1000 * report['summaries']['replay_wall_including_preparation_and_comparison_seconds']['median'])), flush=True)
# Recheck original exported files at the end, not just at read time.
assert initial_manifest_pins == {str(p): sha(p) for p in args.manifest}, 'Fixture manifest changed'
load_fixtures(args.manifest)
rejections = check_rejections(args.manifest, backend, fixtures[0]['rule'])
save(args.output / 'invalid-input-rejections.json', rejections)
assert commit == subprocess.check_output(['git', '-C', str(source), 'rev-parse', 'HEAD'], text=True).strip()
assert subprocess.check_output(['git', '-C', str(source), 'status', '--porcelain'], text=True) == ''
result = dict(status='PASS-ELIGIBILITY-UPDATE-REPLAY-EQUIVALENCE', fixtures=len(reports),
device=device, candidate_commit=commit, all_fixture_repeats_bitwise_exact=True,
observed_cuda_pool_reserved_peak_bytes=peak_reserved, gpu_after=gpu_snapshot(args.uuid),