mirror of
https://github.com/tiennm99/goclaw.git
synced 2026-08-09 12:23:57 +00:00
Line 52 parses agent_id into agentUUID but line 59 passed the raw event.AgentID string to ExistsBySourceID. PR #826 fixed the emission side (loop_finalize.go) so event.AgentID is now always a valid UUID, but the consumption side kept the inconsistent parse-then-discard pattern. Use agentUUID.String() to keep the parse-once-use-parsed invariant, matching the tenantUUID pattern two lines above. Fixes the "invalid input syntax for type uuid" error reported in #809 and the downstream "..." Telegram symptom in #824 where episodic failure cascaded into empty agent replies.
This commit is contained in:
@@ -56,7 +56,7 @@ func (w *episodicWorker) Handle(ctx context.Context, event eventbus.DomainEvent)
|
||||
|
||||
// Build source_id for idempotency
|
||||
sourceID := fmt.Sprintf("%s:%d", payload.SessionKey, payload.CompactionCount)
|
||||
exists, err := w.store.ExistsBySourceID(ctx, event.AgentID, event.UserID, sourceID)
|
||||
exists, err := w.store.ExistsBySourceID(ctx, agentUUID.String(), event.UserID, sourceID)
|
||||
if err != nil {
|
||||
return fmt.Errorf("episodic: check source_id: %w", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user