mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2026-08-09 08:04:45 +00:00
Audit follow-ups on the DM relay-list work: - Bug: scheduleOutboxBackfill re-scheduled itself from inside the still-active drain job, so the isActive guard made the tail call a no-op — any authors past the first 100-author batch in a burst were stranded until another kind:0 happened to arrive. Drain in a while-loop inside one job instead, and mark it @Synchronized so concurrent consume-path callers can't spawn duplicate jobs. - Perf: the back-fill held each REQ open for a fixed 8s. Use fetchAll, which returns on EOSE (bounded by the timeout), and reuses existing infra. - DmInboxRelayResolver: drop the redundant `+ cachedOutbox` in the phase-2 seed (cached outbox is already in phase1Seed, so it was always subtracted back out), and bound the phase-2 fallback fetch to 5s so a cold send can't stack two full fan-out timeouts. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KSc3LhGFSF5VZKr9h3qfn3