Repository navigation
fix(compliance): UUID-aliased idempotency_keys across remaining storyboard scenarios - #4232
Merged
Merged
Conversation
…board scenarios Extends #4218 (measurement_terms_rejected) to the rest of the suite. 15 storyboard steps across 9 scenarios still shipped hardcoded `idempotency_key` literals on state-mutating tasks. Same root cause: the runner's dynamic `start_time` substitution shifts dates forward each run, producing same key + different canonical body and arming IDEMPOTENCY_CONFLICT (or replaying stale cached payloads when seller emit shape changes between runs). Switch every remaining literal to `$generate:uuid_v4#<scenario>_<step>`. Closes #4230. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
bokelley
added a commit
that referenced
this pull request
May 8, 2026
…board scenarios (#4232) Extends #4218 (measurement_terms_rejected) to the rest of the suite. 15 storyboard steps across 9 scenarios still shipped hardcoded `idempotency_key` literals on state-mutating tasks. Same root cause: the runner's dynamic `start_time` substitution shifts dates forward each run, producing same key + different canonical body and arming IDEMPOTENCY_CONFLICT (or replaying stale cached payloads when seller emit shape changes between runs). Switch every remaining literal to `$generate:uuid_v4#<scenario>_<step>`. Closes #4230. Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>
3 tasks
bokelley
added a commit
that referenced
this pull request
May 8, 2026
Summary
Extends #4218 (
measurement_terms_rejected) to the rest of the storyboard suite. 15 steps across 9 scenarios still shipped hardcodedidempotency_keyliterals on state-mutating tasks (create_media_buy,sync_creatives,sync_plans,update_media_buy).Same root cause as #4218: the runner shifts
start_timesubstitutions forward each run to keep buys future-dated, so against a long-running seller deployment those static keys produce same key + different canonical body cross-run. That arms the spec-mandatedIDEMPOTENCY_CONFLICT. Worse: when the seller's emit shape changed between runs (e.g. aCreateMediaBuyResponsevariant fix), subsequent runs replay now-spec-non-compliant cached payloads — the production failure mode that surfaced this issue, knocking out 5 stateful chains onmedia_buy_sellerand cascading into ~43 dependent skipped steps.Change
Every remaining literal
idempotency_keyis replaced with\$generate:uuid_v4#<scenario>_<step>so each run mints fresh keys. Affected:creative_fate_after_cancellationgovernance_approvedgovernance_conditionsgovernance_deniedgovernance_denied_recoveryinvalid_transitionsinventory_list_no_matchinventory_list_targetingpending_creatives_to_start15 keys total, matching the issue inventory. Source files at
static/compliance/source/protocols/media-buy/scenarios/*.yaml; thecompliance/cache/3.0.7/...paths in the issue body are generated.After this, no hardcoded
idempotency_keyliterals remain in the storyboard suite (verified by grep on the source dir).Why this matters beyond the symptom
The runner's stale-cache replay is correct seller behavior — the spec mandates that an
idempotency_keyreplay returns the cached response. But any time the spec or seller's emit shape changes (which happens whenever AdCP versions roll forward), every storyboard scenario with a static key becomes a one-shot landmine: works on first run, breaks after the seller updates. The\$generate:uuid_v4pattern is the systemic prevention.Test plan
npm run test:substitution-vector-names— cleannpm run build:compliance— clean rebuildmedia_buy_sellerpost-merge: confirm the 5 previously-failingcreate_buy*scenarios + 43 dependent steps unblockRelease
Patch-eligible (compliance fixture fix, no spec/wire changes). Same shape as #4218 — should land in 3.0.8 via cherry-pick to
3.0.x.Closes #4230. Refs #4218, adcontextprotocol/adcp-client#1586.
🤖 Generated with Claude Code