π€― LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.
TypeScript agentagent-collaborationagent-harnessloop-engineeringmcppersonal-assistantproactive-agentskillssuper-agenttask-management
chore: clean up LOBE-13787 markers from code comments (#19165)
Arvin Xu5eec25aedada
diff --git a/apps/server/src/services/agentRuntime/CompletionLifecycle.ts b/apps/server/src/services/agentRuntime/CompletionLifecycle.tsindex 7040cc35459..c8b442f0997 100644--- a/apps/server/src/services/agentRuntime/CompletionLifecycle.ts+++ b/apps/server/src/services/agentRuntime/CompletionLifecycle.ts@@ -1073,7 +1073,8 @@ export class CompletionLifecycle {// provenance `call_llm` stamps on every assistant row it creates or// reuses (`metadata.operationId`). Unlike "the latest assistant row in// the topic", this is bound to THIS operation, so a topic that also- // holds a concurrent run's rows cannot supply the answer (LOBE-13787).+ // holds a concurrent run's rows cannot supply the answer (root cause of+ // the Discord thread bug where the bot kept repeating the same reply).if (!extractTextFromMessage(row)?.trim() && topicId) {const byOperation = await messageModel.findLatestAssistantByOperationId({operationId,diff --git a/apps/server/src/services/agentRuntime/__tests__/CompletionLifecycle.test.ts b/apps/server/src/services/agentRuntime/__tests__/CompletionLifecycle.test.tsindex 67990daf314..39321199b5e 100644--- a/apps/server/src/services/agentRuntime/__tests__/CompletionLifecycle.test.ts+++ b/apps/server/src/services/agentRuntime/__tests__/CompletionLifecycle.test.ts@@ -1219,8 +1219,9 @@ describe('CompletionLifecycle.dispatchHooks β lastAssistantContent DB recovery);});- // LOBE-13787: the named row can be an empty placeholder while the run's real- // reply sits on another row. Resolve it by the run's own provenance+ // The named row can be an empty placeholder while the run's real reply sits+ // on another row (the Discord thread bug where the bot kept repeating the+ // same message). Resolve it by the run's own provenance// (`metadata.operationId`), never by "the latest assistant row in the topic" β// a topic can hold a concurrent run's rows.it('falls back to operation provenance when the named row is empty', async () => {diff --git a/apps/server/src/services/bot/__tests__/renderThrownError.test.ts b/apps/server/src/services/bot/__tests__/renderThrownError.test.tsindex f2582eb1f6f..72cd4e92faa 100644--- a/apps/server/src/services/bot/__tests__/renderThrownError.test.ts+++ b/apps/server/src/services/bot/__tests__/renderThrownError.test.ts@@ -2,10 +2,11 @@ import { describe, expect, it } from 'vitest';import { renderThrownAgentError } from '../renderThrownError';-// LOBE-13787: the bot's startup / catch-all failure paths posted a bare+// The bot's startup / catch-all failure paths posted a bare// "**Agent Execution Failed**" β with no operation id, that carried no-// information at all. Classifying the thrown value first lets the tiered-// renderer pick curated copy, WITHOUT ever emitting the raw message.+// information at all (reported from a Discord thread). Classifying the thrown+// value first lets the tiered renderer pick curated copy, WITHOUT ever+// emitting the raw message.describe('renderThrownAgentError', () => {it('gives a plain thrown Error the harness-tier copy instead of a bare header', () => {const out = renderThrownAgentError(new Error('Topic not found'), 'op-1');diff --git a/apps/server/src/services/bot/renderThrownError.ts b/apps/server/src/services/bot/renderThrownError.tsindex a856bf9972d..7511021b3a4 100644--- a/apps/server/src/services/bot/renderThrownError.ts+++ b/apps/server/src/services/bot/renderThrownError.ts@@ -9,8 +9,8 @@ import { renderAgentError } from './replyTemplate';* The bot's failure paths that catch a raw `Error` (bridge startup, the* handleMention / router catch-alls) used to render `renderError(operationId)`,* which produces a bare "**Agent Execution Failed**" β and, when the operation- * never got far enough to have an id, not even that (LOBE-13787: the user saw- * two consecutive failures carrying no information at all).+ * never got far enough to have an id, not even that (a Discord thread report+ * showed two consecutive failures carrying no information at all).** Running the value through the runtime's own error normalizer first gives* those paths the same `errorType` + `attribution` the completion path already