Lead with the real SFTGuard report viewer - #9
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c43251bb29
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| "source_artifact": EVIDENCE.relative_to(ROOT).as_posix(), | ||
| "source_artifact_sha256": _sha256(EVIDENCE), | ||
| "viewer_fixture": "default checked-in confirmatory evidence", | ||
| "capture": OUTPUT.relative_to(ROOT).as_posix(), | ||
| "capture_sha256": _sha256(OUTPUT), |
There was a problem hiding this comment.
Include viewer inputs in the capture receipt
When any web/src file, stylesheet, or web dependency changes without recapturing the PNG, the Python job's “Verify evidence-derived README graphic” step still passes: _check() reconstructs this receipt using only the unchanged evidence and PNG hashes, so it has no dependency on the viewer that produced the image. This allows the README's claimed current viewer screenshot to drift indefinitely from the checked-in application; record a digest of the relevant viewer/build inputs and validate it here.
Useful? React with 👍 / 👎.
| if not skip_build: | ||
| subprocess.run([_npm(), "run", "build"], cwd=WEB, check=True) | ||
| if not (DIST / "index.html").is_file(): | ||
| raise SystemExit("web/dist is missing; run without --skip-build") |
There was a problem hiding this comment.
Verify the reused bundle before attributing its capture
When --skip-build is used after the evidence or viewer sources have changed, an ignored web/dist from an earlier build is captured unchanged, but the newly written receipt hashes the current evidence file and labels the result as the default checked-in evidence. The subsequent --check then accepts this falsely attributed screenshot, so either remove this shortcut or verify that the reused bundle was built from the current artifact and viewer inputs.
Useful? React with 👍 / 👎.
Replaces the poster-style opening graphic with the actual browser-local report viewer. Adds a fixed-viewport capture script and receipt that bind the PNG to the sealed confirmatory artifact; the existing evidence matrix remains in the evidence section.\n\nVerified locally: 64 Python tests, 11 web tests, lint, format, build, evidence replay, asset verification, and secret scan.