Rework visual intake static HTML delivery - #8
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 216abd6632
ℹ️ 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".
| "visual_diffs": { | ||
| "type": "array", | ||
| "items": { "$ref": "#/$defs/visual_diff_record" } |
There was a problem hiding this comment.
Require visual diff records before passing
When a delivery writes visual_diffs: [], the schema accepts it and the validator's visual-diff loop has nothing to inspect, so a report with ready_gate: PASS can pass without any source-vs-screenshot comparison. The static HTML readiness settings require visual diff evidence or an explicit STATIC_HTML_VISUAL_DIFF_BLOCKED blocker, so this should require at least one diff record or emit a blocker when the list is empty.
Useful? React with 👍 / 👎.
| operation_ids = { | ||
| str(operation.get("id")) | ||
| for operation in report.get("operations", []) | ||
| if isinstance(operation, dict) and operation.get("id") | ||
| } |
There was a problem hiding this comment.
Enforce IR operation coverage in the report
When interaction-model.yaml contains a source-backed operation but render-replay-report.yaml omits it (and leaves the component operation_refs empty), operation_ids is built only from the report and nothing compares it back to the IR, so the delivery can still pass while skipping required operation replay. The validator should compare IR operation IDs against reported operations, or require omitted operations to be explicitly blocked/out of scope.
Useful? React with 👍 / 👎.
| "not": { | ||
| "pattern": "(delivery/index\\.html|screenshots/|visual-diff|diff-output|evidence-packet\\.md)" | ||
| } |
There was a problem hiding this comment.
Reject delivery self-references as source evidence
Because render-replay-report.yaml lives inside delivery/, self-references usually look like index.html#... or assets/..., but this pattern only rejects delivery/index.html plus screenshots/diffs/evidence packets. That lets report source_refs cite the generated HTML or copied assets as if they were source evidence, undermining the source-backed boundary; reject bare index.html and delivery asset paths too.
Useful? React with 👍 / 👎.
Summary
Impact
This is a breaking reset of the visual intake delivery path. The final visual artifact is now
specs/<feature>/intake/visual-design/delivery/index.html, validated byscripts/python/validate_static_html_delivery.pyandtemplates/schemas/static-html-delivery.schema.json.Validation
python -m py_compile scripts/python/validate_static_html_delivery.pypython -m pytest -q tests/test_extension_contract.py::test_static_html_delivery_validator_passes_complete_minimal_bundle tests/test_extension_contract.py::test_static_html_delivery_validator_blocks_incomplete_deliverypython -m pytest -q->71 passedNotes
Untracked
job-*.log.txtfiles existed locally and were intentionally not staged or included.