mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2026-08-11 08:47:33 +00:00
Phase 3 of the outbox refactor (PR #3483, per Vitor's directive). The WoT service's kind-3 seeding on Desktop and the `amy wot sync` verb now go through OutboxDispatcher — index relays discover each author's kind-10002 write relays, then per-outbox-relay REQs fetch kind-3. Changes: Desktop: - DesktopRelaySubscriptionsCoordinator gains an inner OutboxCacheGateway that bridges DesktopLocalCache (cachedAdvertisedRelayList / consume) to OutboxDispatcher. - New suspend loadKind3ViaOutbox(pubkeys) method returns the dispatcher's Result for observability. - Main.kt WoT-seed effect now: 1. gates on wotService.isDisabled to preserve MAX_FOLLOWS guardrail (fix 2 from Phase 1) 2. calls loadKind3ViaOutbox instead of the direct loadKind3Batched on index relays 3. keeps the 2s markReady safety net for cold-start UX - clear() now also clears outboxDispatcher's dedup markers. amy: - WotCommand.sync rewritten to construct an OutboxDispatcher, buffer events in the gateway, and persist to ctx.store after fetch returns (store.insert is suspending; can't call from non-suspend gateway callbacks). - --json output additively gains kind10002_received, outbox_covered_authors, fallback_authors, persisted keys. - --timeout N still supported; now maps to overallTimeoutMs. Not in this commit (deferred to a follow-up on same PR if reviewers want it): - Routing stranger-avatar kind-0 fetch through the outbox path (MetadataPreloader wiring is more invasive; keeps this diff focused on the primary WoT concern). Plan: commons/plans/2026-07-06-fix-wot-outbox-model-and-review-fixes-plan.md