test: LES a135252 guard tests use the pinned tree, not today's src
Thea135252manifest is historical qualification: it pins the committed corrected tree ata135252. The guard is correct; the four tests used the current working tree as the 'pinned' fixture, so 87c3a31's jets.py change broke them. Fixtures are now materialized froma135252with git; the corrected acceptance, baseline rejection, four tamper rejections and the reversed-header baseline control are unchanged. A new test records that the guard refuses today's src where it differs from the pin. Missing history skips with the reason, or fails when CELERIS_REQUIRE_HISTORY=1 (release gating) via history_unavailable(). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
f626cbcda2
commit
f02355a2b7
2 files changed
+64
-22
No files matched your search
@@ -48,3 +48,23 @@ def historical_tree(repo, commit, prefix="src"):
|
||||
historical_sha256(repo, commit, [])
|
||||
return subprocess.check_output(["git", "-C", str(repo), "ls-tree", "-r", "--name-only",
|
||||
commit, "--", prefix], text=True).splitlines()
|
||||
|
||||
|
||||
def historical_files(repo, commit, paths, dest):
|
||||
"""Write each path as stored in `commit` under `dest` (HistoryUnavailable if missing)."""
|
||||
from pathlib import Path
|
||||
historical_sha256(repo, commit, [])
|
||||
for path in paths:
|
||||
target = Path(dest) / path
|
||||
target.parent.mkdir(parents=True, exist_ok=True)
|
||||
target.write_bytes(subprocess.run(["git", "-C", str(repo), "show", f"{commit}:{path}"],
|
||||
check=True, capture_output=True).stdout)
|
||||
|
||||
|
||||
def history_unavailable(testcase, error):
|
||||
"""Skip with the reason, or fail when CELERIS_REQUIRE_HISTORY=1 (release gating)."""
|
||||
import os
|
||||
message = f"historical integrity NOT checked: {error}"
|
||||
if os.environ.get("CELERIS_REQUIRE_HISTORY") == "1":
|
||||
raise AssertionError(message)
|
||||
testcase.skipTest(message)
|
||||
Reference in new issue
Block a user