mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2026-08-12 01:07:46 +00:00
Two bugs found in a pre-merge audit: - quartz PoolEventOutboxState: auth-required NAKs only spared the `responses` budget, but `tries` (grown by every send/re-pump and NOT auth-aware) still accumulated across reconnects, so a slow/flapping AUTH handshake could exhaust Tries.isDone() and drop the event — with a spurious onEventGaveUp — before AUTH landed. Now an auth-required NAK resets the relay's retry budget (it responded, so it's up and just wants auth). Regression test added. - RelayAuthPromptBus used a replay=0 SharedFlow, so a challenge that resolved to ASK before RelayAuthPromptHost subscribed (cold start / account switch) was dropped and the auth coroutine stalled the full timeout then DISMISSed. Add replay so late subscribers recover pending prompts (the host already filters resolved ones). Regression test added. Also record the as-built design (Always/Never/Custom + toggles, venues, give-up toast, known deny-relay-outbox limitation) in the plan doc. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EZjmYpgHP4pf79Sav5QT8a