dea1c7c0d9
Composes PG-first (replica) lookup, MollifierBuffer.mutateSnapshot, and writer-side spin-wait into the Q3 wait-and-bounce flow. Returns a discriminated outcome rather than throwing Response, so the helper stays route-agnostic and unit-testable. Phase C mutation endpoints (tags, metadata-put, reschedule, cancel) consume this in upcoming commits. Wait knobs default to safetyNetMs=2000, pollStepMs=20, pgTimeoutMs=50 per Q3. Each PG poll is bounded by pgTimeoutMs via Promise.race so a slow query can't burn the whole safety-net budget. Abort signal is respected between polls (callers should pass getRequestAbortSignal() when running in a request handler). Also exports SnapshotPatch and MutateSnapshotResult from @trigger.dev/redis-worker so webapp consumers can type-check their callers of mutateSnapshot.