Skip to content

fix: preserve creative slot contracts and composed proposal responses - #3498

Merged
bokelley merged 2 commits into
mainfrom
bokelley/adcp-client-issues-3491-3490
Oct 28, 2026
Merged

bokelley merged 2 commits into
mainfrom
bokelley/adcp-client-issues-3491-3490

Conversation

@bokelley

@bokelley bokelley commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Creative writes could not receive seller legacy format definitions, so a seller negotiating AdCP 3.1 could receive pixel trackers despite declaring legacy URL tracker slots. Proposal response generation also discarded task payloads when the source composed a protocol envelope, then failed to locate the legacy purchase continuation.

  • Pass snapshotted seller format definitions through sync/create/update creative projection, preserving owner matching and downgrade diagnostics.
  • Preserve composed response branches and follow generated aliases/intersections when restoring continuation constraints. Retain submitted task handles and public Zod object helpers.

Validation: 401 focused tests; pinned beta.0 generation/build; the exact #3490 candidate through generation, schema validation, build, and the protocol creative-asset probe (57 Zod shape checks and 157 canonical checks); beta.1 candidate generation/build. Added regression coverage, documentation, and patch changesets. The new client option repairs the existing legacy projection compatibility contract, so it is included as a bug fix.

Fixes #3491
Fixes #3490

Review: Claude DX, protocol, code, and security experts plus independent Codex protocol/code/security reviewers. Addressed the independent findings with regressions for composed merges, malformed continuation domains, and submitted task handles across all proposal response roots.

@bokelley
bokelley marked this pull request as ready for review October 28, 2026 21:14

@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 fix across two independent compatibility-contract bugs with strong fail-closed discipline and good test coverage.

Checked:

  • generate-zod-from-ts.ts — composed-envelope branch fails closed on every drift (overlap check, task_id policy, exact if/then via isDeepStrictEqual) before rewriting .and(→.merge(...).extend({ task_id }); the AST-walker rewrite of postProcessLegacyPurchaseContinuationResponse resolves aliases/unions/intersections/merges with a cyclic guard, fails closed on malformed/ambiguous input, wraps the field initializer (not the shared declaration), and applies edits descending by start so offsets don't corrupt.
  • generate-types.ts materializeProposalResponseBranches distributes root allOf into each oneOf branch and throws on ambiguous submitted task-id contracts.
  • SingleAgentClient.ts — legacyFormatDefinitions deep-cloned via structuredClone and destructured out of taskOptions so it never leaks to the wire; tests assert creativeFormatProjection === undefined and request deep-equality after mutation.

Witness-not-translator contract intact — no mock/fallback injection, no fabricated fields. No new wire field requiring a DR-0033 pathway-back. Both changesets present and patch, defensible as compatibility-contract fixes in beta pre-mode. 348-line fail-closed regression suite plus composed-envelope and tracker-downgrade tests.

Not gated (gated_paths: false), not high-risk, no no-auto-approve team match, no prior decision. No blocking or medium findings → decision table falls through to row 9.

@bokelley
bokelley merged commit a551c67 into main Oct 28, 2026
47 checks passed
@bokelley
bokelley deleted the bokelley/adcp-client-issues-3491-3490 branch October 28, 2026 21:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant