Repository navigation
Open
Labels
enhancementNew feature or requestNew feature or requestno-triageSkip the Claude triage bot — human or designated agent will handle this issueSkip the Claude triage bot — human or designated agent will handle this issuesdk-10SDK 10 (next branch, AdCP 3.3)SDK 10 (next branch, AdCP 3.3)
Description
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_changesentry exactly (plusreason); - the entries count toward the
constraint_unsatisfiable/partial/unablerules.
It does not check the rest of the contract:
- every draft on a
partialresult satisfies every requested entry absent from the list; - a
revisedresult 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.jsonunsatisfied_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."
- Entries are unique by
core/installment-change.json:product_id,installment_ref(core/canonical-installment-ref.json) andaction(include/omit).
Fix sketch
- 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 everyomit, plus everyinclude. Compare references by the closed canonical form, using JCS bytes ofcanonical-installment-ref. - 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. - New mismatch. An entry failed by some draft but not declared in
unsatisfied_installment_changesraisesinstallment_change_mismatch. Use the same per-draft wording asproduct_change_mismatch. - Declared but satisfied. A declared entry that every draft satisfies is also a mismatch, as for
unsatisfied_product_changes. - 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.
- 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:_failed_product_changes(557), the model to follow.- The per-draft product-change loop in
verify_refine_proposals_response, wherefailed_change_unionis built. - The
unsatisfied_installment_changesblock added in feat(protocol)!: adopt the signed AdCP 3.3.0-beta.6 bundle #1901 (1058), which does the subset check only.
- Generated models:
adcp.types.domains.core.installment_change.InstallmentChange,adcp.types.domains.core.installment_change_set.InstallmentChangeSet, andUnsatisfiedInstallmentChangeinadcp.types.domains.media_buy.refine_proposals_response.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestno-triageSkip the Claude triage bot — human or designated agent will handle this issueSkip the Claude triage bot — human or designated agent will handle this issuesdk-10SDK 10 (next branch, AdCP 3.3)SDK 10 (next branch, AdCP 3.3)
Activity