From c51c5fd57e55ce42e07f0a014ed3e508c50131cc Mon Sep 17 00:00:00 2001 From: Brian O'Kelley Date: Fri, 24 Apr 2026 10:47:30 -0400 Subject: [PATCH] fix(compliance): restore replayed assertion on fresh create_media_buy MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use field_value_or_absent (documented in #3032, shipped in @adcp/client 5.16.0) so the check passes when `replayed` is absent and when it is present with value false — and fails only when it is present with true. This closes the coverage gap opened in #3013 without penalizing spec-correct agents that omit the field on fresh execution. Closes #3031 --- ...tore-replayed-assertion-fresh-create-media-buy.md | 4 ++++ static/compliance/source/universal/idempotency.yaml | 12 ++++-------- 2 files changed, 8 insertions(+), 8 deletions(-) create mode 100644 .changeset/restore-replayed-assertion-fresh-create-media-buy.md diff --git a/.changeset/restore-replayed-assertion-fresh-create-media-buy.md b/.changeset/restore-replayed-assertion-fresh-create-media-buy.md new file mode 100644 index 0000000000..e42dee599b --- /dev/null +++ b/.changeset/restore-replayed-assertion-fresh-create-media-buy.md @@ -0,0 +1,4 @@ +--- +--- + +Restore positive `replayed` assertion on the fresh-path `create_media_buy_initial` step in `universal/idempotency.yaml`, now using the `field_value_or_absent` matcher (documented in #3032, shipped in `@adcp/client` 5.16.0). Fresh execution MAY omit `replayed` per `protocol-envelope.json`, but if present it MUST be `false` — this closes the coverage gap opened in #3013 without penalizing spec-correct agents that omit the field. diff --git a/static/compliance/source/universal/idempotency.yaml b/static/compliance/source/universal/idempotency.yaml index 2f97e4b3c0..9bed60fdb6 100644 --- a/static/compliance/source/universal/idempotency.yaml +++ b/static/compliance/source/universal/idempotency.yaml @@ -270,14 +270,10 @@ phases: - check: field_present path: "media_buy_id" description: "Agent returns a media_buy_id for the initial request" - # NOTE: intentionally NO assertion on `replayed` here. Per - # `protocol-envelope.json`, fresh execution MAY omit the field, - # and `@adcp/client` >= 5.14 omits it (see adcp-client#859). - # The replay step below asserts `replayed: true` on the - # cached replay, which is the real regression surface. A - # fresh-path `field_value allowed_values: [false]` assertion - # has no `field_absent`-tolerant form today and would fail - # spec-correct agents. + - check: field_value_or_absent + path: "replayed" + allowed_values: [false] + description: "If replayed is present on fresh execution, it MUST be false (protocol-envelope.json)" - check: field_present path: "context"