mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2026-08-11 08:47:33 +00:00
NIP-42 AUTH challenges arrive as `auth-required:` OK responses. Today they accumulate via PoolEventOutboxState.newResponse → Tries.addResponse, and after three of them the relay is silently dropped from the outbox on the next newTry — even though RelayAuthenticator is concurrently signing the AUTH event and the relay would have accepted the original publish once authenticated. Carve `auth-required:` out of the failure path: it's a "wait, AUTH in flight" signal, not a rejection. The existing RelayAuthenticator.checkAuthResults → client.syncFilters hook re-pumps the outbox after AUTH-OK, so the original event is retried naturally. Adds PoolEventOutboxStateTest covering the carve-out plus regressions for regular rejections, terminal rejections, and success.