Skip to content

feat(schema): add shared MediaBuy name to buy_products/accept_proposal - #7608

Closed
sujanchalla0510 wants to merge 2 commits into
adcontextprotocol:mainfrom
sujanchalla0510:feat/compact-media-buy-name-7536
Closed

sujanchalla0510 wants to merge 2 commits into
adcontextprotocol:mainfrom
sujanchalla0510:feat/compact-media-buy-name-7536

Conversation

@sujanchalla0510

@sujanchalla0510 sujanchalla0510 commented Sep 20, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • buy_products and accept_proposal (the 3.2 compact create path) had no way to set the shared human-readable name display label that create_media_buy/update_media_buy already accept and persist — the compact lifecycle (feat(media-buy): add compact AdCP 3.2 lifecycle #6115) merged one day before name was added to the orchestrated tools (feat(media-buy): add shared media buy name #6573) and was never updated to match. A buyer on the compact path had exactly one way to set the label: a follow-up control_media_buy revision, costing a revision bump for something create_media_buy sets inline.
  • Adds optional name to buy-products-request.json and accept-proposal-request.json with the same constraints (minLength: 1, maxLength: 255, pattern: "\S") and MUST-persist/MUST-echo wording as create-media-buy-request.json, and to the shared media-buy-commitment-response.json's Committed Media Buy branch — placed outside accepted_proposal, matching how control_media_buy already frames name as operational metadata, not a covered component of the accepted terms or terms_digest.
  • accept_proposal's name additionally states precedence per the issue's suggested resolution: a request value wins; when absent, sellers MAY seed the MediaBuy name from the accepted proposal's own name (bounded to 255 characters — proposal.name allows up to 500) and MUST then report it on read surfaces like any persisted name. proposal.name is seller-authored and describes the plan under negotiation, not the buy that was booked, so it's a fallback default, not a substitute.
  • Extended tests/media-buy-name-contract.test.cjs to guard all three new surfaces under the same shared-contract assertions the existing six surfaces already use (255-char bound, MUST-persist obligation, "not an identifier or financial reference" framing), plus a dedicated test for accept_proposal's terms-digest exclusion and proposal-seeding precedence language.
  • Updated buy_products.mdx, accept_proposal.mdx, and media-buy/lifecycle.mdx — making explicit that name is not in the documented lossy-on-compact-path list, closing the ambiguity the issue raised.

Implements the maintainer-approved (bokelley, "Status: ready-to-implement") scope from the issue's own triage comment.

Closes #7536.

Verification

  • node tests/media-buy-name-contract.test.cjs and the full node tests/composed-schema-validation.test.cjs (466/466) pass.
  • Revert-and-reconfirm: reverting only the three schema files (keeping the test changes) makes the three new/extended assertions fail with Cannot read properties of undefined (reading 'description') and a regex-match failure; restoring the fix makes all pass.
  • npm run test:schemas and npm run test:json-schema (281/281 $schema-tagged doc examples, including the two updated docs snippets) both pass.
  • npm run typecheck clean.
  • node scripts/check-changeset-protocol-scope.cjs origin/main passed.
  • npm run lint:schema-links clean.
  • Full commit-time npm run precommit (10800+ unit/schema/storyboard tests + typecheck) passed clean.

🤖 Generated with Claude Code

sujanchalla0510 and others added 2 commits September 20, 2026 00:10
Closes adcontextprotocol#7536.

PR adcontextprotocol#6573 added an optional `name` (human-readable trafficking-UI
display label, MUST-persist/MUST-echo) to create_media_buy,
update_media_buy, core/media-buy.json, and their response surfaces,
one day after the 3.2 compact lifecycle (adcontextprotocol#6115) merged — the compact
tools were never touched by adcontextprotocol#6573 and have carried no way to set the
label since. A buyer on the compact create path (buy_products,
accept_proposal) had exactly one way to set it: a follow-up
control_media_buy revision, costing a revision bump for a label
create_media_buy sets inline.

Adds optional `name` to buy-products-request.json and
accept-proposal-request.json with the same constraints (minLength: 1,
maxLength: 255, pattern: \S) and MUST-persist/MUST-echo wording as
create-media-buy-request.json, and to the shared
media-buy-commitment-response.json's "Committed Media Buy" branch,
placed outside accepted_proposal — operational metadata, not a
covered component of the accepted terms or terms_digest, mirroring
how control_media_buy already frames name.

accept_proposal's name additionally states precedence per the issue's
suggested resolution: a request value wins; when absent, sellers MAY
seed the MediaBuy name from the accepted proposal's own name (bounded
to 255 characters, proposal.name allows up to 500) and MUST then
report it on read surfaces like any persisted name. proposal.name is
seller-authored and describes the plan under negotiation, not the
buy that was booked, so it is a fallback default, not a substitute.

Extended tests/media-buy-name-contract.test.cjs to guard all three new
surfaces under the same shared-contract assertions the existing six
surfaces already use (255-char bound, MUST-persist obligation, "not an
identifier or financial reference" framing), plus a dedicated test for
accept_proposal's terms-digest exclusion and proposal-seeding
precedence language. Updated buy_products.mdx, accept_proposal.mdx,
and media-buy/lifecycle.mdx (making explicit that `name` is not in the
documented lossy-on-compact-path list, closing the ambiguity the issue
raised).

Verification:
- node tests/media-buy-name-contract.test.cjs and the full
  node tests/composed-schema-validation.test.cjs (466/466) pass.
- Revert-and-reconfirm: reverting only the three schema files (keeping
  the test changes) makes the three new/extended assertions fail with
  `Cannot read properties of undefined (reading 'description')` and a
  regex-match failure; restoring the fix makes all pass.
- npm run test:schemas and npm run test:json-schema (281/281
  $schema-tagged doc examples, including the two updated docs
  snippets) both pass.
- npm run typecheck clean.
- node scripts/check-changeset-protocol-scope.cjs origin/main passed.
- npm run lint:schema-links clean.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
npm run build:compliance auto-links bare task-name mentions in doc
prose to their own reference pages (get_media_buys here). Ran it after
the fact and committed the result, closing the "compliance symbol
links are stale" failure the second build pass caught.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@aao-secretariat aao-secretariat Bot added the ladon/needs-human-review Ladon has escalated this PR for human review. label Sep 20, 2026

@aao-secretariat aao-secretariat Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Ladon verdict: Escalate to human review

Escalate — gated schema paths require human/CODEOWNERS approval.

This PR adds an optional MediaBuy name field to the buy_products and accept_proposal requests and the shared media-buy-commitment-response success branch. The reviewer found no Critical/High/Medium issues: schema constraints (minLength 1 / maxLength 255 / pattern \S) match the six pre-existing name surfaces, docs are coherent with the schema change, the minor changeset is correctly scoped, no new undiscriminated oneOf is introduced, and the contract test guards all three new surfaces.

Despite the clean diff, this PR modifies files under static/schemas/source/**, which are under a hard, deterministic approval gate (gated_paths: true) and review_decision is REVIEW_REQUIRED — not APPROVED. Per decision rule row 2, the gate is not satisfied, so the outcome must be escalate until a human/CODEOWNERS approval lands.

Gated files requiring human/CODEOWNERS review:

  • static/schemas/source/media-buy/accept-proposal-request.json
  • static/schemas/source/media-buy/buy-products-request.json
  • static/schemas/source/media-buy/media-buy-commitment-response.json

No blocking findings exist; once review_decision becomes APPROVED, this can fall through to a normal approve.

Why human review

  • Gated paths touched (static/schemas/source/**) with review_decision=REVIEW_REQUIRED — human/CODEOWNERS approval required before merge: accept-proposal-request.json, buy-products-request.json, media-buy-commitment-response.json
  • This PR touches a path under a hard, non-overridable approval gate (static/schemas/source/media-buy/accept-proposal-request.json (modified) matches static/schemas/source/**; static/schemas/source/media-buy/buy-products-request.json (modified) matches static/schemas/source/**; static/schemas/source/media-buy/media-buy-commitment-response.json (modified) matches static/schemas/source/**) and the current GitHub review decision is 'REVIEW_REQUIRED', not APPROVED. This is a hard gate enforced in code — Ladon cannot auto-approve until a human/CODEOWNERS approval is recorded, regardless of how clean the diff is.

@aao-secretariat
aao-secretariat Bot requested a review from bokelley September 20, 2026 05:26

@aao-secretariat aao-secretariat Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Ladon verdict: Escalate to human review

Escalate — gated path touched without required approval.

This PR modifies files under static/schemas/source/**, which fall under a hard, path-based approval gate (gated_paths: true). The current GitHub review decision is REVIEW_REQUIRED, not APPROVED, so decision-table row 2 fires: the gate cannot be lifted until a human/CODEOWNERS approval is recorded, regardless of how clean the diff is.

The reviewer returned a clean pass with no findings — the schema delta adds optional name fields with matching docs, a correct minor changeset, no new oneOf, no dist/ artifact mutation, and contract test coverage. This is a net-clean diff, but the gated-path rule is non-overridable.

Gated files requiring human/CODEOWNERS approval:

  • static/schemas/source/media-buy/accept-proposal-request.json
  • static/schemas/source/media-buy/buy-products-request.json
  • static/schemas/source/media-buy/media-buy-commitment-response.json

No blocking findings; the escalation is purely the approval gate. Once review_decision becomes APPROVED, this can fall through to a normal approval.

Why human review

  • Touches gated paths under static/schemas/source/** with review_decision=REVIEW_REQUIRED — human/CODEOWNERS approval required before merge: accept-proposal-request.json, buy-products-request.json, media-buy-commitment-response.json
  • This PR touches a path under a hard, non-overridable approval gate (static/schemas/source/media-buy/accept-proposal-request.json (modified) matches static/schemas/source/**; static/schemas/source/media-buy/buy-products-request.json (modified) matches static/schemas/source/**; static/schemas/source/media-buy/media-buy-commitment-response.json (modified) matches static/schemas/source/**) and the current GitHub review decision is 'REVIEW_REQUIRED', not APPROVED. This is a hard gate enforced in code — Ladon cannot auto-approve until a human/CODEOWNERS approval is recorded, regardless of how clean the diff is.

Copy link
Copy Markdown
Contributor

Closing as superseded by merged #7606 (commit 6947106), which already carries the shared MediaBuy name into the rc.5 release candidate.

@bokelley bokelley closed this Sep 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ladon/needs-human-review Ladon has escalated this PR for human review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3.2.0-rc.3: buy_products and accept_proposal cannot carry the shared MediaBuy name that create_media_buy accepts

2 participants