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
fix(webapp): skip request-idempotency cache for mollified triggers
`saveRequestIdempotency` caches the runId returned by the trigger
service against the x-trigger-request-idempotency-key header. When
the gate mollifies the trigger, that runId is a synthesised cuid with
no PG row; a lost-response SDK retry would lookup the cached id in
`handleRequestIdempotency`, miss in PG, fall through to a fresh
trigger attempt, and — for triggers without a task-level idempotency
key — produce a duplicate buffer entry.
Surface the divert as a typed `isMollified` flag on
`TriggerTaskServiceResult` and gate the route's
`saveRequestIdempotency` call on it. Retries during the buffer
window are now accepted as fresh triggers; task-level idempotency
keys still dedupe via the buffer's SETNX in
`findBufferedRunWithIdempotency`. The behaviour is bounded by the
drainer's eventual materialisation — once the PG row lands, normal
request-idempotency from that point forward works as usual.
Regression covered by two assertions in the existing mollifier tests:
the mollify path returns `isMollified: true`, and the pass-through
path leaves the flag falsy.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
0 commit comments