Repository navigation
feat(media-buy): experimental per-installment hold readback (holds) - #8257
Conversation
…ank) Item 2 of #8086, Option A (advisory readback). hold_policy gains rankable (default false, forbidden without a hold); without it, available true keeps its exclusive, first-position meaning from #8140. Under a rankable policy the committed canonical proposal reports the buyer's own position in hold_rank (1 = first; the worst position across the hold), required there and forbidden otherwise and on drafts. Rank 1 keeps the acceptance guarantee; behind first position the seller MAY decline accept_proposal with PRODUCT_UNAVAILABLE or return submitted while it settles the holds ahead bilaterally. Positions never worsen, so the immutable snapshot is an upper bound; extend_hold successors report a fresh, never-worse position. No ROFR deadline, no rank-change webhook, and nothing disclosed about other buyers beyond the count ahead. Callers below 3.3 never see the fields and get rankable treated as false. Adds ranking vectors and the hold_rank_worsened grader code, and raises PARITY_COMPILE_LIMIT to 1_268_000 (1_264_154 -> 1_266_010 bytes measured). Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Item 3 of #8086. A committed canonical proposal whose hold_policy holds inventory may carry holds[]: product_id plus the canonical installment_ref for each installment the hold covers, and, under a rankable policy, the buyer's own hold_rank per installment. holds[] is readback of the one all-or-none hold finalize placed, keeping #8140's no-partial-holds rule: entries share hold_placed_at and the proposal expires_at (no per-entry expiry), lapse, extend, and are accepted only with the proposal, and no task addresses an entry. Complete when present, allocated products only, the buyer's own hold only; extend_hold successors list the same entries at no-worse positions and never pass an installment booking deadline or change cutoff. Omitted below 3.3. Adds installment_holds vectors and grader codes. Parity compile size is unchanged (1_266_010 bytes); the whole projection measures 21_173_544. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
There was a problem hiding this comment.
Ladon verdict: Escalate to human review
Escalate — gated path touched without an approving review.
This PR modifies static/schemas/source/core/canonical-proposal.json, which matches the static/schemas/source/** hard approval gate (gated_paths: true). The current review_decision is unknown/none (not APPROVED), so decision-table row 2 fires: human/CODEOWNERS review is required before this can merge.
No blocking findings exist. The reviewer found the change clean, additive, and experimental: the new holds array on canonical-proposal.json (L3737-3765) is correctly gated (minItems 1, additionalProperties: false, required product_id/installment_ref, optional hold_rank, x-added-in: 3.3.0), the two new allOf conditionals are sound, installment-ref.json $ref resolves, schema↔docs coherence holds across refine_proposals.mdx / get_adcp_capabilities.mdx / experimental-status registry, a minor changeset is present (additive, no wire break), no oneOf regression, and no dist/** mutation. The grader logic matches the vectors. The only noted item is a documented, out-of-scope completeness-MUST gap (non-blocking).
Escalation reasons
- Modifies
static/schemas/source/core/canonical-proposal.json— protected schema source under thestatic/schemas/source/**hard approval gate; requires human/CODEOWNERS review (review_decisionis notAPPROVED).
Why human review
- Modifies static/schemas/source/core/canonical-proposal.json — gated path under static/schemas/source/** requires human/CODEOWNERS approval; review_decision is not APPROVED
- This PR touches a path under a hard, non-overridable approval gate (static/schemas/source/core/canonical-proposal.json (modified) matches
static/schemas/source/**) and the current GitHub review decision is 'unknown', 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.
…s-8086 # Conflicts: # docs/media-buy/task-reference/refine_proposals.mdx # docs/protocol/get_adcp_capabilities.mdx # docs/reference/experimental-status.mdx # docs/reference/test-vectors/index.mdx # static/compliance/source/test-vectors/hold-policy/README.md # static/compliance/source/test-vectors/hold-policy/vectors.json # static/schemas/source/core/canonical-proposal.json # tests/hold-policy-vectors.test.cjs # tests/hold-policy.test.cjs
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
WG decision brief (3.3): holds on specific installments, readback (#8086 item 3)
Agenda status: consent round. This covers item 3 of #8086. It builds on #8255 (item 2, hold ranking), which is merged to
mainas ad0c101. This PR now targetsmain, and its diff shows only the installment-holds slice.Why it followed #8255: the per-installment
hold_rankon each entry depends onhold_policy.rankableand the proposal-levelhold_rankfrom #8255. The two slices also edit the same schema, docs, vectors and grader, so they landed in sequence.Experimental: feature id
media_buy.installment_holds, changesetminor. Single adopter: Availnet, a creator marketplace, where the held unit is a creator's specific upcoming video. It merges as experimental for the 3.3 beta, and the WG reviews it end to end with the other hold slices.Recommended shape
An optional
holdsarray on the committed canonical proposal. Each entry hasproduct_idandinstallment_ref(the canonicalcore/installment-ref.json), plushold_rankunder a rankable policy:{ "proposal_status": "committed", "expires_at": "2027-01-20T17:00:00Z", "hold_policy": { "available": true, "rankable": true }, "hold_placed_at": "2027-01-16T17:00:00Z", "hold_rank": 2, "holds": [ { "product_id": "availnet_creator_slot_0412", "installment_ref": { "collection_ref": { "publisher_domain": "availnet.example", "collection_id": "pinnacle_creator" }, "installment_id": "ep_041" }, "hold_rank": 1 }, { "product_id": "availnet_creator_slot_0412", "installment_ref": { "collection_ref": { "publisher_domain": "availnet.example", "collection_id": "pinnacle_creator" }, "installment_id": "ep_042" }, "hold_rank": 2 } ] }hold_unavailableand nothing is held. Entries sharehold_placed_atand the proposal'sexpires_at, and they are accepted, extended, superseded, or lapse only with the proposal. No task addresses an entry on its own. Finalize andaccept_proposalstay atomic. To hold fewer installments, the buyer declines the committed proposal or lets it lapse, then finalizes a revised draft. The earlier hold counts like any other until it is released.expires_at. The proposal'sexpires_atis the deadline for every entry, and feat(media-buy): experimental hold_policy on products and proposals #8140 already caps it at the earliestbooking_deadlineorchange_cutoffof the held installments. A per-entry deadline earlier than the proposal's would be a partial hold. A later one would describe a hold that lapses with the proposal anyway. The schema closes entries, so a strayexpires_atfails validation.(product_id, installment_ref)appears once. Everyproduct_idis an allocated product, and every installment belongs to that product and falls within the purchase's flight.commercial_termsstays authoritative. Run-of-collection inventory is not listed. A seller that lists the feature includesholdson every committed proposal (for 3.3+ callers) that allocates a product declaring specificinstallments. It is allowed only on a non-draft proposal whosehold_policy.availableistrue, so it never appears on drafts or terms-only commitments. Sellers MUST NOT include or describe other buyers' holds on the same installments.hold_rank, and the proposal'shold_rankis no better than any entry's. It equals the worst entry's unless unlisted inventory is held at a worse position. The schema enforces that entries carryhold_rankexactly when the proposal does. This shows the buyer which installment is contested, so it can revise that one out.extend_holdsuccessor lists the same entries, each at a position no worse than before. Itsexpires_atnever passes the earliest booking deadline or change cutoff of the held installments, which the extension section now states explicitly.holdsis omitted for callers below 3.3, together withhold_policy.Compliance: 12 new vectors under a new
installment_holdscase: 8 finalize and 4 extend. The grader addsholds_duplicate_entry,holds_product_not_allocated,hold_rank_better_than_entry, andholds_changed_on_extension. It extendshold_rank_worsenedto entries andexperimental_feature_undeclaredto the new feature.Questions (yes / no)
holdsreadback of one all-or-none hold, with no partial holds and no entry addressable on its own? Recommend yes. It keeps feat(media-buy): experimental hold_policy on products and proposals #8140's rule and atomic finalize and acceptance unchanged. Partial holds would need entry-level acceptance and release, which belongs in its own RFC.expires_at, with the proposal'sexpires_atas the one deadline for every installment? Recommend yes. The RFC asks buyers to see "until when", and for an atomic hold that answer is the same for every entry. An entry-level deadline only makes sense together with partial holds (question 1).product_idplus the canonicalinstallment_ref, with non-installment inventory not listed? Recommend yes. The RFC sketch also allowed product-only entries, but for a non-installment product the proposal-level fields already say everything an entry would.holdswhen the proposal allocates a product declaring specific installments? Recommend yes. A buyer can then tell "no installments" apart from "not reported", the same presence rulehold_policyuses. Run-of-collection products, such as dynamically inserted podcast impressions, stay out of scope.Default if no objection: the recommendation as drafted.
Verification
All of these pass locally:
build:schemas,test:schemas(includinghold-policyandhold-policy-vectors, with 109 hold tests),test:json-schema,test:examples,test:mcp-schema-projection,build:compliance -- --check,typecheck, the changeset scope check andchangeset status, andjson-schema-validation --fileon each touched doc.test:server-unitpasses in all three shards: 4,612, 3,311 (31 skipped), and 4,687 tests.Size limits: no limits change.
comply_test_controllerparity compile is unchanged at 1,266,010 bytes, within feat(media-buy): experimental advisory hold ranking (rankable, hold_rank) #8255's 1,268,000.Refs #8086, #8140, #8097, #8255.
🤖 Generated with Claude Code