test: tighten historical-pin checks per review of 941eb28b
- test_refined_dfg::test_source_pin runs its mismatch negative controls first (now including window mode) so missing history cannot skip them. - test_re100: renamed to test_manifest_matches_its_pinned_commit, plus an explicit record that today's src differs from the pin. - Structural manifest checks run before any history-dependent check. - Real tamper test: a flipped digest raises via verify_manifest, and a path absent at the commit raises ValueError. - A blobless clone (tree present, blob missing) is reported as unavailable history, not as a missing path. - All history skips go through history_unavailable(): fatal when CELERIS_REQUIRE_HISTORY=1. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
f02355a2b7
commit
8064834c37
6 files changed
+72
-37
No files matched your search
@@ -223,12 +223,11 @@ def verify(repo):
|
||||
|
||||
def verify_historical(repo):
|
||||
"""The pinned manifest describes the PIN tree (read with git, not the working tree)."""
|
||||
from source_provenance import historical_sha256
|
||||
from source_provenance import verify_manifest
|
||||
manifest = json.loads((HERE / "data/jet_circle_cv/source_manifest.json").read_text())
|
||||
if manifest["revision"] != PIN:
|
||||
raise RuntimeError("Wrong pinned revision")
|
||||
if historical_sha256(repo, PIN, manifest["files"]) != manifest["files"]:
|
||||
raise RuntimeError("Historical manifest does not match its pinned revision")
|
||||
verify_manifest(repo, PIN, manifest["files"])
|
||||
return manifest
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user