From a297bc45ecd6daf69920752e958fa27f6063c6f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20G=C3=B3mez?= Date: Wed, 4 Mar 2026 17:32:30 +0100 Subject: [PATCH] fix: prevent duplicate PUBLISH log entries from completion event MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PublishService emits publish$ twice: once at start, once on completion. The eager publishIdToEntryId cleanup in handleStatusUpdate fired before the completion emission, causing handlePublishEvent to create a second entry. Removed eager cleanup — overflow eviction is sufficient. Co-Authored-By: Claude Opus 4.6 --- src/services/event-log.ts | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/src/services/event-log.ts b/src/services/event-log.ts index ac280dd..3f980f7 100644 --- a/src/services/event-log.ts +++ b/src/services/event-log.ts @@ -415,16 +415,6 @@ class EventLogService { status: newStatus, }; - // Clean up publish ID mapping when publish reaches terminal state - if (newStatus !== "pending") { - const allTerminal = Array.from(newRelayStatus.values()).every( - (r) => r.status === "success" || r.status === "error", - ); - if (allTerminal) { - this.publishIdToEntryId.delete(update.publishId); - } - } - // Notify subscribers this.entriesSubject.next([...this.entries]); }