Skip to content

feat(media-buy): experimental per-installment hold readback (holds) - #8257

Merged
bokelley merged 5 commits into
mainfrom
feat/installment-holds-8086
Oct 17, 2026
Merged

bokelley merged 5 commits into
mainfrom
feat/installment-holds-8086

Conversation

@bokelley

@bokelley bokelley commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

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 main as ad0c101. This PR now targets main, and its diff shows only the installment-holds slice.

Why it followed #8255: the per-installment hold_rank on each entry depends on hold_policy.rankable and the proposal-level hold_rank from #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, changeset minor. 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 holds array on the committed canonical proposal. Each entry has product_id and installment_ref (the canonical core/installment-ref.json), plus hold_rank under 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 }
  ]
}
  • Readback of one hold, not partial holds. This is how feat(media-buy): experimental hold_policy on products and proposals #8140's "no partial holds within a proposal … per-allocation readback fits this shape unchanged" is kept. Every entry was placed by the same all-or-none finalize. If any installment cannot be held, the finalize entry returns hold_unavailable and nothing is held. Entries share hold_placed_at and the proposal's expires_at, and they are accepted, extended, superseded, or lapse only with the proposal. No task addresses an entry on its own. Finalize and accept_proposal stay 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.
  • No per-entry expires_at. The proposal's expires_at is the deadline for every entry, and feat(media-buy): experimental hold_policy on products and proposals #8140 already caps it at the earliest booking_deadline or change_cutoff of 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 stray expires_at fails validation.
  • Complete when present, readback not contract, and only the buyer's own hold. Each (product_id, installment_ref) appears once. Every product_id is an allocated product, and every installment belongs to that product and falls within the purchase's flight. commercial_terms stays authoritative. Run-of-collection inventory is not listed. A seller that lists the feature includes holds on every committed proposal (for 3.3+ callers) that allocates a product declaring specific installments. It is allowed only on a non-draft proposal whose hold_policy.available is true, so it never appears on drafts or terms-only commitments. Sellers MUST NOT include or describe other buyers' holds on the same installments.
  • Positions per installment. Under a rankable policy, every entry carries the buyer's own hold_rank, and the proposal's hold_rank is 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 carry hold_rank exactly when the proposal does. This shows the buyer which installment is contested, so it can revise that one out.
  • Extension. An extend_hold successor lists the same entries, each at a position no worse than before. Its expires_at never passes the earliest booking deadline or change cutoff of the held installments, which the extension section now states explicitly.
  • Version gate. holds is omitted for callers below 3.3, together with hold_policy.

Compliance: 12 new vectors under a new installment_holds case: 8 finalize and 4 extend. The grader adds holds_duplicate_entry, holds_product_not_allocated, hold_rank_better_than_entry, and holds_changed_on_extension. It extends hold_rank_worsened to entries and experimental_feature_undeclared to the new feature.

Questions (yes / no)

  1. Is holds readback 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.
  2. Do entries omit expires_at, with the proposal's expires_at as 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).
  3. Is an entry keyed by product_id plus the canonical installment_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.
  4. Must a seller that lists the feature always include holds when the proposal allocates a product declaring specific installments? Recommend yes. A buyer can then tell "no installments" apart from "not reported", the same presence rule hold_policy uses. 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 (including hold-policy and hold-policy-vectors, with 109 hold tests), test:json-schema, test:examples, test:mcp-schema-projection, build:compliance -- --check, typecheck, the changeset scope check and changeset status, and json-schema-validation --file on each touched doc. test:server-unit passes in all three shards: 4,612, 3,311 (31 skipped), and 4,687 tests.

Size limits: no limits change.

Refs #8086, #8140, #8097, #8255.

🤖 Generated with Claude Code

bokelley and others added 2 commits October 16, 2026 21:14
…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]>

@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 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 the static/schemas/source/** hard approval gate; requires human/CODEOWNERS review (review_decision is not APPROVED).

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.

@aao-secretariat aao-secretariat Bot added the ladon/needs-human-review Ladon has escalated this PR for human review. label Oct 16, 2026
Base automatically changed from feat/hold-ranking-8086 to main October 17, 2026 11:04
bokelley and others added 3 commits October 17, 2026 11:06
…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
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.

1 participant