Skip to content

[Impl] commitment.idempotency_key has no scope, conflict rule or retention #128

Open

Description

@EvgenyAndroid

What did you build?

An implementation that parses and validates OpenProposal proposals, line items and commitments end to end.

What you tried to express, and what happened

§ 5.6.1 says "A request carrying an idempotency_key already seen MUST return the original result and MUST NOT create a second commitment." Three things are left open:

  • Scope. Unique to what: the buyer, the seller, the proposal? Two buyers that pick the same string would collide.
  • Conflict. If the same key arrives with a different payload (a changed amount, say), returning the original result silently hides a real disagreement.
  • Retention. How long a seller must remember the key.

What you did instead

Scoped keys to buyer plus seller, returned a conflict error when a reused key carries a different payload, and declared a retention window.

Suggested resolution: scope the key (buyer plus seller, or plus line item), require a conflict error on a changed payload, and require the seller to state how long keys are retained.

Fields involved

commitment.idempotency_key

How blocking was it?

Workaround required, but it works

Before you submit

  • I have read CONTRIBUTING.md and agree my contribution may be published under this repository's licence.
  • This contains no confidential or commercially sensitive information — no real rate cards, deal terms, client names or inventory data.

Activity

  1. EvgenyAndroid commented on Oct 27, 2026

    @EvgenyAndroid
    Author

    Where this stands after PR #73 and #130:

    Suggested floor: the seller MUST keep each key and its result at least until the proposal's valid_until passes. Before then, a forgotten key turns a retry into a new attempt, and that attempt passes PR #73's version and expiry checks if the proposal hasn't changed. After valid_until, PR #73 rejects every new attempt, so a forgotten key can't produce a second commitment. The floor leaves one case open: a buyer that never saw the first response and retries after valid_until gets expired and still doesn't know whether it committed. A longer retention, or a way to look a commitment up by its key, would close that.

  2. KonstantinMirin commented on Oct 27, 2026

    @KonstantinMirin

    Thank you, @EvgenyAndroid. Postindustria (IAB Tech Lab member) had proposed the same floor in our comment on #24, and we have withdrawn it.

    In our coming PRs, an accepted attempt keeps its key in its assent[] entry, so its result lasts as long as the record. A rejection writes no entry. How long a seller keeps it is open question 1 of that comment, which credits your floor. Our PRs leave replay beyond § 5.6.1 to the AAMP wire and lifecycle contract (§ 1.2), and the question asks whether that contract should set it.

    Revised 2026-11-03: Withdraws the retention sentence we quoted, pending that question.

    Analyzed and generated with the help of Claude, fully reviewed by me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions