diff --git a/.changeset/adjacent-code-3-4.md b/.changeset/adjacent-code-3-4.md
new file mode 100644
index 0000000000..a93aebedc3
--- /dev/null
+++ b/.changeset/adjacent-code-3-4.md
@@ -0,0 +1,5 @@
+---
+"adcontextprotocol": minor
+---
+
+Propose AdCP 3.4 adjacent-code disclosure on products and application-state readback on creative assignments. Add the delivery-affecting `adjacent_code_changed` assignment invalidation while preserving creative approval semantics. Provider references are opaque and seller-scoped. WG approval is pending. Fragment delivery and assembly signing remain a separate proposal.
diff --git a/docs/creative/adjacent-code.mdx b/docs/creative/adjacent-code.mdx
new file mode 100644
index 0000000000..5ea69054f0
--- /dev/null
+++ b/docs/creative/adjacent-code.mdx
@@ -0,0 +1,172 @@
+---
+title: Adjacent code
+description: Product disclosure and assignment readback for seller-side code alongside a buyer creative.
+---
+
+
+Proposed for AdCP 3.4 under [#6700](https://github.com/adcontextprotocol/adcp/issues/6700).
+Working Group approval is pending. This draft follows
+[Bokelley's proposed split](https://github.com/adcontextprotocol/adcp/issues/6700#issuecomment-6921184576).
+Fragment delivery and assembly signing remain a separate proposal, with no release commitment.
+
+
+`adjacent_code` describes seller-side code applied alongside a buyer creative,
+including the seller's own first-party measurement code. It gives buyers a
+product declaration before purchase and a current application snapshot for each
+package–creative assignment. Buyer-supplied assignment `trackers` and code already
+inside the creative remain on their existing surfaces and MUST NOT be included
+in this array.
+
+## Product declaration
+
+In AdCP 3.4, `canonical-product` and `product` MAY carry `adjacent_code[]`.
+When present, it MUST be the complete declaration of adjacent code for the
+product. Omission means undeclared; it MUST NOT be interpreted as no code.
+`[]` explicitly declares no adjacent code.
+
+Each entry contains:
+
+| Field | Meaning |
+| --- | --- |
+| `provider` | An opaque reference scoped to the selling agent. `seller` is reserved for that agent's own first-party code. Other references identify providers without publishing an integration endpoint or global vendor directory. |
+| `purpose` | A buyer-readable description such as `measurement` or `verification`; the vocabulary is open. |
+| `required` | Whether the seller requires the code for delivery. This is an explicit boolean, with no default. |
+
+Provider references MUST remain stable across a seller's product declarations
+and assignment snapshots, and MUST NOT be reused for a different provider.
+They are meaningful only together with the selling agent's identity. A provider
+reference is not a BrandRef, an authentication credential, or a URL to resolve.
+Integration URLs and configuration MUST remain seller-local, including when
+using `ext` or future extension properties.
+
+```json
+{
+ "$schema": "https://adcontextprotocol.org/schemas/latest/core/canonical-product.json",
+ "product_id": "display_homepage",
+ "name": "Homepage display",
+ "adjacent_code": [
+ { "provider": "seller", "purpose": "measurement", "required": true },
+ { "provider": "provider_7", "purpose": "verification", "required": false }
+ ]
+}
+```
+
+Buyers that need this information SHOULD request `adjacent_code` in the product
+`fields` projection. Projection does not imply a negative declaration: a field
+excluded by projection remains unknown. Buyers MUST NOT send the new projection
+value to a seller serving a release before 3.4. The field follows existing
+product feed and cache invalidation rules when its declaration changes.
+
+## Assignment readback
+
+The assignment snapshot is available at:
+
+- `list_creatives.creatives[].assignments.assigned_packages[].adjacent_code`
+- `get_media_buys.media_buys[].packages[].creative_approvals[].adjacent_code`
+
+A seller disclosing adjacent code for a product MUST include the complete array
+on returned assignments for that product. If it exposes both reads, their
+arrays MUST agree for the same relationship and current state. `get_media_buys`
+remains the complete relationship read; `list_creatives` remains a bounded
+reverse projection and retains its existing truncation rules. Omission means
+undeclared, and `[]` reports no adjacent code for this assignment.
+
+Each entry carries the declaration fields plus `position` and `status`.
+`position` is `prepend` or `append` relative to the unchanged buyer creative in
+the seller's delivery representation. Pending or omitted entries report their
+intended position. Array order is not an instruction to the seller and does not
+guarantee browser execution order. Multiple applications of one provider's
+code may appear as separate entries.
+
+| `status` | Meaning |
+| --- | --- |
+| `applied` | The seller has applied the code to this assignment's current delivery representation. |
+| `pending` | Application has not completed. |
+| `omitted` | The code is absent from that representation. Retain the entry so omission is visible. |
+
+For example, this entry can coexist with assignment `approval_status: "approved"`
+and library creative `status: "approved"`:
+
+```json
+{
+ "$schema": "https://adcontextprotocol.org/schemas/latest/core/adjacent-code-application.json",
+ "provider": "seller",
+ "purpose": "measurement",
+ "required": true,
+ "position": "append",
+ "status": "pending"
+}
+```
+
+This snapshot is the seller's assertion about its current delivery
+representation. It does not prove that the code executed in a browser or that
+measurement succeeded. It is not a historical per-impression log. In particular,
+`approval_status_as_of` remains the freshness clock for creative review, not
+for adjacent-code application.
+
+## Delivery and changes after purchase
+
+When any entry is `required: true` and has `status: pending` or `omitted`, the
+seller MUST hold delivery of that assignment. The hold applies both before
+initial delivery and after delivery has begun. It MUST NOT change the creative's
+library status or the assignment's `approval_status`, which describes creative
+review. The per-entry status represents this hold; no new general assignment
+status or approval enum value is introduced.
+
+Optional pending or omitted code does not create this hold. When all required
+entries become `applied`, this particular hold ends; existing approval and
+serving constraints still apply. Other assignments remain subject to their own
+eligibility and existing package-level rules. Sellers MUST NOT erase an
+unavailable required entry or silently downgrade `required` to bypass the hold.
+Retry scheduling, hold deadlines, and vendor failure feedback are seller-local.
+
+After purchase, readback MUST reflect the effective policy and application state
+of the existing assignment. A product declaration describes the current offer;
+changing it does not retrospectively rewrite an assignment's application state.
+A seller changing an existing assignment's effective policy MUST update that
+assignment's readback and apply the delivery rule above. Removing a requirement
+through an authorized policy change can release the hold and is subject to the
+notification rule below.
+
+These fields do not change accepted commercial terms or grant consent to add
+code. Publisher and seller-operator authorization remain prerequisites managed
+outside this buyer-facing contract. Existing commercial agreements continue to
+govern permitted changes; this proposal adds no buyer acceptance token or
+binding commercial-term field. It introduces no new prohibition on legacy
+purchase paths. The same readback rules apply to existing assignments regardless
+of how they were purchased, when the seller serves this 3.4 feature.
+
+## Delivery-affecting invalidation
+
+Sellers supporting the existing `creative.assignment_changed` notification use
+`change_kind: "adjacent_code_changed"` when required adjacent-code state affects
+an assignment's delivery. Publish the updated readback before firing. Apply the
+existing account subscription, authentication, and deduplication rules; this
+change adds no signing profile. Receivers reread `get_media_buys` instead of
+applying state from the invalidation payload.
+
+| Transition | Emit `adjacent_code_changed`? |
+| --- | --- |
+| Required code enters or leaves `pending` | Yes, including recovery to `applied` or transition to `omitted`. |
+| Required code becomes `omitted`, or recovers from `omitted` to `applied` | Yes. |
+| Adding, removing, or changing a requirement blocks or releases the assignment | Yes. |
+| An unrelated configuration or purpose edit; optional code changes state | No. |
+| The seller rereads identical state | No. |
+
+A required entry's pending/omitted transition still fires when another required
+entry also blocks the assignment: buyers need the updated reason for the hold.
+An assignment's initial creation and removal continue to use `assigned` and
+`unassigned`; they do not require a second adjacent-code event for the same
+creation or removal. Creative approval changes retain `approval_changed`.
+
+Subscriptions remain prospective. A buyer establishes its baseline using the
+existing complete-read procedure and can poll when notifications are unsupported.
+The new change kind is introduced in 3.4 and follows the protocol's existing
+unknown-enum tolerance rule; an unknown kind must not be treated as an approval
+outcome. Product and readback fields follow served-release conformance under
+[DR-0024](https://github.com/adcontextprotocol/adcp/blob/main/governance/decisions/DR-0024-responses-conform-to-served-release.md).
+
+The schemas are open for additive extensions under
+[DR-0036](https://github.com/adcontextprotocol/adcp/blob/main/governance/decisions/DR-0036-closed-schemas-stay-closed-within-a-major.md).
+This proposal adds no fragment task, vendor registration API, or assembly
+attestation. Those require separate WG review.
diff --git a/docs/creative/task-reference/list_creatives.mdx b/docs/creative/task-reference/list_creatives.mdx
index a351a03648..53f4d3b099 100644
--- a/docs/creative/task-reference/list_creatives.mdx
+++ b/docs/creative/task-reference/list_creatives.mdx
@@ -321,6 +321,10 @@ To manage one of these creatives, a buyer uses its `creative_id` as-is. See [sel
`platform_id` is the seller's identifier for the creative in its source of truth, the same value `sync_creatives` returns. It lets operators match a creative to the seller's own UI and reports without keeping the sync response. Buyers address creatives by `creative_id`, never by `platform_id`.
+### Adjacent-code readback
+
+Proposed for AdCP 3.4, with WG approval pending: each `assignments.assigned_packages[]` row MAY carry `adjacent_code[]`, mirroring [`get_media_buys`](/docs/media-buy/task-reference/get_media_buys) for the same assignment. Supporting sellers report the complete array, including pending or omitted code. Required code that is not applied holds assignment delivery while creative `status` and assignment `approval_status` retain their review meanings. Omission means undeclared; `[]` explicitly reports none. See [adjacent code](/docs/creative/adjacent-code) for provider scope and notification rules.
+
### Assignment indicators
In AdCP 3.3, sellers advertising `creative.supports_assignment_trackers` MUST return `assignments.assigned_packages[].trackers`: the complete assignment-scoped tracker list, or `[]` when none are attached. Preserve event names, URL templates, order, and duplicate occurrences. The list excludes the creative's own trackers in `assets`; both sets fire on this placement. See [assignment trackers](/docs/creative/task-reference/sync_creatives#assignment-trackers).
diff --git a/docs/media-buy/task-reference/get_media_buys.mdx b/docs/media-buy/task-reference/get_media_buys.mdx
index 7390d4c73e..ca9dd6590a 100644
--- a/docs/media-buy/task-reference/get_media_buys.mdx
+++ b/docs/media-buy/task-reference/get_media_buys.mdx
@@ -260,6 +260,7 @@ been deleted. `ext.streamhaus.ad_set_id` here is a seller-defined extension:
| `trackers` | Added in 3.3. Complete assignment-scoped measurement tracker list, preserving events, URL templates, order, and duplicate occurrences. Supporting sellers MUST return it, using `[]` when none exist. Excludes the creative's own trackers in `assets`; both sets fire. See [assignment trackers](/docs/creative/task-reference/sync_creatives#assignment-trackers). |
| `landing_page_url` | Added in 3.3. Effective serving destination for this creative on this package, including an assignment override. Supporting sellers return the URL (or macro-bearing template) when unique; omit when no destination exists or an unoverridden creative has multiple destinations, whose URLs remain in its creative assets. See [assignment landing pages](/docs/creative/task-reference/sync_creatives#assignment-landing-pages). |
| `installment_refs` | Added in 3.3, experimental (`media_buy.installment_creative_assignment`). The installments this assignment is limited to. Sellers that list the feature return it on every assignment with an installment scope and omit it when the assignment applies to every installment. See [assigning to specific installments](/docs/creative/task-reference/sync_creatives#assigning-to-specific-installments-experimental). |
+| `adjacent_code` | Proposed in 3.4; WG approval pending. Complete current seller-side code application snapshot for this assignment, including `provider`, `purpose`, `required`, `position`, and `status`. Omission means undeclared; `[]` reports none. Required pending or omitted code blocks assignment delivery without changing creative approval. Mirrors [`list_creatives`](/docs/creative/task-reference/list_creatives) readback. See [adjacent code](/docs/creative/adjacent-code). |
| `approval_status` | `pending_review`, `approved`, `partially_approved`, or `rejected` |
| `rejection_reason` | Explanation of rejection (when `approval_status` is `rejected`) |
| `approval_scopes` | Complete publisher/placement outcomes when `approval_status` is `partially_approved` |
diff --git a/docs/media-buy/task-reference/get_products.mdx b/docs/media-buy/task-reference/get_products.mdx
index 5bfa7830f5..ec3d8d6d40 100644
--- a/docs/media-buy/task-reference/get_products.mdx
+++ b/docs/media-buy/task-reference/get_products.mdx
@@ -702,6 +702,10 @@ The `catalog` field uses the same [Catalog](/docs/creative/catalogs) object used
Products in the response include `catalog_types` (what catalog types they support) and `catalog_match` (which items matched).
+## Adjacent-code disclosure
+
+Proposed for AdCP 3.4, with WG approval pending: returned products MAY carry `adjacent_code[]`. Each entry contains an opaque seller-scoped `provider`, a buyer-readable `purpose`, and `required`. Request the field explicitly when using `fields`; omission means undeclared and `[]` explicitly declares none. This disclosure introduces no new restriction on the legacy purchase path. See [adjacent code](/docs/creative/adjacent-code) for assignment readback and delivery holds.
+
## Response
Returns an array of `products` and optionally `proposals`. When the seller's
diff --git a/docs/media-buy/task-reference/list_products.mdx b/docs/media-buy/task-reference/list_products.mdx
index b567d99db2..ae5768ee57 100644
--- a/docs/media-buy/task-reference/list_products.mdx
+++ b/docs/media-buy/task-reference/list_products.mdx
@@ -59,6 +59,10 @@ For scheduled media, request `installments` in `fields` to see which episodes, i
Absence is only meaningful inside a projection that asked for the field: a product that declares `collections` and omits `installments` **in a response that returned `installments` for other products** is run-of-collection. In a projection that never requested `installments`, absence says nothing, so a buyer deciding between "specific slots" and "run-of-collection" requests the field explicitly. See [Installments in the compact lifecycle](/docs/media-buy/product-discovery/collections-and-installments#installments-in-the-compact-lifecycle).
+## Adjacent-code disclosure
+
+Proposed for AdCP 3.4, with WG approval pending: request `adjacent_code` in `fields` to read optional seller-side code declarations. Each entry identifies an opaque seller-scoped provider and purpose, with an explicit `required` policy. Omission means undeclared; `[]` explicitly declares none. This adds no purchase-path restriction or acceptance token. See [adjacent code](/docs/creative/adjacent-code) for assignment readback and changes after purchase.
+
## Response
Every response has an explicit `outcome`:
diff --git a/package.json b/package.json
index e561b224b8..454b5317d6 100644
--- a/package.json
+++ b/package.json
@@ -33,7 +33,7 @@
"verify:schema-discovery": "node scripts/verify-schema-discovery.mjs",
"typecheck": "tsc --project server/tsconfig.json --noEmit && npm run typecheck:fixed-trace-rollout-tests",
"typecheck:fixed-trace-rollout-tests": "node scripts/typecheck-fixed-trace-rollout-tests.mjs",
- "test:schemas": "node tests/schema-validation.test.cjs && node --test tests/dooh-impression-basis.test.cjs tests/reserved-word-enum-replacements.test.cjs tests/account-ref.test.cjs tests/canonical-account-ref.test.cjs tests/image-bleed.test.cjs tests/sync-plans-reserved-names.test.cjs tests/sync-plans-human-review.test.cjs tests/sync-plans-validation-annotations.test.cjs tests/seller-offers-contract.test.cjs tests/service-commitments.test.cjs tests/sync-platform-id.test.cjs tests/assignment-landing-page.test.cjs tests/assignment-trackers.test.cjs tests/assignment-replace.test.cjs tests/assignment-operations-capability.test.cjs tests/outcome-target.test.cjs tests/trusted-match-offer-creative-data.test.cjs tests/accessibility-violation-details.test.cjs tests/portfolio-routing-scope.test.cjs tests/catalog-item-availability-updates.test.cjs tests/catalog-ingestion-capabilities.test.cjs tests/sdk-implementation-metadata.test.cjs tests/seller-optimized-package-controls.test.cjs tests/compact-product-lifecycle-storyboards.test.cjs tests/timezone-resolution-storyboards.test.cjs tests/terminal-package-retention-storyboard.test.cjs tests/total-budget-redistribution-currency.test.cjs tests/dooh-allocation.test.cjs tests/x-added-in-3-3-sweep.test.cjs tests/url-pattern-loosening.test.cjs tests/closed-schema-additions-withdrawn.test.cjs tests/identity-absence-coherence.test.cjs tests/match-keys.test.cjs tests/execution-requirements.test.cjs tests/execution-readiness.test.cjs tests/schema-deprecation-metadata.test.cjs tests/products-only-brief-compatibility.test.cjs tests/async-identity-convergence.test.cjs tests/creative-rotation.test.cjs tests/creative-start-policy.test.cjs tests/canonical-forecast-point-parity.test.cjs tests/creative-revisions.test.cjs tests/creative-live-updates.test.cjs tests/creative-delivery-contracts.test.cjs tests/tracker-execution-contracts.test.cjs tests/tracker-execution-package-integration.test.cjs tests/metric-identity-coherence.test.cjs tests/print-metrics.test.cjs tests/installment-lifecycle-reporting.test.cjs tests/rights-channel-restrictions.test.cjs tests/daypart-time-of-day.test.cjs tests/audience-size-range.test.cjs tests/media-buy-lineage.test.cjs tests/delivery-projection.test.cjs tests/viewable-rate-optimization-goal.test.cjs tests/sort-contract-delivery-reporting.test.cjs tests/time-based-views-contract.test.cjs tests/metric-qualifier-parity.test.cjs tests/collection-mechanism.test.cjs tests/requested-metrics-contract.test.cjs tests/auto-breakdown-negotiation-contract.test.cjs tests/format-delivery-reporting-contract.test.cjs tests/inventory-delivery-reporting-contract.test.cjs tests/property-delivery-conformance.test.cjs tests/lint-schema-enum-drift.test.cjs tests/lint-schema-required-declared.test.cjs tests/format-asset-type-parity.test.cjs tests/canonical-manifest-constructibility.test.cjs tests/synthetic-depiction.test.cjs tests/creative-rendering-authority.test.cjs tests/buyer-reason.test.cjs tests/mutation-outcome.test.cjs tests/error-recovery-vectors.test.cjs tests/reporting-status-contract.test.cjs tests/reporting-reconciliation-fixture.test.cjs tests/reporting-report-definition-vectors.test.cjs tests/reporting-core-fixture.test.cjs tests/reporting-native-version-ref-bounds.test.cjs tests/trust-json-v1.test.cjs tests/refine-proposals-expected-confirmation-at.test.cjs tests/hold-policy.test.cjs tests/hold-policy-vectors.test.cjs tests/canonical-installments.test.cjs tests/withdrawn-to-4-0.test.cjs tests/installment-refinement.test.cjs tests/installment-creative-assignment.test.cjs tests/get-products-deprecated-withdrawals.test.cjs tests/deprecated-task-withdrawals.test.cjs tests/collection-catalog.test.cjs tests/collection-copies-vectors.test.cjs tests/social-distribution-identifiers.test.cjs tests/account-change-record.test.cjs tests/notification-config-payload-view.test.cjs tests/account-requests.test.cjs tests/reporting-subscriptions.test.cjs tests/reporting-subscription-probe.test.cjs tests/reporting-subscription-coverage-vectors.test.cjs tests/reporting-subscription-coverage-properties.test.cjs tests/product-roster-coverage-vectors.test.cjs && npm run test:premium-display-formats && npm run test:geo-region-targeting",
+ "test:schemas": "node tests/schema-validation.test.cjs && node --test tests/dooh-impression-basis.test.cjs tests/reserved-word-enum-replacements.test.cjs tests/account-ref.test.cjs tests/canonical-account-ref.test.cjs tests/image-bleed.test.cjs tests/sync-plans-reserved-names.test.cjs tests/sync-plans-human-review.test.cjs tests/sync-plans-validation-annotations.test.cjs tests/seller-offers-contract.test.cjs tests/service-commitments.test.cjs tests/sync-platform-id.test.cjs tests/assignment-landing-page.test.cjs tests/assignment-trackers.test.cjs tests/adjacent-code.test.cjs tests/assignment-replace.test.cjs tests/assignment-operations-capability.test.cjs tests/outcome-target.test.cjs tests/trusted-match-offer-creative-data.test.cjs tests/accessibility-violation-details.test.cjs tests/portfolio-routing-scope.test.cjs tests/catalog-item-availability-updates.test.cjs tests/catalog-ingestion-capabilities.test.cjs tests/sdk-implementation-metadata.test.cjs tests/seller-optimized-package-controls.test.cjs tests/compact-product-lifecycle-storyboards.test.cjs tests/timezone-resolution-storyboards.test.cjs tests/terminal-package-retention-storyboard.test.cjs tests/total-budget-redistribution-currency.test.cjs tests/dooh-allocation.test.cjs tests/x-added-in-3-3-sweep.test.cjs tests/url-pattern-loosening.test.cjs tests/closed-schema-additions-withdrawn.test.cjs tests/identity-absence-coherence.test.cjs tests/match-keys.test.cjs tests/execution-requirements.test.cjs tests/execution-readiness.test.cjs tests/schema-deprecation-metadata.test.cjs tests/products-only-brief-compatibility.test.cjs tests/async-identity-convergence.test.cjs tests/creative-rotation.test.cjs tests/creative-start-policy.test.cjs tests/canonical-forecast-point-parity.test.cjs tests/creative-revisions.test.cjs tests/creative-live-updates.test.cjs tests/creative-delivery-contracts.test.cjs tests/tracker-execution-contracts.test.cjs tests/tracker-execution-package-integration.test.cjs tests/metric-identity-coherence.test.cjs tests/print-metrics.test.cjs tests/installment-lifecycle-reporting.test.cjs tests/rights-channel-restrictions.test.cjs tests/daypart-time-of-day.test.cjs tests/audience-size-range.test.cjs tests/media-buy-lineage.test.cjs tests/delivery-projection.test.cjs tests/viewable-rate-optimization-goal.test.cjs tests/sort-contract-delivery-reporting.test.cjs tests/time-based-views-contract.test.cjs tests/metric-qualifier-parity.test.cjs tests/collection-mechanism.test.cjs tests/requested-metrics-contract.test.cjs tests/auto-breakdown-negotiation-contract.test.cjs tests/format-delivery-reporting-contract.test.cjs tests/inventory-delivery-reporting-contract.test.cjs tests/property-delivery-conformance.test.cjs tests/lint-schema-enum-drift.test.cjs tests/lint-schema-required-declared.test.cjs tests/format-asset-type-parity.test.cjs tests/canonical-manifest-constructibility.test.cjs tests/synthetic-depiction.test.cjs tests/creative-rendering-authority.test.cjs tests/buyer-reason.test.cjs tests/mutation-outcome.test.cjs tests/error-recovery-vectors.test.cjs tests/reporting-status-contract.test.cjs tests/reporting-reconciliation-fixture.test.cjs tests/reporting-report-definition-vectors.test.cjs tests/reporting-core-fixture.test.cjs tests/reporting-native-version-ref-bounds.test.cjs tests/trust-json-v1.test.cjs tests/refine-proposals-expected-confirmation-at.test.cjs tests/hold-policy.test.cjs tests/hold-policy-vectors.test.cjs tests/canonical-installments.test.cjs tests/withdrawn-to-4-0.test.cjs tests/installment-refinement.test.cjs tests/installment-creative-assignment.test.cjs tests/get-products-deprecated-withdrawals.test.cjs tests/deprecated-task-withdrawals.test.cjs tests/collection-catalog.test.cjs tests/collection-copies-vectors.test.cjs tests/social-distribution-identifiers.test.cjs tests/account-change-record.test.cjs tests/notification-config-payload-view.test.cjs tests/account-requests.test.cjs tests/reporting-subscriptions.test.cjs tests/reporting-subscription-probe.test.cjs tests/reporting-subscription-coverage-vectors.test.cjs tests/reporting-subscription-coverage-properties.test.cjs tests/product-roster-coverage-vectors.test.cjs && npm run test:premium-display-formats && npm run test:geo-region-targeting",
"test:performance-feedback": "node --test --test-force-exit --test-timeout=30000 tests/performance-feedback-contract.test.cjs",
"test:dist-schema-version-ids": "node --test --test-force-exit --test-timeout=30000 tests/dist-schema-version-ids.test.cjs",
"test:examples": "node tests/example-validation-simple.test.cjs && npm run test:tmp-context-merge",
diff --git a/server/tests/unit/training-agent-served-release-fields.test.ts b/server/tests/unit/training-agent-served-release-fields.test.ts
index 67f6215f97..0477ae3aec 100644
--- a/server/tests/unit/training-agent-served-release-fields.test.ts
+++ b/server/tests/unit/training-agent-served-release-fields.test.ts
@@ -14,7 +14,7 @@ const CAPABILITIES = 'protocol/get-adcp-capabilities-response.json';
describe('served-release field gate (#8487)', () => {
beforeAll(() => ensureCreative33SchemaBundle());
- it('withholds the 3.3 canonical-product fields from 3.2, and only fields 3.2 lacks', () => {
+ it('withholds canonical-product fields added after the served release', () => {
const withheld = propertiesAddedAfterRelease('core/canonical-product.json', '3.2');
expect(withheld).toContain('installments');
const bundled = getSchemaDocumentByRef('core/canonical-product.json', '3.2');
@@ -23,7 +23,10 @@ describe('served-release field gate (#8487)', () => {
{ properties?: Record; additionalProperties?: unknown } | undefined;
expect(threeTwo?.additionalProperties).toBe(true);
for (const field of withheld) expect(threeTwo?.properties, field).not.toHaveProperty(field);
- expect(propertiesAddedAfterRelease('core/canonical-product.json', '3.3-beta.1')).toEqual(new Set());
+ // Adjacent-code disclosure starts in 3.4, including for 3.3 prerelease callers.
+ expect(propertiesAddedAfterRelease('core/canonical-product.json', '3.3-beta.1')).toEqual(new Set(['adjacent_code']));
+ expect(propertiesAddedAfterRelease('core/canonical-product.json', '3.3')).toEqual(new Set(['adjacent_code']));
+ expect(propertiesAddedAfterRelease('core/canonical-product.json', '3.4')).toEqual(new Set());
});
it('finds 3.3 fields under objects 3.2 leaves open, and leaves undeclared keys alone', () => {
diff --git a/specs/relationship-scoped-indicators.md b/specs/relationship-scoped-indicators.md
index 5d4681b1d5..8a5fbe48b9 100644
--- a/specs/relationship-scoped-indicators.md
+++ b/specs/relationship-scoped-indicators.md
@@ -115,7 +115,7 @@ Sellers may expose indicators through polling alone. Sellers that declare push s
`supported_indicator_types` does not require `relationship_notifications`. If a seller declares `indicators.changed`, it also declares the indicator catalog; a seller without a catalog may declare `creative.assignment_changed` alone when it can detect assignment or approval changes, including when it is inline-only. A creative-library seller may independently declare the bounded `list_creatives` reverse projection. `get_media_buys` is always the complete repair task. Declared invalidations are signed; the notification capability requires a usable `webhook_signing` block with `supported: true`, `profile`, `algorithms`, and `legacy_hmac_fallback`. Payloads identify the relationship but never carry authoritative indicator or approval state.
-Subscriptions are prospective and do not replay current conditions. After activation/reactivation the buyer establishes a complete baseline through `get_media_buys`, either by enumerating known IDs or by requesting all seven media-buy statuses and following pagination to exhaustion; it does not use `indicator_types`. `indicators.changed` fires for assertion-set changes, evaluation-coverage changes, and deletion of an assignment that retires stored keys. Advancing only `indicators_as_of` does not fire. A material in-place creative update invalidates prior assignment evaluations, emits `change_kind: invalidated`, and omits stale snapshots until reevaluation (or atomically publishes a strictly newer evaluation and fires `updated`). `creative.assignment_changed` fires for assignment addition/removal and assignment approval/reason/scoped-outcome changes. Retried delivery reuses `idempotency_key`; re-emission of the same logical change retains `notification_id`.
+Subscriptions are prospective and do not replay current conditions. After activation/reactivation the buyer establishes a complete baseline through `get_media_buys`, either by enumerating known IDs or by requesting all seven media-buy statuses and following pagination to exhaustion; it does not use `indicator_types`. `indicators.changed` fires for assertion-set changes, evaluation-coverage changes, and deletion of an assignment that retires stored keys. Advancing only `indicators_as_of` does not fire. A material in-place creative update invalidates prior assignment evaluations, emits `change_kind: invalidated`, and omits stale snapshots until reevaluation (or atomically publishes a strictly newer evaluation and fires `updated`). `creative.assignment_changed` fires for assignment addition/removal and assignment approval/reason/scoped-outcome changes. The proposed 3.4 [adjacent-code contract](../docs/creative/adjacent-code.mdx) (WG approval pending) also adds `change_kind: adjacent_code_changed` for required-code pending/omission transitions and policy changes that block or release assignment delivery. Ordinary configuration edits and optional-code changes do not fire it; creative approval state is unchanged. Retried delivery reuses `idempotency_key`; re-emission of the same logical change retains `notification_id`.
## Warning contract
diff --git a/static/schemas/source/core/adjacent-code-application.json b/static/schemas/source/core/adjacent-code-application.json
new file mode 100644
index 0000000000..38829c4005
--- /dev/null
+++ b/static/schemas/source/core/adjacent-code-application.json
@@ -0,0 +1,25 @@
+{
+ "$schema": "http://json-schema.org/draft-07/schema#",
+ "$id": "/schemas/core/adjacent-code-application.json",
+ "title": "Adjacent Code Application",
+ "description": "Seller-reported current application state for code adjacent to one package–creative assignment. An assembly assertion, not independent evidence of browser execution or a per-delivery history.",
+ "x-added-in": "3.4.0",
+ "type": "object",
+ "allOf": [
+ { "$ref": "/schemas/core/adjacent-code.json" }
+ ],
+ "properties": {
+ "position": {
+ "type": "string",
+ "enum": ["prepend", "append"],
+ "description": "Placement relative to the unchanged buyer creative in the seller's delivery representation. For pending or omitted entries, the intended placement. Does not specify ordering among providers or guarantee browser execution order."
+ },
+ "status": {
+ "type": "string",
+ "enum": ["applied", "omitted", "pending"],
+ "description": "applied: seller has applied the code to the assignment's current delivery representation. omitted: code is absent from that representation. pending: application has not completed. A required pending or omitted entry blocks this assignment's delivery; applied alone does not establish that the assignment is otherwise eligible to serve."
+ }
+ },
+ "required": ["position", "status"],
+ "additionalProperties": true
+}
diff --git a/static/schemas/source/core/adjacent-code.json b/static/schemas/source/core/adjacent-code.json
new file mode 100644
index 0000000000..21b0969e7b
--- /dev/null
+++ b/static/schemas/source/core/adjacent-code.json
@@ -0,0 +1,33 @@
+{
+ "$schema": "http://json-schema.org/draft-07/schema#",
+ "$id": "/schemas/core/adjacent-code.json",
+ "title": "Adjacent Code Declaration",
+ "description": "Optional seller disclosure of code applied alongside a buyer creative. Describes a provider and purpose without exposing integration configuration or authorizing the integration. First-party seller code uses provider 'seller'.",
+ "x-added-in": "3.4.0",
+ "type": "object",
+ "properties": {
+ "provider": {
+ "type": "string",
+ "$comment": "x-entity deliberately omitted: read-only seller-scoped reference; no task accepts this value.",
+ "minLength": 1,
+ "maxLength": 128,
+ "pattern": "^[A-Za-z0-9_.:-]+$",
+ "description": "Opaque reference scoped to the selling agent. Stable across its product declarations and assignment readback; MUST NOT be reassigned to a different provider. Reserved value 'seller' identifies the selling agent's own first-party code. Other values identify providers without naming integration endpoints, credentials, or a globally resolvable vendor identity."
+ },
+ "purpose": {
+ "type": "string",
+ "minLength": 1,
+ "maxLength": 256,
+ "description": "Buyer-readable purpose, such as measurement or verification. This is an extensible description, not a vendor capability or an instruction to run code."
+ },
+ "required": {
+ "type": "boolean",
+ "description": "Whether the seller requires this code for delivery. On assignment readback, required code whose status is pending or omitted MUST block delivery of that assignment without changing creative status or approval_status."
+ },
+ "ext": {
+ "$ref": "/schemas/core/ext.json"
+ }
+ },
+ "required": ["provider", "purpose", "required"],
+ "additionalProperties": true
+}
diff --git a/static/schemas/source/core/canonical-product.json b/static/schemas/source/core/canonical-product.json
index 79920c0c48..a796ed9386 100644
--- a/static/schemas/source/core/canonical-product.json
+++ b/static/schemas/source/core/canonical-product.json
@@ -10,6 +10,14 @@
"x-added-in": "3.3.0",
"description": "Product creative requirements, including optional review_sla."
},
+ "adjacent_code": {
+ "type": "array",
+ "x-added-in": "3.4.0",
+ "description": "Optional complete adjacent-code disclosure for this product. Omission means undeclared, including when excluded by field projection; [] explicitly declares no adjacent code. Entries include seller first-party code and exclude buyer creative assets and buyer-supplied assignment trackers. Disclosure does not authorize changes to accepted commercial terms.",
+ "items": {
+ "$ref": "/schemas/core/adjacent-code.json"
+ }
+ },
"product_id": { "type": "string", "minLength": 1, "x-entity": "product" },
"name": { "type": "string", "minLength": 1 },
"description": { "type": "string" },
diff --git a/static/schemas/source/core/product.json b/static/schemas/source/core/product.json
index 7f26544f88..47552d7f39 100644
--- a/static/schemas/source/core/product.json
+++ b/static/schemas/source/core/product.json
@@ -5,6 +5,14 @@
"description": "Represents available advertising inventory",
"type": "object",
"properties": {
+ "adjacent_code": {
+ "type": "array",
+ "x-added-in": "3.4.0",
+ "description": "Optional complete adjacent-code disclosure for this product. Omission means undeclared, including when excluded by field projection; [] explicitly declares no adjacent code. Entries include seller first-party code and exclude buyer creative assets and buyer-supplied assignment trackers. Disclosure does not authorize changes to accepted commercial terms.",
+ "items": {
+ "$ref": "/schemas/core/adjacent-code.json"
+ }
+ },
"product_id": {
"type": "string",
"description": "Opaque identifier for this buyable product. For a non-custom wholesale product, sellers MUST reuse the ID for the same logical catalog offer within the seller and declared cache_scope across reads and wholesale-feed webhooks; feed and pricing versions communicate temporal catalog mutation, while retirement or replacement may end the identity. Concurrent or request-bound configurations whose effective targeting, disclosed targeting modifications, forecast assumptions, terms, or overlay support differ MUST use distinguishable configured product IDs. For is_custom: true, the ID identifies only the request-specific discovery/refinement lineage and is not stable across independent contexts. Sellers MUST keep every issued configured ID resolvable for its promised lifetime. Pricing variants within one logical product are distinguished by pricing_option_id: a seller MUST mint a new pricing_option_id whenever a binding fixed price, floor, currency, model, or priced applicability changes, and MUST NOT reinterpret an issued option ID at a new price. Selecting product_id plus pricing_option_id in create_media_buy accepts that returned configuration and commercial option.",
diff --git a/static/schemas/source/creative/creative-assignment-changed-webhook.json b/static/schemas/source/creative/creative-assignment-changed-webhook.json
index 6916b98364..6c1aad3060 100644
--- a/static/schemas/source/creative/creative-assignment-changed-webhook.json
+++ b/static/schemas/source/creative/creative-assignment-changed-webhook.json
@@ -2,7 +2,7 @@
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "/schemas/creative/creative-assignment-changed-webhook.json",
"title": "Creative Assignment Changed Webhook",
- "description": "Optional account-anchored invalidation fired by a seller that can detect when a package–creative assignment is added, removed, or its aggregate/scoped approval outcome changes. Registered through sync_accounts notification_configs with event_types: [\"creative.assignment_changed\"]. Receivers verify signing, dedupe, and reread get_media_buys; a creative-library seller may also expose a bounded list_creatives reverse projection, but the webhook does not replace the authoritative relationship snapshot.",
+ "description": "Optional account-anchored invalidation fired by a seller that can detect when a package–creative assignment is added, removed, its aggregate/scoped approval outcome changes, or (from AdCP 3.4) required adjacent code affects assignment delivery. Registered through sync_accounts notification_configs with event_types: [\"creative.assignment_changed\"]. Receivers verify signing, dedupe, and reread get_media_buys; a creative-library seller may also expose a bounded list_creatives reverse projection, but the webhook does not replace the authoritative relationship snapshot.",
"type": "object",
"properties": {
"idempotency_key": {
@@ -50,10 +50,12 @@
},
"change_kind": {
"type": "string",
+ "description": "adjacent_code_changed (added in 3.4) invalidates required-code delivery state: entry to or exit from pending, omission, or a change that blocks or releases the assignment. Ordinary configuration edits and optional-code changes do not fire it. Publish the updated assignment snapshot before firing; approval_status remains creative review.",
"enum": [
"assigned",
"unassigned",
- "approval_changed"
+ "approval_changed",
+ "adjacent_code_changed"
]
},
"observed_at": {
diff --git a/static/schemas/source/creative/list-creatives-response.json b/static/schemas/source/creative/list-creatives-response.json
index d5216b0001..0cc44071e1 100644
--- a/static/schemas/source/creative/list-creatives-response.json
+++ b/static/schemas/source/creative/list-creatives-response.json
@@ -304,6 +304,14 @@
"format": "date-time",
"description": "When this assignment was created"
},
+ "adjacent_code": {
+ "type": "array",
+ "x-added-in": "3.4.0",
+ "description": "Complete current adjacent-code application snapshot for this assignment. Omission means undeclared; [] explicitly reports none. Includes pending and omitted entries. Mirrors the other assignment readback for the same relationship and state. Required code that is not applied blocks this assignment, leaving creative approval unchanged. Does not prove browser execution.",
+ "items": {
+ "$ref": "/schemas/core/adjacent-code-application.json"
+ }
+ },
"trackers": {
"type": "array",
"items": { "$ref": "/schemas/core/assignment-tracker.json" },
diff --git a/static/schemas/source/index.json b/static/schemas/source/index.json
index 2a1bee27c4..7782017b98 100644
--- a/static/schemas/source/index.json
+++ b/static/schemas/source/index.json
@@ -41,6 +41,14 @@
"core": {
"description": "Core data models used throughout AdCP",
"schemas": {
+ "adjacent-code": {
+ "$ref": "/schemas/core/adjacent-code.json",
+ "description": "Seller-scoped adjacent-code declaration"
+ },
+ "adjacent-code-application": {
+ "$ref": "/schemas/core/adjacent-code-application.json",
+ "description": "Adjacent-code application state on a creative assignment"
+ },
"product": {
"$ref": "/schemas/core/product.json",
"description": "Represents available advertising inventory"
diff --git a/static/schemas/source/media-buy/get-media-buys-response.json b/static/schemas/source/media-buy/get-media-buys-response.json
index b92b6229c7..4eac01a398 100644
--- a/static/schemas/source/media-buy/get-media-buys-response.json
+++ b/static/schemas/source/media-buy/get-media-buys-response.json
@@ -529,6 +529,14 @@
"description": "Creative identifier",
"x-entity": "creative"
},
+ "adjacent_code": {
+ "type": "array",
+ "x-added-in": "3.4.0",
+ "description": "Complete current adjacent-code application snapshot for this assignment. Omission means undeclared; [] explicitly reports none. Includes pending and omitted entries. Mirrors the other assignment readback for the same relationship and state. Required code that is not applied blocks this assignment, leaving creative approval unchanged. Does not prove browser execution.",
+ "items": {
+ "$ref": "/schemas/core/adjacent-code-application.json"
+ }
+ },
"trackers": {
"type": "array",
"items": { "$ref": "/schemas/core/assignment-tracker.json" },
diff --git a/static/schemas/source/media-buy/product-fields.json b/static/schemas/source/media-buy/product-fields.json
index 8a3a489dcf..0341193ece 100644
--- a/static/schemas/source/media-buy/product-fields.json
+++ b/static/schemas/source/media-buy/product-fields.json
@@ -2,7 +2,7 @@
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "/schemas/media-buy/product-fields.json",
"title": "Product Response Fields",
- "description": "Canonical product fields a buyer requests from list_products. Required product_id and name fields are always returned. list_applications also overrides projection whenever a property or collection list is in the effective targeting because it is the decision receipt for seller-specific list matching. targeting_resolution and expires_at override projection whenever the seller returns modifications, as does collection_targeting_allowed whenever returned overlay_support declares collection_list or collection_lists. Legacy named-format fields remain available only through get_products. A projection that omits collections also omits the response-level collections array. On the canonical list_products path, requesting installments also returns collections, because a canonical installment names its collection and canonical-product.json requires the product to declare it. Legacy get_products shares this enum but not that rule: its installment keeps the deprecated single-namespace shorthand, so it can be returned without collections.",
+ "description": "Canonical product fields a buyer requests from list_products. Required product_id and name fields are always returned. adjacent_code is added in 3.4 and follows ordinary field projection; omission is undeclared, not an empty roster. list_applications also overrides projection whenever a property or collection list is in the effective targeting because it is the decision receipt for seller-specific list matching. targeting_resolution and expires_at override projection whenever the seller returns modifications, as does collection_targeting_allowed whenever returned overlay_support declares collection_list or collection_lists. Legacy named-format fields remain available only through get_products. A projection that omits collections also omits the response-level collections array. On the canonical list_products path, requesting installments also returns collections, because a canonical installment names its collection and canonical-product.json requires the product to declare it. Legacy get_products shares this enum but not that rule: its installment keeps the deprecated single-namespace shorthand, so it can be returned without collections.",
"type": "array",
"minItems": 1,
"uniqueItems": true,
@@ -19,6 +19,7 @@
"sponsored_placement_types",
"social_placement_surfaces",
"format_options",
+ "adjacent_code",
"placements",
"delivery_type",
"exclusivity",
diff --git a/tests/adjacent-code.test.cjs b/tests/adjacent-code.test.cjs
new file mode 100644
index 0000000000..9d887034ba
--- /dev/null
+++ b/tests/adjacent-code.test.cjs
@@ -0,0 +1,143 @@
+const assert = require('node:assert/strict');
+const fs = require('node:fs');
+const path = require('node:path');
+const test = require('node:test');
+const Ajv = require('ajv');
+const addFormats = require('ajv-formats');
+
+const root = path.join(__dirname, '../static/schemas/source');
+const read = file => JSON.parse(fs.readFileSync(path.join(root, file), 'utf8'));
+async function compile(file) {
+ const ajv = new Ajv({ strict: false, allErrors: true, loadSchema: async uri => {
+ assert.ok(uri.startsWith('/schemas/'), `Unexpected schema reference: ${uri}`);
+ return read(uri.slice('/schemas/'.length));
+ } });
+ addFormats(ajv);
+ return ajv.compileAsync(read(file));
+}
+const declaration = { provider: 'provider_7', purpose: 'measurement', required: true };
+const applied = { ...declaration, position: 'append', status: 'applied' };
+
+test('declarations require an opaque provider, a purpose, and an explicit required policy', async () => {
+ const validate = await compile('core/adjacent-code.json');
+ for (const data of [declaration, { ...declaration, provider: 'seller', required: false },
+ { ...declaration, purpose: 'publisher-specific purpose', future_detail: 'tolerated' }]) {
+ assert.equal(validate(data), true, JSON.stringify(validate.errors));
+ }
+ for (const field of ['provider', 'purpose', 'required']) {
+ const missing = { ...declaration };
+ delete missing[field];
+ assert.equal(validate(missing), false, field);
+ }
+ for (const invalid of [null, {}, { ...declaration, provider: '' },
+ { ...declaration, provider: { domain: 'vendor.example' } },
+ { ...declaration, provider: 'https://vendor.example/api' },
+ { ...declaration, purpose: '' }, { ...declaration, required: 'true' }]) {
+ assert.equal(validate(invalid), false, JSON.stringify(invalid));
+ }
+});
+
+test('readback requires a placement and a known application state, without closing extensions', async () => {
+ const validate = await compile('core/adjacent-code-application.json');
+ for (const status of ['applied', 'pending', 'omitted']) {
+ for (const position of ['prepend', 'append']) {
+ assert.equal(validate({ ...applied, status, position }), true, JSON.stringify(validate.errors));
+ }
+ }
+ assert.equal(validate({ ...applied, future_detail: 'tolerated' }), true);
+ for (const field of ['provider', 'purpose', 'required', 'position', 'status']) {
+ const missing = { ...applied };
+ delete missing[field];
+ assert.equal(validate(missing), false, field);
+ }
+ for (const data of [{ ...applied, position: 1 }, { ...applied, position: 'inside' },
+ { ...applied, status: 'approved' }, { ...applied, status: null }]) {
+ assert.equal(validate(data), false, JSON.stringify(data));
+ }
+});
+
+const product = { product_id: 'display', name: 'Display' };
+const legacyProduct = {
+ ...product, description: 'Publisher display',
+ publisher_properties: [{ publisher_domain: 'publisher.example', selection_type: 'by_id', property_ids: ['homepage'] }],
+ format_ids: [{ agent_url: 'https://formats.example/agent', id: 'display_300x250' }],
+ delivery_type: 'non_guaranteed',
+ pricing_options: [{ pricing_option_id: 'cpm', pricing_model: 'cpm', currency: 'USD', rate: 2 }],
+ reporting_capabilities: { available_reporting_frequencies: ['daily'], expected_delay_minutes: 60,
+ timezone: 'UTC', supports_webhooks: false, available_metrics: ['impressions'], date_range_support: 'date_range' }
+};
+
+for (const [file, base] of [['core/canonical-product.json', product], ['core/product.json', legacyProduct]]) {
+ test(`${file}: optional disclosure accepts absence and an empty roster but validates declared entries`, async () => {
+ const validate = await compile(file);
+ for (const data of [base, { ...base, adjacent_code: [] }, { ...base, adjacent_code: [declaration] }]) {
+ assert.equal(validate(data), true, JSON.stringify(validate.errors));
+ }
+ for (const adjacent_code of [null, {}, [applied, { provider: 'seller' }],
+ [{ ...declaration, required: null }]]) {
+ assert.equal(validate({ ...base, adjacent_code }), false, JSON.stringify(adjacent_code));
+ }
+ });
+}
+
+test('product field projection accepts adjacent_code alongside ordinary discovery fields', async () => {
+ const validate = await compile('media-buy/product-fields.json');
+ assert.equal(validate(['product_id', 'adjacent_code']), true, JSON.stringify(validate.errors));
+});
+
+const readbacks = [
+ {
+ file: 'creative/list-creatives-response.json',
+ data: { status: 'completed', query_summary: { total_matching: 1, returned: 1 }, pagination: { has_more: false },
+ creatives: [{ creative_id: 'hero', name: 'Hero', format_kind: 'image', status: 'approved',
+ created_date: '2026-11-16T12:00:00Z', updated_date: '2026-11-16T12:00:00Z',
+ assignments: { assignment_count: 1, returned_assignment_count: 1, assignments_truncated: false,
+ assigned_packages: [{ media_buy_id: 'mb_display', package_id: 'pkg_display',
+ assigned_date: '2026-11-16T12:00:00Z', approval_status: 'approved' }] } }] },
+ row: data => data.creatives[0].assignments.assigned_packages[0]
+ },
+ {
+ file: 'media-buy/get-media-buys-response.json',
+ data: { status: 'completed', media_buys: [{ media_buy_id: 'mb_display', status: 'active', currency: 'USD',
+ total_budget: 1000, confirmed_at: '2026-11-16T12:00:00Z', revision: 1,
+ packages: [{ package_id: 'pkg_display', creative_approvals: [{ creative_id: 'hero', approval_status: 'approved' }] }] }] },
+ row: data => data.media_buys[0].packages[0].creative_approvals[0]
+ }
+];
+
+for (const { file, data, row } of readbacks) {
+ test(`${file}: validates assignment application states independently of creative approval`, async () => {
+ const validate = await compile(file);
+ assert.equal(validate(data), true, JSON.stringify(validate.errors));
+ for (const adjacent_code of [[], [applied], [{ ...applied, status: 'pending' }],
+ [{ ...applied, status: 'omitted' }], [{ ...applied, required: false, status: 'omitted' }]]) {
+ const message = structuredClone(data);
+ row(message).adjacent_code = adjacent_code;
+ assert.equal(validate(message), true, JSON.stringify(validate.errors));
+ }
+ for (const adjacent_code of [null, [declaration], [{ ...applied, status: 'approved' }],
+ [{ ...applied, provider: { domain: 'vendor.example' } }]]) {
+ const message = structuredClone(data);
+ row(message).adjacent_code = adjacent_code;
+ assert.equal(validate(message), false, JSON.stringify(adjacent_code));
+ }
+ });
+}
+
+test('assignment invalidations accept adjacent-code changes without changing the relationship envelope', async () => {
+ const validate = await compile('creative/creative-assignment-changed-webhook.json');
+ const event = {
+ idempotency_key: 'adjacent-change-0001', notification_id: 'adjacent_change_1',
+ notification_type: 'creative.assignment_changed', fired_at: '2026-11-16T12:01:00Z',
+ subscriber_id: 'buyer-primary', account_id: 'account_a', media_buy_id: 'mb_display',
+ package_id: 'pkg_display', creative_id: 'hero', change_kind: 'adjacent_code_changed',
+ observed_at: '2026-11-16T12:00:00Z'
+ };
+ for (const change_kind of ['assigned', 'unassigned', 'approval_changed', 'adjacent_code_changed']) {
+ assert.equal(validate({ ...event, change_kind }), true, JSON.stringify(validate.errors));
+ }
+ assert.equal(validate({ ...event, change_kind: 'configuration_edited' }), false);
+ const missingRelationship = { ...event };
+ delete missingRelationship.package_id;
+ assert.equal(validate(missingRelationship), false);
+});