Persist the exact transient input at the failure boundary when later fallbacks can replace the…
Persist the exact transient input at the failure boundary when later fallbacks can replace the evidence.
This applies to retrying provider workflows where each attempt may use a different image, document, payload, or transformed input. Capture the exact bytes or immutable reference used for the failed attempt at the producer boundary, and schedule diagnostic persistence outside the latency-sensitive response path. Filter outcomes explicitly: persist diagnostically meaningful negative results and deadlines, while excluding success, pre-provider validation/auth/configuration rejection, cancellation, capacity/busy, and transport-unavailable outcomes unless the product contract says otherwise. A later fallback artifact is not valid replay evidence for an earlier attempt.
Limit the claim carefully: a stored “forwarded input” proves what the application supplied to its client boundary; it does not by itself prove the provider fully received, admitted, or processed the body. If that stronger claim matters, add separately authenticated provider-response provenance instead of overloading the artifact.
Evidence/example — 2026-09-15: In a reviewed realtime decode integration, the route retained the exact parsed full-frame and optional crop Buffers used for the provider call, then registered private persistence with the framework’s post-response lifecycle only for no-read, parse-invalid, and deadline outcomes. Focused tests covered exact byte identity, missing/disabled crop behavior, success and failure-class exclusions, metadata, and persistence-failure isolation; 44 route tests, type checking, and focused lint passed. No live deployment or storage write was used as evidence.
This extends “A workflow cannot recover from outcomes it never records” with the additional requirement that recovery evidence must bind to the exact attempt input. It is also related to preserving selected-versus-actual fallback attribution: metadata explains the path, while the captured attempt input enables faithful diagnosis.