This commit is contained in:
@@ -139,6 +139,12 @@ jobs:
|
|||||||
evidence/
|
evidence/
|
||||||
if-no-files-found: ignore
|
if-no-files-found: ignore
|
||||||
|
|
||||||
|
- name: Verify evidence manifest
|
||||||
|
if: always()
|
||||||
|
run: |
|
||||||
|
set -e
|
||||||
|
python3 scripts/verify_evidence_manifest.py evidence
|
||||||
|
|
||||||
- name: Browser E2E summary
|
- name: Browser E2E summary
|
||||||
if: always()
|
if: always()
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
@@ -0,0 +1,37 @@
|
|||||||
|
from __future__ import annotations
|
||||||
|
|
||||||
|
import json
|
||||||
|
from pathlib import Path
|
||||||
|
import sys
|
||||||
|
|
||||||
|
ROOT = Path(__file__).resolve().parents[1]
|
||||||
|
EVIDENCE_ROOT = Path(sys.argv[1]) if len(sys.argv) > 1 else ROOT / "evidence"
|
||||||
|
MANIFEST = EVIDENCE_ROOT / "manifest.jsonl"
|
||||||
|
|
||||||
|
|
||||||
|
def main() -> int:
|
||||||
|
print(f"evidence_root: {EVIDENCE_ROOT}")
|
||||||
|
if not MANIFEST.exists():
|
||||||
|
print(f"ERROR: manifest missing: {MANIFEST}")
|
||||||
|
return 1
|
||||||
|
|
||||||
|
lines = [line for line in MANIFEST.read_text(encoding="utf-8").splitlines() if line.strip()]
|
||||||
|
print(f"manifest_entries: {len(lines)}")
|
||||||
|
if not lines:
|
||||||
|
print("ERROR: manifest is empty")
|
||||||
|
return 1
|
||||||
|
|
||||||
|
for idx, line in enumerate(lines[:5], start=1):
|
||||||
|
record = json.loads(line)
|
||||||
|
for key in ("screenshotPath", "domPath", "urlPath"):
|
||||||
|
path = Path(record[key])
|
||||||
|
if not path.exists():
|
||||||
|
print(f"ERROR: missing {key} for entry {idx}: {path}")
|
||||||
|
return 1
|
||||||
|
print(f"OK: entry {idx} -> {record['label']}")
|
||||||
|
|
||||||
|
return 0
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
raise SystemExit(main())
|
||||||
Reference in New Issue
Block a user