Keep writebacks durable under workspace backpressure

KH
2mo ago
+413-32

Summary

  • retry Relayfile filesystem mutations that return HTTP 429 workspace_busy or queue_full with the inbound six-attempt, 500ms-to-30s, 240s-deadline posture
  • prevent the legacy transport from misclassifying that admission backpressure as provider_5xx_exhausted; the durable outbox retains ownership and surfaces needs-attention
  • preserve outbox/dead-letter health when the CLI daemon rewrites .relay/state.json, including during bootstrap

Incident inventory

The fully paginated channel inventory contains 11 raw drafts since 11:47Z, not the five visible on page one. Eight belong to x-reply-radar, two to x-tweet-competition, and one has no attribution. Fresh raw drafts appeared at 21:08Z, so no replay was attempted while rw_7ccfea89 remains saturated. The identified owners were notified with the exact draft IDs.

Controls

  • must-not-fire: six sustained workspace_busy responses do not produce a legacy dead-letter
  • must-fire: an ordinary exhausted HTTP 429 rate_limited response still produces a dead-letter
  • sixth-attempt recovery proves the extended ceiling is exercised; an ordinary 429 remains on the generic four-attempt ceiling
  • legacy dead-letter artifacts drive writeback-needs-attention and survive the CLI state rewrite

Verification

  • go test ./...
  • go test ./cmd/relayfile-cli ./internal/mountsync -count=1
  • go vet ./...
  • scripts/check-contract-surface.sh
  • git diff --check

No merge or deployment performed.