|
12 | 12 | import csv |
13 | 13 | import hashlib |
14 | 14 | import json |
| 15 | +import os |
15 | 16 | import re |
16 | 17 | import subprocess |
17 | 18 | import zipfile |
|
256 | 257 | "schema_version": "review-snapshot-v1", |
257 | 258 | "snapshot_kind": "local_review_snapshot", |
258 | 259 | "scope": "paper_release_packet_inputs_only", |
259 | | - "generator_command": "python -X utf8 scripts/build_paper_assets.py", |
| 260 | + "generator_command": "python -X utf8 $env:DIFFAUDIT_EVIDENCE_PAPER_DIR\\scripts\\build_paper_assets.py", |
260 | 261 | "snapshot_role": "local-review-packet-identity", |
261 | 262 | } |
262 | 263 | REVIEW_SNAPSHOT_REQUIRED_BOUNDARY_PATTERNS = [ |
@@ -1163,7 +1164,7 @@ def validate_review_snapshot_manifest(paper: Path, repo_root: Path, manifest: di |
1163 | 1164 |
|
1164 | 1165 | require(first.get("repo_head") == run_text(["git", "rev-parse", "HEAD"], repo_root).strip(), "review snapshot repo_head does not match current HEAD", errors) |
1165 | 1166 | require(first.get("generator_script_sha256") == sha256_file(paper / "scripts" / "build_paper_assets.py"), "review snapshot generator_script_sha256 drifted", errors) |
1166 | | - require(first.get("release_checker_script_sha256") == sha256_file(repo_root / "scripts" / "check_paper_release_packet.py"), "review snapshot release_checker_script_sha256 drifted", errors) |
| 1167 | + require(first.get("release_checker_script_sha256") == sha256_file(repo_root / "scripts" / "paper" / "check_paper_release_packet.py"), "review snapshot release_checker_script_sha256 drifted", errors) |
1167 | 1168 | require(first.get("asset_manifest_sha256") == sha256_file(paper / "asset_manifest.json"), "review snapshot asset_manifest_sha256 drifted", errors) |
1168 | 1169 | require(first.get("source_provenance_sha256") == sha256_file(provenance_path), "review snapshot source_provenance_sha256 drifted", errors) |
1169 | 1170 | require(first.get("claim_trace_sha256") == sha256_file(paper / "data" / "claim_trace.csv"), "review snapshot claim_trace_sha256 drifted", errors) |
@@ -2228,8 +2229,16 @@ def main() -> None: |
2228 | 2229 | ) |
2229 | 2230 | args = parser.parse_args() |
2230 | 2231 |
|
2231 | | - repo_root = Path(__file__).resolve().parents[1] |
2232 | | - paper = repo_root / "papers" / "diffaudit-evidence-paper" |
| 2232 | + repo_root = Path(__file__).resolve().parents[2] |
| 2233 | + paper_candidates = [] |
| 2234 | + configured_paper = os.environ.get("DIFFAUDIT_EVIDENCE_PAPER_DIR") |
| 2235 | + if configured_paper: |
| 2236 | + paper_candidates.append(Path(configured_paper)) |
| 2237 | + paper_candidates.append(repo_root / "papers" / "diffaudit-evidence-paper") |
| 2238 | + paper = next( |
| 2239 | + (candidate for candidate in paper_candidates if (candidate / "asset_manifest.json").exists()), |
| 2240 | + paper_candidates[0], |
| 2241 | + ) |
2233 | 2242 | errors: list[str] = [] |
2234 | 2243 |
|
2235 | 2244 | manifest = validate_manifest(paper, errors) |
|
0 commit comments