Repository navigation
fix(compliance): collapse key_reuse_conflict into replay_same_payload phase (3.0.x) - #4365
Merged
bokelley merged 1 commit intoMay 11, 2026
Conversation
… phase The conflict step shares `$generate:uuid_v4#replay_key` with the replay steps by design — same key, different body, to assert IDEMPOTENCY_CONFLICT against the cache entry the replay phase populated. With adcp-client#1658's phase-boundary alias-cache reset (the fix for #1657's cross-phase alias leak), aliases no longer persist across phase boundaries. A separate `key_reuse_conflict` phase would mint a fresh UUID on the wire and the seller would treat the request as new — masking the conflict assertion entirely. Move `create_media_buy_conflict` into `replay_same_payload` as a fourth step so the alias stays scoped to a single phase. Phase title and narrative updated to cover both replay and conflict semantics. Step body unchanged — same request, same validations, same reviewer_checks. Companion to adcp-client#1657 / adcp-client#1658. No seller-visible behavior change; pure storyboard restructure so the runner fix is safe to land. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
bokelley
deleted the
bokelley/idempotency-yaml-collapse-conflict-into-replay-phase
branch
May 11, 2026 08:44
2 tasks
bokelley
added a commit
that referenced
this pull request
May 11, 2026
Summary
Companion to adcp-client#1657 / adcp-client#1658.
#1658 fixes a runner bug where
\$generate:uuid_v4#aliasplaceholders leaked across phase boundaries within a single pass. The fix resets the alias cache at every non-skipped phase entry.universal/idempotency.yamlis the one storyboard in the corpus that depends on cross-phase alias sharing:\#replay_keyis reused in thekey_reuse_conflictphase to assert IDEMPOTENCY_CONFLICT against the cache entry thereplay_same_payloadphase populated. With #1658's reset, that phase boundary mints a fresh UUID — the seller sees a new request and returns 201 instead of IDEMPOTENCY_CONFLICT, masking the assertion.This PR restructures the storyboard so the alias stays in a single phase:
replay_same_payloadcreate_media_buy_conflictkey_reuse_conflictcreate_media_buy_conflict)The conflict step's task, schema refs, request body, validations, and reviewer_checks are unchanged — only its parent phase changes. Phase narrative is updated to cover both replay and conflict semantics, including a one-paragraph note on why both branches must share the same phase (so future authors don't try to re-split for organizational cleanliness).
Why this lives in the same phase, not a sibling phase with explicit alias propagation
Three options on the table:
\$generate:uuid_v4@scenario#replay_key(or similar) for storyboard-scoped aliases. Requires runner + spec change; broadens the substitution grammar; one more thing for storyboard authors to learn.\$context.<name>— would require the response to echoidempotency_key(it doesn't, perprotocol-envelope.json), or a new `from: request` source on `context_outputs`. Bigger spec change.Option 1 is the smallest landing surface for the 3.0.x patch line. Options 2/3 can be revisited in 3.1+ if a future storyboard legitimately needs cross-phase aliases.
Compatibility
Wire order
Steps fire sequentially:
Step 4's error response doesn't fire a webhook, so it doesn't interact with step 3's drain window.
Forward-merge
Branch is 3.0.x. The forward-merge bot will replay to main once landed.
Linked
🤖 Generated with Claude Code