fix: prevent duplicate PUBLISH log entries from completion event

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 <noreply@anthropic.com>
This commit is contained in:
Alejandro Gómez
2026-03-04 17:32:30 +01:00
parent 9ebf9b54a2
commit a297bc45ec

View File

@@ -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]);
}