Skip to content

negotiation: verify that partial refine_proposals drafts satisfy every omitted installment change #1905

Open

Description

@bokelley

Problem

verify_refine_proposals_response checks unsatisfied_installment_changes only partly (experimental media_buy.installment_refinement, adcontextprotocol/adcp#8967, PR #8974). Since #1901 it checks two things:

  • each declared entry repeats a requested installment_changes entry exactly (plus reason);
  • the entries count toward the constraint_unsatisfiable / partial / unable rules.

It does not check the rest of the contract:

  • every draft on a partial result satisfies every requested entry absent from the list;
  • a revised result satisfies all of them.

So a seller can return a draft that silently ignores an installment change and the SDK accepts it. Product changes already get this check (_failed_product_changes feeding product_change_mismatch); installment changes need the same.

Spec reference (3.3.0-beta.6)

  • media-buy/refine-proposals-response.json unsatisfied_installment_changes: "Requested installment actions not satisfied by every returned draft. Each entry repeats a request installment_changes entry exactly and adds the reason … valid only on partial or unable results, whose reason_code is constraint_unsatisfiable. Every draft on a partial result satisfies every entry absent from this list."
  • core/installment-change-set.json:
    • Entries are unique by (product_id, installment_ref).
    • "For each product P the entries name, the selected set is P's installments with every omit removed and every include added. A returned draft satisfies P's entries when it purchases exactly one product whose installments equal the selected set: P itself, or a product the seller offers for that selection in place of P."
  • core/installment-change.json: product_id, installment_ref (core/canonical-installment-ref.json) and action (include / omit).

Fix sketch

  1. Selected sets. For each requested product P, compute the selected set: P's installments (from the source proposal's purchase or the returned products[]), minus every omit, plus every include. Compare references by the closed canonical form, using JCS bytes of canonical-installment-ref.
  2. Per-draft check. For each returned draft, work out which entries' products are satisfied. A product is satisfied when the draft purchases exactly one product whose installments equal its selected set: P itself or a substitute. This mirrors _failed_product_changes.
  3. New mismatch. An entry failed by some draft but not declared in unsatisfied_installment_changes raises installment_change_mismatch. Use the same per-draft wording as product_change_mismatch.
  4. Declared but satisfied. A declared entry that every draft satisfies is also a mismatch, as for unsatisfied_product_changes.
  5. Missing data. If the response or source doesn't carry the installments needed to compute the set, report it as unverifiable, not as a pass.
  6. Tests. Cover omit/include on P, substitution by another product, partial satisfaction, and an undeclared failure.

Code locations (next at 807141962)

  • src/adcp/negotiation.py:
  • Generated models: adcp.types.domains.core.installment_change.InstallmentChange, adcp.types.domains.core.installment_change_set.InstallmentChangeSet, and UnsatisfiedInstallmentChange in adcp.types.domains.media_buy.refine_proposals_response.

Activity

  1. added
    enhancementNew feature or request
    no-triageSkip the Claude triage bot — human or designated agent will handle this issue
    sdk-10SDK 10 (next branch, AdCP 3.3)
    on Nov 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestno-triageSkip the Claude triage bot — human or designated agent will handle this issuesdk-10SDK 10 (next branch, AdCP 3.3)

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions