feat(creative): add validated reference preview utilities - #2601
Conversation
There was a problem hiding this comment.
Ladon verdict: Approve
Approve — additive PR extending @adcp/reference-renderers with structured image/image_carousel validation + rendering, a capability-minimal iframe mount helper, and a pure SDK preview-authority selector plus renderer-provenance passthrough.
Checked:
- Fail-closed design (declared-macro-only substitution, HTTPS-only URLs, empty-sandbox iframe) — consistent with witness-not-translator posture.
- Two correct minor changesets present for the
src/lib/**and package changes; type matches wire impact. - Well-tested new branches; validation plan was actually run.
Medium findings (1):
- packages/reference-renderers/structured.js:589 — Retina carousel card images rejected: card media validated with empty params, over-rejecting valid retina (pixel_ratio) card images. A real edge case worth fixing, but a single medium finding with no blocking trigger.
Decision path: no critical/high findings (row 1 n/a); gated_paths false (row 2 n/a); high_risk false (rows 3/5 n/a); the sole medium is a rendering edge case, not data-loss/schema/infra (row 4 n/a); no prior escalation (row 6 n/a); no no-auto-approve team match (row 7 n/a); only 1 medium finding, below the 3-medium threshold (row 8 n/a). Falls through to row 9 → approve.
Note: review_decision is REVIEW_REQUIRED but gated_paths is false, so the hard approval gate (row 2) does not apply.
Medium findings
- packages/reference-renderers/structured.js:589 — Retina carousel card images rejected: card media validated with empty params
There was a problem hiding this comment.
Ladon verdict: Approve
Approve — follow-up pass on the reference-renderers carousel/image work.
The prior medium finding (structured.js:589 — Retina carousel card images rejected because card media was validated with empty params) is resolved: imageDimensions now accepts a useAssetPixelRatio option that honors the asset's own pixel_ratio and skips the empty-params CONSTRAINT_VIOLATION, while negative pixel_ratio and card aspect-ratio conformance stay enforced. New tests cover Retina density, non-square dimensions, landing-page navigation fallback, and with-copy layout; navigation fallback is consistent across index.js and structured.js. Changesets present for the src/lib and reference-renderers changes.
No new findings in this run. No blocking findings, no escalation triggers (gated_paths false, high_risk false, no team gate), and fewer than three medium findings. Net improvement over the prior approve — falls through to row 9.
Summary
@adcp/reference-rendererspackage with strict structured preparation and rendering for canonicalimageandimage_carouselmanifestsProtocol relationship
This complements adcontextprotocol/adcp#6653. The registry remains metadata-only: it points at exact package versions/exports and never serves executable renderer code. This package does not fetch a registry, dynamically load code, or execute creative-provided scripts.
Protocol-generated preview metadata and discovery types should be synced in the normal SDK schema update after #6653 merges and is published; this PR deliberately does not hand-edit generated types.
Validation
npm run buildnpm run typechecknpm run check --workspace=@adcp/reference-renderers: 18 passed; strict publint passednpx changeset status --since=origin/mainThis opens the contribution for review only. It does not publish a package, merge a release, or make the separate community announcement owed by the release.