You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 13, 2026. It is now read-only.
DB-row fallback (~line 2278, hit when there is no cached workflow response_data — e.g. TOCTOU race recovery or a missing workflow step): rebuilds CreateMediaBuySuccess from the ORM row and does not set context, sandbox, or account. The context parameter threaded into the function (line 2230) is unused on this branch.
Expected
Per BR-RULE-043-01, context should be echoed on all success response paths, including the replay fallback.
The fallback can't safely echo the current replay request'scontext — that would break the L1/security idempotency byte-stability rule (replay must match the original response, only envelope fields may differ), which is exactly why #706 deliberately left the replay site without the **_success_extras splat. And it has no access to the original context: it isn't persisted on the media-buy row. A correct fix requires persisting/rehydrating the original context onto the media buy so the fallback can echo the original (not the replay request's) value.
Affected area
src/core/tools/media_buy_create.py — _build_idempotency_hit_result DB-row fallback branch (~2278) and the unused context parameter.
Observed
_build_idempotency_hit_resultinsrc/core/tools/media_buy_create.pyhas two replay paths:CreateMediaBuySuccessfrom the persisted workflowresponse_data. For buys created after the b9 follow-up: complete adcp b9 behavioral obligations + deferred decisions (from #705 review) #706 work, that dict already carriescontext/sandbox/account, so they are correctly carried forward. ✅response_data— e.g. TOCTOU race recovery or a missing workflow step): rebuildsCreateMediaBuySuccessfrom the ORM row and does not setcontext,sandbox, oraccount. Thecontextparameter threaded into the function (line 2230) is unused on this branch.Expected
Per BR-RULE-043-01,
contextshould be echoed on all success response paths, including the replay fallback.Why it wasn't fixed in #706
The fallback can't safely echo the current replay request's
context— that would break the L1/security idempotency byte-stability rule (replay must match the original response, only envelope fields may differ), which is exactly why #706 deliberately left the replay site without the**_success_extrassplat. And it has no access to the original context: it isn't persisted on the media-buy row. A correct fix requires persisting/rehydrating the originalcontextonto the media buy so the fallback can echo the original (not the replay request's) value.Affected area
src/core/tools/media_buy_create.py—_build_idempotency_hit_resultDB-row fallback branch (~2278) and the unusedcontextparameter.Notes
response_data, so the cached path handles them).