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

推荐订阅源

P
Proofpoint News Feed
Blog — PlanetScale
Blog — PlanetScale
GbyAI
GbyAI
C
Check Point Blog
腾讯CDC
Stack Overflow Blog
Stack Overflow Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
The GitHub Blog
The GitHub Blog
A
About on SuperTechFans
Recent Announcements
Recent Announcements
L
LangChain Blog
Microsoft Azure Blog
Microsoft Azure Blog
小众软件
小众软件
J
Java Code Geeks
博客园_首页
Jina AI
Jina AI
美团技术团队
H
Help Net Security
MyScale Blog
MyScale Blog
Engineering at Meta
Engineering at Meta
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
人人都是产品经理
人人都是产品经理
Y
Y Combinator Blog
S
SegmentFault 最新的问题

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(process): clarify lane wait diagnostics (#82792) · op...
galiniliev · 2026-05-17 · via Recent Commits to openclaw:main

@@ -219,6 +219,55 @@ describe("command queue", () => {

219219

expect(calls).toEqual(["first", "second"]);

220220

});

221221222+

it("reports queueAhead after priority insertion", async () => {

223+

vi.useFakeTimers();

224+

try {

225+

const { task: blocker, release } = enqueueBlockedMainTask(async () => "blocker");

226+

const calls: string[] = [];

227+

let queuedAhead: number | null = null;

228+229+

const background = enqueueCommandInLane(

230+

CommandLane.Main,

231+

async () => {

232+

calls.push("background");

233+

return "background";

234+

},

235+

{ priority: "background" },

236+

);

237+

const foreground = enqueueCommandInLane(

238+

CommandLane.Main,

239+

async () => {

240+

calls.push("foreground");

241+

return "foreground";

242+

},

243+

{

244+

priority: "foreground",

245+

warnAfterMs: 5,

246+

onWait: (_ms, ahead) => {

247+

queuedAhead = ahead;

248+

},

249+

},

250+

);

251+252+

await vi.advanceTimersByTimeAsync(6);

253+

release();

254+

await expect(blocker).resolves.toBe("blocker");

255+

await expect(foreground).resolves.toBe("foreground");

256+

await expect(background).resolves.toBe("background");

257+258+

expect(calls).toEqual(["foreground", "background"]);

259+

expect(queuedAhead).toBe(0);

260+

const waitWarning = diagnosticMocks.diag.warn.mock.calls.find(

261+

([message]) =>

262+

typeof message === "string" && message.includes("lane wait exceeded: lane=main"),

263+

);

264+

expect(waitWarning?.[0]).toContain("queueAhead=0 activeAhead=1");

265+

expect(waitWarning?.[0]).toContain("queueBehind=1");

266+

} finally {

267+

vi.useRealTimers();

268+

}

269+

});

270+222271

it("logs enqueue depth after push", async () => {

223272

const task = enqueueCommand(async () => {});

224273

@@ -254,6 +303,11 @@ describe("command queue", () => {

254303

expect(typeof waited).toBe("number");

255304

expect(waited).toBeGreaterThanOrEqual(5);

256305

expect(queuedAhead).toBe(0);

306+

const waitWarning = diagnosticMocks.diag.warn.mock.calls.find(

307+

([message]) =>

308+

typeof message === "string" && message.includes("lane wait exceeded: lane=main"),

309+

);

310+

expect(waitWarning?.[0]).toContain("queueAhead=0 activeAhead=1");

257311

} finally {

258312

vi.useRealTimers();

259313

}

@@ -729,6 +783,64 @@ describe("command queue", () => {

729783

}

730784

});

731785786+

it("migrates legacy queued entries missing priority and wait diagnostics", async () => {

787+

const key = Symbol.for("openclaw.commandQueueState");

788+

const globalStore = globalThis as Record<PropertyKey, unknown>;

789+

const original = globalStore[key];

790+

let queuedAhead: number | null = null;

791+

const legacyTask = new Promise<string>((resolve, reject) => {

792+

globalStore[key] = {

793+

gatewayDraining: false,

794+

lanes: new Map([

795+

[

796+

CommandLane.Main,

797+

{

798+

lane: CommandLane.Main,

799+

queue: [

800+

{

801+

task: async () => "done",

802+

resolve,

803+

reject,

804+

enqueuedAt: Date.now() - 10,

805+

warnAfterMs: 0,

806+

onWait: (_ms: number, ahead: number) => {

807+

queuedAhead = ahead;

808+

},

809+

},

810+

],

811+

activeTaskIds: new Set(),

812+

maxConcurrent: 1,

813+

draining: false,

814+

generation: 0,

815+

},

816+

],

817+

]),

818+

activeTaskWaiters: new Set(),

819+

nextTaskId: 1,

820+

nextQueueSequence: 1,

821+

};

822+

});

823+824+

try {

825+

resetAllLanes();

826+827+

await expect(legacyTask).resolves.toBe("done");

828+

expect(queuedAhead).toBe(0);

829+

const waitWarning = diagnosticMocks.diag.warn.mock.calls.find(

830+

([message]) =>

831+

typeof message === "string" && message.includes("lane wait exceeded: lane=main"),

832+

);

833+

expect(waitWarning?.[0]).toContain("queueAhead=0 activeAhead=0");

834+

} finally {

835+

if (original !== undefined) {

836+

globalStore[key] = original;

837+

} else {

838+

delete globalStore[key];

839+

}

840+

resetCommandQueueStateForTest();

841+

}

842+

});

843+732844

it("shares lane state across distinct module instances", async () => {

733845

const commandQueueA = await importFreshModule<typeof import("./command-queue.js")>(

734846

import.meta.url,