mirror of
https://github.com/purrgrammer/grimoire.git
synced 2026-04-09 15:07:10 +02:00
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:
@@ -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]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user