Repository navigation
feat(media-buy): experimental advisory hold ranking (rankable, hold_rank) - #8255
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]>
There was a problem hiding this comment.
Ladon verdict: Escalate to human review
Escalate — gated schema paths require human/CODEOWNERS review.
No blocking (critical/high) or medium findings surfaced. The reviewer confirms a clean, additive experimental change: adds hold_policy.rankable and committed-proposal hold_rank (#8086) as advisory readback, with schema↔docs coherence intact across refine_proposals, get_products, accept_proposal, and get_adcp_capabilities. No oneOf regression (allOf if/then), enum edits are description-only, and the minor additive changeset is correct. Vectors and projection budget bump are conformant.
However, this PR modifies gated protocol-source files under static/schemas/source/** (canonical-proposal.json, hold-policy.json, error-code.json, proposal-status.json) and review_decision is REVIEW_REQUIRED — not APPROVED. Per the hard approval gate (decision rule row 2), the outcome must be escalate until a human/CODEOWNERS approval satisfies the gate. Once review_decision becomes APPROVED, this clean diff can fall through to approve.
Why human review
- Gated paths touched without approval: static/schemas/source/core/canonical-proposal.json, static/schemas/source/core/hold-policy.json, static/schemas/source/enums/error-code.json, static/schemas/source/enums/proposal-status.json modified while review_decision is REVIEW_REQUIRED — human/CODEOWNERS approval required before merge.
- This PR touches a path under a hard, non-overridable approval gate (static/schemas/source/core/canonical-proposal.json (modified) matches
static/schemas/source/**; static/schemas/source/core/hold-policy.json (modified) matchesstatic/schemas/source/**; static/schemas/source/enums/error-code.json (modified) matchesstatic/schemas/source/**; static/schemas/source/enums/proposal-status.json (modified) matchesstatic/schemas/source/**) and the current GitHub review decision is 'REVIEW_REQUIRED', 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.
WG decision brief (3.3): hold ranking, advisory readback (#8086 item 2)
Agenda status: consent round. This covers item 2 of #8086 only. Item 1 (
extend_hold) shipped in #8097. Item 3 (per-installmentholds[]) is #8257, stacked on this PR. The WG chose Option A from the #8086 decision memo: advisory readback, with no right-of-first-refusal enforcement, norespond_bydeadline, and noproposal.rank_changedwebhook.Experimental: feature id
media_buy.hold_ranking, changesetminor. Single adopter: Availnet, a creator marketplace. Like the other hold slices, it merges as experimental for the 3.3 beta. The WG reviews it end to end with #8140, #8097, and the training agent (#8181).Recommended shape
hold_policy.rankable(boolean, defaultfalse, forbidden whenavailableisfalse). This is the room RFC: disclose proposal hold policy before finalization #7661 reserved. Without it,available: truekeeps the meaning feat(media-buy): experimental hold_policy on products and proposals #8140 gave it: an exclusive, first-position hold, so the seller either places a first-position hold or returnshold_unavailable. Withrankable: true, finalize may succeed with the hold queued behind holds that could prevent it from booking. The two differ only at placement. A rank-1 ranked hold has the same guarantee as an exclusive one. A draft is rankable if any allocated product is, because the proposal is accepted as a whole.hold_rankon the committed canonical proposal (integer ≥ 1). It is required whenhold_policyhasavailableandrankableset totrue, and forbidden otherwise and on drafts.1is first position, andnmeansn - 1holds are ahead. Only holds whose booking could prevent this one count, so non-competing holds on capacity inventory don't inflate it. When the hold covers inventory at several positions, it is the worst of them.{ "proposal_status": "committed", "hold_policy": { "available": true, "rankable": true }, "hold_placed_at": "2027-01-16T17:00:00Z", "hold_rank": 2 }Acceptance. A hold at rank 1 keeps the existing acceptance guarantee. A hold behind first position does not. While a hold ahead of it is live or has been accepted, the seller MAY decline
accept_proposalwithPRODUCT_UNAVAILABLE, which is the errorterms_onlyalready uses, or MAY returnsubmittedwhile it settles the holds ahead with their holders outside the protocol. It never reprices or substitutes, and the proposal stayscommitted. A challenge to a hold ahead ("confirm or release") cannot shorten that hold'sexpires_at. The descriptions ofPRODUCT_UNAVAILABLEandcommittednow say this, so an agent doesn't drop a live hold on that error.Freshness. The proposal is immutable, so
hold_rankis a snapshot taken athold_placed_at, or at the extension for anextend_holdsuccessor. It is never updated, and an exact retry replays it. Sellers MUST NOT move a live hold to a worse position: no later hold or booking stands ahead of it, and commitments such as an incumbent's renewal rights count at placement. The snapshot is therefore an upper bound, and the buyer's real position can only improve. A buyer gets a fresher reading from anextend_holdsuccessor, or learns whether it can book by callingaccept_proposal. AdCP has no read task for a committed proposal, and this slice does not add one.Privacy.
hold_rankreveals only how many holds are ahead. Sellers return it only on the buyer's own proposals. They MUST NOT disclose another buyer's identity or terms through any field. They MUST NOT disclose another hold's expiry either, except throughexpected_confirmation_aton asubmittedacceptance. The existing per-buyer cap on concurrent holds limits probing.Version gate. Callers below 3.3 never receive
hold_policyorhold_rank, and they readcommittedas an exclusive hold. For them, the seller treatsrankableasfalse.Compliance: 8 new vectors in
test-vectors/hold-policyunder a newrankingcase, covering the finalize, draft, and extend lists. The grader addshold_rank_worsened, rankable-draft derivation (reusingdraft_exceeds_product_policy), and feature declaration.Questions (yes / no)
hold_policy.rankableflag, so thatavailable: truewithout it stays an exclusive, first-position hold? Recommend yes. feat(media-buy): experimental hold_policy on products and proposals #8140 promised thatavailablewould not be reinterpreted, and buyers that read onlyavailablekeep a correct picture.hold_rankan immutable snapshot whose position never worsens (sellers MUST NOT move a live hold to a worse position), with no read task and no webhook in 3.3? Recommend yes. The no-worsening rule makes a stale snapshot safe to rely on. It matches first-come hold queues (first and second holds, "pencils"), where a later hold queues behind. If the WG rejects the rule, the snapshot is only informational and a read surface becomes necessary.accept_proposalwithPRODUCT_UNAVAILABLEor returnsubmittedwhile it settles the holds ahead bilaterally, with no protocol-defined deadline? Recommend yes. This is Option A. Option B'srespond_byandrank_changedremain possible later as additive fields.hold_rank, the worst position across its inventory, rather than a rank per product? Recommend yes. Acceptance is all or none, so the worst position is the one that decides. Per-installment positions come withholds[]in feat(media-buy): experimental per-installment hold readback (holds) #8257.rankablebe the seller's call alone, with no finalize-time opt-in from the buyer? Recommend yes for 3.3. The draft'srankableis binding and visible before finalize, a 3.3 buyer that relies on a reservation MUST read it, and a buyer that doesn't want a ranked hold can let it lapse or decline it. A request flag such asrequire_first_position, defaulting to off, is the additive fix if adopters get surprised. The expert review raised it as the main residual risk.expected_confirmation_aton asubmittedacceptance to reflect when a hold ahead resolves? Recommend yes. Broadcast sellers routinely tell a second-hold buyer when the first hold expires. A coarser value can be added if sellers object to revealing queue depth.Default if no objection: the recommendation as drafted.
Verification
All of these pass locally:
build:schemas,test:schemas(includinghold-policyandhold-policy-vectors, with 94 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:
PARITY_COMPILE_LIMITrises from 1,265,000 to 1,268,000. Thecomply_test_controllerrequest measured 1,264,154 bytes on main and 1,266,010 on this branch.docs/snippets/compliance-error-codes.mdxis regenerated from thePRODUCT_UNAVAILABLEdescription.Refs #8086, #7661, #8140, #8097.
🤖 Generated with Claude Code