Skip to content

🀯 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.

chore: clean up LOBE-XXX code comment markers (#16141)

Arvin Xuae531a03d169
diff --git a/packages/types/src/task/index.ts b/packages/types/src/task/index.ts
index c3d24e31d57..36ee502d367 100644
--- a/packages/types/src/task/index.ts
+++ b/packages/types/src/task/index.ts
@@ -37,7 +37,8 @@ export interface CheckpointConfig {
* Task-level delivery-acceptance (verify) gate config, persisted under
* `tasks.config.verify`. This is the authoritative source for a task run's
* verify gate β€” it is *not* unioned with any agent-level mount
- * (`agencyConfig.verifyRubricId`). See LOBE-10614 Β§2.
+ * (`agencyConfig.verifyRubricId`) β€” the task config is authoritative and never
+ * field-level merged with the agent-level rubric.
*
* Subtasks inherit with whole-config override semantics: a subtask uses its own
* config when present, otherwise the nearest ancestor's config in full (never a
diff --git a/src/store/chat/slices/aiChat/actions/__tests__/gatewayEventHandler.test.ts b/src/store/chat/slices/aiChat/actions/__tests__/gatewayEventHandler.test.ts
index d3a069f3a3f..1e83fd093d9 100644
--- a/src/store/chat/slices/aiChat/actions/__tests__/gatewayEventHandler.test.ts
+++ b/src/store/chat/slices/aiChat/actions/__tests__/gatewayEventHandler.test.ts
@@ -1099,7 +1099,7 @@ describe('createGatewayEventHandler', () => {
// They describe what the gateway terminal path does NOW, not ideal
// behavior. If something reads like a bug it is locked as-is with a note.
describe('gateway terminal characterization (lifecycle refactor regression net)', () => {
- // POST-LOBE-10379 CONTRACT: the `error` event FAILS the operation
+ // CONTRACT: the `error` event FAILS the operation
// (`failOperation`) via the shared run lifecycle β€” an errored run is a failed
// run, not a completed one. Like `agent_runtime_end`'s cancel/park endings it
// does NOT mark the topic unread (no unread badge for a failed generation).
@@ -1240,7 +1240,7 @@ describe('createGatewayEventHandler', () => {
},
);
- // POST-LOBE-10379: the agent_runtime_end handler completes the op once via
+ // the agent_runtime_end handler completes the op once via
// the shared run lifecycle, and gateway.ts onSessionComplete no longer
// double-completes (it only completes as the terminal-missing fallback). The
// reducer is still idempotent (a stray second completeOperation on an
diff --git a/src/store/chat/slices/aiChat/actions/__tests__/heterogeneousAgentExecutor.test.ts b/src/store/chat/slices/aiChat/actions/__tests__/heterogeneousAgentExecutor.test.ts
index 2c07f7280c3..b4b40243767 100644
--- a/src/store/chat/slices/aiChat/actions/__tests__/heterogeneousAgentExecutor.test.ts
+++ b/src/store/chat/slices/aiChat/actions/__tests__/heterogeneousAgentExecutor.test.ts
@@ -3801,9 +3801,9 @@ describe('heterogeneousAgentExecutor DB persistence', () => {
expect(mockSetBadgeCount).not.toHaveBeenCalled();
});
- // ── 2. metadata-save failure isolation (POST-LOBE-10379: guarded) ──
+ // ── 2. metadata-save failure isolation (guarded) ──
it('a rejected updateTopicMetadata is swallowed and no longer blocks the queue drain', async () => {
- // POST-LOBE-10379 ("heteroSessionId δΏε­˜β€¦ε€±θ΄₯δΈι˜»ζ–­ core"): the metadata save
+ // The metadata save
// is now `.catch`-guarded, so a rejection is logged but does NOT throw past
// the drain block. The executor still resolves cleanly (no error escapes),
// the completion notification still fires, AND β€” unlike the old unguarded
@@ -3853,7 +3853,7 @@ describe('heterogeneousAgentExecutor DB persistence', () => {
expect(threw).toBe(false);
// The completion notification still fired (afterRunComplete in onComplete).
expect(mockSetBadgeCount).toHaveBeenCalledWith(1);
- // POST-LOBE-10379: the guarded metadata save no longer bypasses the drain.
+ // The guarded metadata save no longer bypasses the drain.
expect(store.drainQueuedMessages).toHaveBeenCalled();
});
diff --git a/src/store/chat/slices/aiChat/actions/__tests__/streamingExecutor.test.ts b/src/store/chat/slices/aiChat/actions/__tests__/streamingExecutor.test.ts
index fe1b77573a2..715adcac7bd 100644
--- a/src/store/chat/slices/aiChat/actions/__tests__/streamingExecutor.test.ts
+++ b/src/store/chat/slices/aiChat/actions/__tests__/streamingExecutor.test.ts
@@ -2222,7 +2222,7 @@ describe('StreamingExecutor actions', () => {
// 2. A new operation will be created when user approves/rejects
expect(result.current.operations[operationId!].status).toBe('completed');
// Parked β‰  terminal: NO `client.runtime.complete` is emitted β€” the run has
- // not ended, it is waiting for human approval (LOBE-10382). Previously this
+ // not ended, it is waiting for human approval β€” parked states do not emit
// mis-emitted a terminal `cancelled` complete signal.
const completeCall = agentSignalBridgeMock.emitClientAgentSignalSourceEvent.mock.calls.find(
(c: any) => c[0]?.sourceType === 'client.runtime.complete',
@@ -2568,7 +2568,7 @@ describe('StreamingExecutor actions', () => {
// Parked states (run β‰  operation): parked is NOT terminal, so it fires no
// terminal side effects and emits no `client.runtime.complete`. The run
- // resumes under a new operation when the user acts (LOBE-10382).
+ // resumes under a new operation when the user acts.
const pinStep = (operationId: string, status: AgentState['status']) => {
vi.spyOn(agentRuntime.AgentRuntime.prototype, 'step').mockResolvedValue({
events: [],
@@ -2602,7 +2602,7 @@ describe('StreamingExecutor actions', () => {
expect(result.current.operations[operationId].status).toBe('running');
expect(drainQueuedMessages).not.toHaveBeenCalled();
- // No `client.runtime.complete` β€” the run has not ended (LOBE-10382).
+ // No `client.runtime.complete` β€” the run has not ended (parked β‰  terminal).
const completeCall = agentSignalBridgeMock.emitClientAgentSignalSourceEvent.mock.calls.find(
(c: any) => c[0]?.sourceType === 'client.runtime.complete',
);
diff --git a/src/store/chat/slices/aiChat/actions/conversationLifecycle.ts b/src/store/chat/slices/aiChat/actions/conversationLifecycle.ts
index 5a05f75ac4f..c6d991125e8 100644
--- a/src/store/chat/slices/aiChat/actions/conversationLifecycle.ts
+++ b/src/store/chat/slices/aiChat/actions/conversationLifecycle.ts
@@ -469,7 +469,7 @@ export class ConversationLifecycleActionImpl {
// Shared run lifecycle for the post-persist topic-title hook. Built once here
// so all three runtime branches fire the SAME `afterUserMessagePersisted`
- // (LOBE-10379 "θ‘₯ι½ηΌΊεˆ— title" β€” gateway/hetero previously had no LLM title).
+ // β€” gateway/hetero previously had no LLM title before the unified lifecycle.
// `parentMessage*` are unused by this hook.
const sendRunScope: RunScope =
operationContext.scope === 'sub_agent' ? 'sub_agent' : 'top_level';
@@ -662,7 +662,7 @@ export class ConversationLifecycleActionImpl {
// Complete sendMessage operation, start ACP execution as child operation
this.#get().completeOperation(operationId);
- // Topic title (LOBE-10379): hetero used to set only a sliced placeholder
+ // Topic title: hetero used to set only a sliced placeholder
// title on new topics β€” upgrade it to the LLM summary via the shared hook
// (reads the just-persisted conversation from the store). Fire-and-forget.
void sendRunLifecycle
@@ -766,7 +766,7 @@ export class ConversationLifecycleActionImpl {
tempMessageIds: [tempAssistantId],
});
- // Topic title (LOBE-10379): gateway-created topics had no LLM-summarized
+ // Topic title: gateway-created topics had no LLM-summarized
// title. executeGatewayAgent has already replaced messages + switched to
// the new topic, so the shared hook reads the persisted conversation from
// the store and titles it. Fire-and-forget.
@@ -1029,7 +1029,7 @@ export class ConversationLifecycleActionImpl {
if (data.topicId) this.#get().internal_updateTopicLoading(data.topicId, true);
// Topic title auto-generation, now via the shared `afterUserMessagePersisted`
- // hook (LOBE-10379). The client passes its freshly-created `data.messages`
+ // hook. The client passes its freshly-created `data.messages`
// (not yet in the store under the real topicId); gateway/hetero call the same
// hook from their branches and let it read the persisted conversation.
void sendRunLifecycle
diff --git a/src/store/chat/slices/aiChat/actions/gatewayEventHandler.ts b/src/store/chat/slices/aiChat/actions/gatewayEventHandler.ts
index 6bf0183e242..8a48ac25284 100644
--- a/src/store/chat/slices/aiChat/actions/gatewayEventHandler.ts
+++ b/src/store/chat/slices/aiChat/actions/gatewayEventHandler.ts
@@ -782,8 +782,9 @@ export const createGatewayEventHandler = (
get().internal_toggleToolCallingStreaming(currentAssistantMessageId, undefined);
endReasoningIfNeeded();
- // An errored run is a FAILED run, not a completed one (LOBE-10379
- // "error→fail"). For gateway, drive the terminal disposition through the
+ // An errored run is a FAILED run, not a completed one β€” failed runs
+ // receive no unread badge, no queue drain, and no notification.
+ // For gateway, drive the terminal disposition through the
// shared lifecycle so the op lands in `failed` (no unread badge, no queue
// drain, no notification). hetero never forwards `error` to this handler
// (its executor routes errors through persistTerminalError), but keep the
diff --git a/src/store/chat/slices/aiChat/actions/heterogeneousAgentExecutor.ts b/src/store/chat/slices/aiChat/actions/heterogeneousAgentExecutor.ts
index 448ea5e4364..9909fadebba 100644
--- a/src/store/chat/slices/aiChat/actions/heterogeneousAgentExecutor.ts
+++ b/src/store/chat/slices/aiChat/actions/heterogeneousAgentExecutor.ts
@@ -347,7 +347,7 @@ export const executeHeterogeneousAgent = async (
const adapterType = resolveAdapterType(heterogeneousProvider);
- // Shared run lifecycle (LOBE-10379). Hetero owns its terminal lifecycle here
+ // Shared run lifecycle β€” hetero owns its terminal lifecycle here
// (the desktop notification via `afterRunComplete`); the queue drain + op
// completion stay in this executor's flow because the resume-session-id save
// must run before the drain. `parentMessage*` are unused for non-client.
@@ -1356,10 +1356,10 @@ export const executeHeterogeneousAgent = async (
eventHandler(terminalEvent);
}
- // Signal completion to the user β€” dock badge + (window-hidden) notification.
- // Relocated into the shared `afterRunComplete` hook (LOBE-10379 "ι€šηŸ₯η»ŸδΈ€εˆ°
- // afterRunComplete"): it does the same showNotification + setBadgeCount
- // fan-out for non-client runtimes. The body is resolved here from the
+ // Signal completion to the user β€” dock badge + (window-hidden) notification,
+ // delegated to the shared `afterRunComplete` hook. It does the same
+ // showNotification + setBadgeCount fan-out for non-client runtimes.
+ // The body is resolved here from the
// in-memory accumulated content (the store snapshot isn't durable yet).
// Skip for aborted runs and for error terminations.
if (!isAborted() && !isErrorTerminal) {
@@ -1438,7 +1438,7 @@ export const executeHeterogeneousAgent = async (
.getSessionInfo(agentSessionId)
.catch(() => undefined);
if (sessionInfo?.agentSessionId && context.topicId) {
- // Best-effort (LOBE-10379 "heteroSessionId δΏε­˜β€¦ε€±θ΄₯δΈι˜»ζ–­ core"): a rejected
+ // Best-effort: a rejected
// metadata save must NOT throw past the queue drain below β€” guarding the
// await here keeps the resume-id persistence from blocking the follow-up
// send. The save still runs BEFORE the drain so the next turn's
diff --git a/src/store/chat/slices/aiChat/actions/runLifecycle/buildRunLifecycle.ts b/src/store/chat/slices/aiChat/actions/runLifecycle/buildRunLifecycle.ts
index 6bb4e8c184a..45c2d9029fa 100644
--- a/src/store/chat/slices/aiChat/actions/runLifecycle/buildRunLifecycle.ts
+++ b/src/store/chat/slices/aiChat/actions/runLifecycle/buildRunLifecycle.ts
@@ -128,7 +128,8 @@ const NOOP = async () => {};
* be reused as the shared implementation when gateway/hetero are wired in the
* follow-up entry convergence. `completeRun` handles only TERMINAL states;
* parked states route to `onRunParked` and fire no terminal side effects β€” a
- * run is not complete while it is parked (see LOBE-10382).
+ * run is not complete while it is parked β€” parked states are non-terminal and
+ * must not emit terminal side effects (title, queue drain, notification, unread).
*/
export const buildRunLifecycle = (
get: () => ChatStore,
@@ -173,9 +174,9 @@ export const buildRunLifecycle = (
return {
afterUserMessagePersisted: async (event: UserMessagePersistedEvent) => {
- // Topic title auto-generation. Single home for all three runtimes
- // (LOBE-10379 "θ‘₯ι½ηΌΊεˆ— title"): the client used to do this inline in
- // sendMessage and gateway/hetero had no LLM-summarized title at all.
+ // Topic title auto-generation. Single home for all three runtimes β€”
+ // the client used to do this inline in sendMessage and gateway/hetero
+ // had no LLM-summarized title at all before the unified lifecycle.
// Top-level only β€” a nested sub-agent / `/compact` run must not retitle the
// user's topic. See RunScope.
if (adapter.runScope !== 'top_level') return;
@@ -230,7 +231,8 @@ export const buildRunLifecycle = (
},
afterRunComplete: async (event: RunCompleteEvent) => {
// Desktop notification + dock badge. Single home for all three runtimes'
- // completion notification (LOBE-10379 "ι€šηŸ₯εŽ»ι‡οΌŒη»ŸδΈ€εˆ° afterRunComplete").
+ // completion notification β€” unified in afterRunComplete so every transport
+ // fires the same notification/badge logic exactly once.
// Top-level-only: a nested sub-agent finishing is not a user-facing run
// completion β€” the parent run is still going, so it must not fire a
// "generation finished" notification / badge. See RunScope.