Repository navigation
Open
Labels
bugSomething isn't workingSomething isn't workingno-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
adcp.negotiation doesn't support the experimental extend_hold refinement action (media_buy.hold_extension). The spec has had it since before 3.3.0-beta.5, and it's in the pinned 3.3.0-beta.6 bundle.
- Buyer preflight refuses it.
preflight_refine_proposalsreportsinvalid_request_schema("action must be explicitly set to revise or finalize") for a schema-validextend_holdentry. Throughrefine_proposals_verified, and through the seller-sidepreflight_refinement_batch_or_raise, a valid request therefore fails before transport, or withVALIDATION_ERRORon the seller. - Response verification would fail a successful extension.
verify_refine_proposals_responsehas noextend_holdentry in its action → outcome table. It acceptshold_unavailable/batch_abortedonly forfinalize. Itsoutcome == "finalized"checks require a draft source and unchanged terms, but a successfulextend_holdreportsfinalizedagainst a committed source. - No atomic transaction on the seller.
execute_refinement_batchrequiresfinalize_transactiononly forfinalizebatches. Anextend_holdbatch, also all-or-none, would run without one.
Found while adopting beta.6 (#1901). Admitting extend_hold in preflight alone would have half-supported it, so that change was left out.
Spec reference (3.3.0-beta.6)
media-buy/refine-proposals-request.jsonrefinements: "extend_hold … MUST target a committed, unexpired proposal that holds inventory and creates a committed successor with a later expires_at; a batch containing extend_hold MUST contain only extend_hold entries and is atomic." There's also anallOfif/thenthat enforces the single-action batch.media-buy/proposal-refinement.jsononeOf: theextend_holdbranch (x-status: experimental). Likefinalize, it forbidschange_kind,constraints,product_changes,installment_changes,alternatives,ask,criteriaandremove_media_buy_frequency_cap.media-buy/refine-proposals-response.jsonoutcome: "finalized also reports a successful extend_hold: the proposal is the new committed successor whose parent_proposal_id is the extended source and whose expires_at is the later deadline."enums/proposal-refinement-reason.json:hold_unavailablecovers a declined extension ("A failed extend_hold leaves the source proposal and its hold unchanged"), andbatch_abortedcovers "the all-or-none finalize or extend_hold batch".- Capability:
proposal_refinement.hold_extensiononget_adcp_capabilities.
Fix sketch
- Preflight.
- Accept
extend_hold. - Forbid the revision fields on it, as on
finalize. - Apply the single-action batch rule to
extend_hold. - Gate it on the seller's
hold_extensioncapability when one is declared.
- Accept
- Verification.
- Add
extend_hold: {finalized, unable}to the outcome table. - Allow
hold_unavailable/batch_abortedforextend_hold. - Split the
finalizedchecks by action. Forextend_hold, require a committed source, a successor with the source asparent_proposal_id, a laterexpires_at, and unchanged terms (digest equality with the source), within the hold policy where it's declared.
- Add
- Seller helper. Treat an
extend_holdbatch as atomic, so it requiresfinalize_transactionor an extend-hold equivalent. Add a source-state check (committed and unexpired) next tovalidate_finalize_source_states_or_raise. - Tests. Cover a valid batch, a mixed batch, an extension refused with
hold_unavailable, and a successful extension verified against a committed source.
Code locations (next at 807141962)
src/adcp/negotiation.py:preflight_refine_proposals(272): the action check (349), finalize-only forbidden fields (368), the mixed-batch rule (420).verify_refine_proposals_response(571): the mixed-batch outcome rule (676),allowed_outcomes(705), thehold_unavailable/batch_abortedcheck (729),outcome == "finalized"verification (826) with its draft-source requirement (858).
src/adcp/decisioning/negotiation.py:validate_finalize_source_states_or_raise(101, finalize-only at 108), andexecute_refinement_batch(273), whose transaction requirement keys onis_finalize(297).- Related docs that already mention extend_hold-only batches:
src/adcp/server/responses.py:935,src/adcp/decisioning/context.py:643.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingno-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