Skip to content

fix(projection): drop 3.3 rendered size from the legacy html asset - #3450

Merged
bokelley merged 1 commit into
mainfrom
fix/legacy-html-rendered-size-3436
Oct 26, 2026
Merged

bokelley merged 1 commit into
mainfrom
fix/legacy-html-rendered-size-3436

Conversation

@bokelley

Copy link
Copy Markdown
Contributor

Closes #3436. Follows adcontextprotocol/adcp#8339 (vectors from adcontextprotocol/adcp#8357).

What

When SDK 17 projects a canonical inline-markup display_tag creative onto an HTML-markup legacy format (display_html / display_WxH_html), the legacy asset is now { asset_type: 'html', content }, plus provenance if the asset has it. projectInlineMarkupToLegacyHtml no longer spreads renderedSizeFields(asset), so the asset's width, height and sizes are not copied. The AdCP vector inline-markup-selects-the-exact-sized-legacy-ref now matches exactly.

The maintainers chose option 1 from the issue: the SDK drops the fields, and the spec vector stays as written.

Why

width/height/sizes on core/assets/html-asset.json are x-added-in: 3.3.0. The legacy wire never reaches a 3.2+ peer. resolveCreativeFormatWireMode and the server's creativeWireModeForRequest put every negotiated 3.2+ release on the canonical wire. So the legacy html asset always goes to a seller that doesn't define these fields.

This was more than a vector mismatch. On a real client call, the version translation (3.3 → 3.1/3.0) found the copied fields and refused the mutation. In 17.0.0-beta.0, syncCreatives and createMediaBuy threw ProtocolFeatureUnsupportedError: ... html_creative.width, ... height require AdCP 3.3 for every sized inline-markup creative sent to a 3.0 or 3.1 seller. The error told the buyer to remove the size, which is the field that picks the display_WxH_html ref.

Version-awareness

  • Sellers before 3.2 (legacy wire): the size still selects the legacy ref, from format_parameters first and then the asset's rendered size, but it is not emitted as asset fields. The display_WxH_html ref carries the size.
  • Sellers on 3.2 or later (canonical wire): this change doesn't touch them. A 3.3 seller gets the display_tag with width/height as sent. That is tested end to end.
  • Reverse direction: the canonical read of a legacy html_creative doesn't have this leak. Its target is the SDK's 3.3 surface, where display_tag defines these fields. It only moves the asset's own width/height/sizes and invents none from the format ref. Both behaviours are now pinned by a test.

Tests

New test/lib/creative-delivery-legacy-html-size.test.js, plus a client-level pathway block in test/lib/version-translation.test.js. Fail before the fix (7):

  • the spec vector, with an exact deepEqual of the whole projected creative and a check that the input is not mutated
  • sizes dropped as well
  • a sized creative on the unsized display_html ref
  • provenance, other assets and creative-level fields carried unchanged (whole-object deepEqual)
  • sync_creatives / create_media_buy / update_media_buy projections emit the same asset
  • client syncCreatives + createMediaBuy against a 3.0 seller and a 3.1 seller with canonical_creatives: false: each sends the vector asset at the negotiated release with no version_downgrade_fields_dropped drift (before the fix, both threw ProtocolFeatureUnsupportedError)

Guards that pass before and after: selection by asset size and by format_parameters for each sized ref, format_parameters precedence over the asset size, the rendered_size_unproven / no_size_match vectors still failing closed, the unsized vector, a 3.3 seller keeping width/height on the canonical display_tag (client level), and the reverse-direction read.

I updated five existing assertions in creative-delivery-most-constrained.test.js that had pinned the copied fields.

Local: 744/744 across the creative-delivery, projection, wire-mode, version-translation and canonical suites, and the full test:node:fast suite (see CI).

Not changed / out of scope

  • A legacy creative the buyer writes themselves (format_id plus an html asset with 3.3 width/height) is still passed through unchanged on the legacy wire, and the version translation refuses those buyer-authored fields as before.
  • A 3.2 seller on the canonical wire still has a sized display_tag refused by the version translation, because display_tag width/height are also 3.3 fields. That is the existing DR-0033 policy for fields the buyer writes, not this projection. I'm noting it here as a possible follow-up.

Backport

None. The _html → display_tag inline-markup projection is new in the SDK 17 major. 16.x (AdCP 3.2.7) and 15.9.x don't have projectInlineMarkupToLegacyHtml or any 3.3 rendered-size fields.

Changeset: patch. This fixes behaviour shipped in the 17 beta, with no API change. I also updated the HTML-markup section of docs/migration-16-to-17.md.

🤖 Generated with Claude Code

Projecting a canonical inline-markup display_tag onto display_html or
display_WxH_html copied the asset's width, height and sizes onto the
legacy html asset. Those are AdCP 3.3 fields, and the legacy wire only
serves sellers before 3.2, so the version translation refused them and
sized inline-markup creatives could not reach a 3.0 or 3.1 seller.

The size still selects the sized legacy ref, which carries it. The
canonical wire and canonical reads of legacy html are unchanged.

Closes #3436

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

@aao-secretariat aao-secretariat Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ladon verdict: Approve

Approve — clean, tightly-scoped bug fix with no blocking or medium findings.

Checked:

  • Removal of AdCP 3.3 rendered dimensions (width/height/sizes) from the legacy html asset in projectInlineMarkupToLegacyHtml (creative-delivery.ts:1304). These fields are 3.3-only and the legacy wire serves pre-3.2 sellers, so they must not be projected onto the legacy shape.
  • Witness-not-translator compliance: read direction (:1347) correctly retained, invents no size from the ref, no fabrication at the seam.
  • DR-0033 pathway: droppable projection — size survives via the sized legacy ref, nothing identity-bearing (spend/targeting/caps/account identity) lost, so dropping is in-bounds and does not require refusal.
  • Changeset present and patch-level, appropriate for a projection-shape bug fix in beta pre-mode.
  • Test coverage added in new test file and version-translation.test.js.

Decision table: no critical/high/medium findings; gated_paths false; high_risk false; no team gate. Falls through to row 9 → approve. (review_decision is REVIEW_REQUIRED, but gated_paths is false so row 2 does not fire.)

@bokelley
bokelley merged commit 023d4f6 into main Oct 26, 2026
45 checks passed
@bokelley
bokelley deleted the fix/legacy-html-rendered-size-3436 branch October 26, 2026 03:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Legacy HTML projection adds 3.3 rendered width/height to html_creative; AdCP vector expects only content

1 participant