惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

D
Docker
月光博客
月光博客
B
Blog RSS Feed
C
Check Point Blog
WordPress大学
WordPress大学
T
Tailwind CSS Blog
GbyAI
GbyAI
H
Help Net Security
Y
Y Combinator Blog
I
InfoQ
雷峰网
雷峰网
阮一峰的网络日志
阮一峰的网络日志
小众软件
小众软件
美团技术团队
博客园 - 三生石上(FineUI控件)
MongoDB | Blog
MongoDB | Blog
Jina AI
Jina AI
A
About on SuperTechFans
G
Google Developers Blog
爱范儿
爱范儿
F
Fortinet All Blogs
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
U
Unit 42
人人都是产品经理
人人都是产品经理

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
fix(queue): restart dormant followup drains (#95039) · op...
steipete · 2026-06-20 · via Recent Commits to openclaw:main

@@ -135,6 +135,26 @@ import type { TypingController } from "./typing.js";

135135136136

const BLOCK_REPLY_SEND_TIMEOUT_MS = 15_000;

137137138+

function scheduleFollowupDrainAfterReplyOperationClear(params: {

139+

operation: ReplyOperation;

140+

queueKey: string;

141+

runFollowup: (run: FollowupRun) => Promise<void>;

142+

}): void {

143+

runAfterReplyOperationClear(params.operation, (admissionSessionId) => {

144+

const completedSessionId = params.operation.sessionId;

145+

const runFollowupAfterClear =

146+

admissionSessionId === completedSessionId

147+

? params.runFollowup

148+

: (queued: FollowupRun) =>

149+

params.runFollowup(

150+

queued.run.sessionId === completedSessionId

151+

? { ...queued, admissionSessionId }

152+

: queued,

153+

);

154+

scheduleFollowupDrain(params.queueKey, runFollowupAfterClear);

155+

});

156+

}

157+138158

function markBeforeAgentRunBlockedPayloads(payloads: ReplyPayload[]): ReplyPayload[] {

139159

return payloads.map((payload) =>

140160

setReplyPayloadMetadata(payload, { beforeAgentRunBlocked: true }),

@@ -1317,12 +1337,19 @@ export async function runReplyAgent(params: {

13171337

typing.cleanup();

13181338

return undefined;

13191339

}

1320-

// Re-check liveness after enqueue so a stale active snapshot cannot leave

1321-

// the followup queue idle if the original run already finished.

1322-

const queuedBehindActiveRun = isRunActive?.() === true;

1323-

if (!queuedBehindActiveRun) {

1340+

// The queue must stay dormant while the active owner can still collect

1341+

// messages. Registering after enqueue closes the owner-clear race.

1342+

const activeReplyOperation = replyRunRegistry.get(queueKey);

1343+

if (activeReplyOperation) {

1344+

scheduleFollowupDrainAfterReplyOperationClear({

1345+

operation: activeReplyOperation,

1346+

queueKey,

1347+

runFollowup: queuedRunFollowupTurn,

1348+

});

1349+

} else {

13241350

scheduleFollowupDrain(queueKey, queuedRunFollowupTurn);

13251351

}

1352+

const queuedBehindActiveRun = isRunActive?.() === true;

13261353

await touchActiveSessionEntry();

13271354

if (queuedBehindActiveRun) {

13281355

await typingSignals.signalToolStart();

@@ -1464,19 +1491,6 @@ export async function runReplyAgent(params: {

14641491

shouldDrainQueuedFollowupsAfterClear = true;

14651492

return value;

14661493

};

1467-

const drainQueuedFollowupsAfterClear = (admissionSessionId: string) => {

1468-

const completedSessionId = replyOperation.sessionId;

1469-

const runFollowupAfterClear =

1470-

admissionSessionId === completedSessionId

1471-

? runFollowupTurn

1472-

: (queued: FollowupRun) =>

1473-

runFollowupTurn(

1474-

queued.run.sessionId === completedSessionId

1475-

? { ...queued, admissionSessionId }

1476-

: queued,

1477-

);

1478-

scheduleFollowupDrain(queueKey, runFollowupAfterClear);

1479-

};

14801494

const restartRecoveryDeliveryRunId = crypto.randomUUID();

14811495

let trackedRestartRecoveryDeliveryContext = false;

14821496

const persistRestartRecoveryDeliveryContext = async (): Promise<void> => {

@@ -2625,10 +2639,13 @@ export async function runReplyAgent(params: {

26252639

);

26262640

}

26272641

if (shouldDrainQueuedFollowupsAfterClear) {

2628-

if (providedReplyOperation) {

2629-

runAfterReplyOperationClear(replyOperation, drainQueuedFollowupsAfterClear);

2630-

} else {

2631-

replyOperation.completeThen(() => drainQueuedFollowupsAfterClear(replyOperation.sessionId));

2642+

scheduleFollowupDrainAfterReplyOperationClear({

2643+

operation: replyOperation,

2644+

queueKey,

2645+

runFollowup: runFollowupTurn,

2646+

});

2647+

if (!providedReplyOperation) {

2648+

replyOperation.complete();

26322649

}

26332650

} else if (!providedReplyOperation) {

26342651

replyOperation.complete();