Repository navigation
Exercise a fenced Forms feedback outbox sender - #43
Conversation
|
Exact-head independent review of Decision: approve-equivalent. Scoped findings: Preview authority read/commit. Completion fencing. Transport byte preservation and same-origin use. The frozen Receipt validation. Strict shape — Lease and Retry-After. Claims are lease-bound (30s) with the transport bounded by remaining lease via AbortController; Retry-After is honored in both numeric and HTTP-date forms, floored at now, applied only to 429/408/5xx; exponential backoff is capped by the seven-day window and three-attempt ceiling. Withdrawal / concurrent claim / replay. The claim is a conditional write; a withdrawal or deletion committing after the claim is caught by the pre-send re-read (the comment is honest that an in-flight send cannot be recalled); authority is re-verified immediately before send, including that the response is still completed; all finishing writes are claim-id-conditioned, so a stale worker cannot overwrite a newer lease or terminal state. Privacy of diagnostics. Terminal codes are a fixed enum; transport errors are deliberately never inspected because they can carry the bearer or payload; receipt bodies are never persisted. Nothing user-controlled reaches a log or a stored diagnostic. Non-blocking observation: the |
What and why
Add a bounded dispatcher for the feedback copy created by FRM-18. It preserves the approved grant generation, reference and HTTPS origin from the server-held preview. The preview write and completion each verify the same authority inside their D1 batch. The dispatcher sends the stored bytes under a fenced lease and validates the protected Track receipt before treating a delivery as accepted.
The fixture suite covers uncertain delivery followed by replay, withdrawal on each side of a claim, same-version authority rotation, rejected redirects, retry limits and legacy previews. A preview from before migration 0018 must be prepared again before sharing. People can still complete without sharing a copy.
Verification
pnpm verifypassed, including 587 web tests.pnpm test:e2epassed 174 tests with eight existing skips.Deployment scope
The dispatcher has an injectable fixture transport. A production caller, cron, grant and delivery remain separate work. Migration 0018 is scoped to this PR. The embed draft #28 will regenerate its independent migration after the first schema merge.
FRM-19 · Track receipt contract