writeonce/docs/examples/porch/middleware
shoney.arickathil d98ff82027 fix(porch-store): never replay a cached transient 5xx
- Miss path only marks a response a durable replay target (outcome 1)
  when status is 2xx/3xx; a 4xx/5xx gets outcome 3 instead
- Outcome 3's row is a one-shot relay: the scalar reply still can't carry
  a Resp (WO-E226), so the row exists only to hand the exact response
  back once, then idempotent.wo deletes it -- a retry with the same key
  is a genuine miss and re-executes, instead of caching a 500 for the
  24h default TTL
- Reviewer finding: caching any status meant a transient failure was
  replayed verbatim until TTL expiry, worse than no idempotency at all
- Gate leg 18d: FlakyHandler fails once then succeeds; same key twice
  must answer 500 then 200 -- confirmed failing (500, 500) before the
  fix, passing after

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
(cherry picked from commit e61015f2065a7c6aec6f5c2439e78b53f796bab3)
2026-09-15 01:15:30 +02:00
..
idempotent.wo fix(porch-store): never replay a cached transient 5xx 2026-09-15 01:15:30 +02:00
keypool.wo fix(porch-store): never replay a cached transient 5xx 2026-09-15 01:15:30 +02:00
limiter.wo fix(porch-store): trust_proxy falls back to net.peer on an absent XFF 2026-09-15 01:15:30 +02:00
store.wo feat(porch-store): add digest column to IdempotencyKey table 2026-09-15 01:15:30 +02:00