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

推荐订阅源

人人都是产品经理
人人都是产品经理
Apple Machine Learning Research
Apple Machine Learning Research
云风的 BLOG
云风的 BLOG
罗磊的独立博客
博客园 - 三生石上(FineUI控件)
量子位
GbyAI
GbyAI
腾讯CDC
T
Tailwind CSS Blog
博客园 - Franky
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
D
Docker
G
Google Developers Blog
aimingoo的专栏
aimingoo的专栏
The GitHub Blog
The GitHub Blog
Microsoft Security Blog
Microsoft Security Blog
Stack Overflow Blog
Stack Overflow Blog
Hugging Face - Blog
Hugging Face - Blog
小众软件
小众软件
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
N
Netflix TechBlog - Medium
Jina AI
Jina AI
IT之家
IT之家
Y
Y Combinator Blog

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
test: tighten command queue assertions · openclaw/opencla...
steipete · 2026-05-11 · via Recent Commits to openclaw:main

@@ -62,6 +62,22 @@ function enqueueBlockedMainTask<T = void>(

6262

return { task, release: deferred.resolve };

6363

}

646465+

function expectLaneSnapshotFields(

66+

lane: string,

67+

fields: Partial<ReturnType<CommandQueueModule["getCommandLaneSnapshot"]>>,

68+

): void {

69+

const snapshot = getCommandLaneSnapshot(lane);

70+

for (const [key, value] of Object.entries(fields)) {

71+

expect(snapshot[key as keyof typeof snapshot]).toBe(value);

72+

}

73+

}

74+75+

function diagnosticDebugMessages(): string[] {

76+

return diagnosticMocks.diag.debug.mock.calls

77+

.map(([message]) => message)

78+

.filter((message): message is string => typeof message === "string");

79+

}

80+6581

describe("command queue", () => {

6682

beforeAll(async () => {

6783

({

@@ -184,9 +200,11 @@ describe("command queue", () => {

184200

).rejects.toBe(error);

185201186202

expect(diagnosticMocks.diag.error).not.toHaveBeenCalled();

187-

expect(diagnosticMocks.diag.debug).toHaveBeenCalledWith(

188-

expect.stringContaining("lane task interrupted: lane=nested"),

189-

);

203+

expect(

204+

diagnosticDebugMessages().some((message) =>

205+

message.includes("lane task interrupted: lane=nested"),

206+

),

207+

).toBe(true);

190208

});

191209192210

it("getActiveTaskCount returns count of currently executing tasks", async () => {

@@ -342,7 +360,7 @@ describe("command queue", () => {

342360

});

343361344362

expect(secondRan).toBe(false);

345-

expect(getCommandLaneSnapshot(lane)).toMatchObject({

363+

expectLaneSnapshotFields(lane, {

346364

activeCount: 1,

347365

queuedCount: 1,

348366

});

@@ -352,7 +370,7 @@ describe("command queue", () => {

352370

await firstRejected;

353371

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

354372

expect(secondRan).toBe(true);

355-

expect(getCommandLaneSnapshot(lane)).toMatchObject({

373+

expectLaneSnapshotFields(lane, {

356374

activeCount: 0,

357375

queuedCount: 0,

358376

});

@@ -373,7 +391,7 @@ describe("command queue", () => {

373391374392

await Promise.resolve();

375393

expect(ran).toBe(false);

376-

expect(getCommandLaneSnapshot(lane)).toMatchObject({

394+

expectLaneSnapshotFields(lane, {

377395

activeCount: 0,

378396

queuedCount: 1,

379397

maxConcurrent: 0,

@@ -383,7 +401,7 @@ describe("command queue", () => {

383401384402

await expect(task).resolves.toBe("resumed");

385403

expect(ran).toBe(true);

386-

expect(getCommandLaneSnapshot(lane)).toMatchObject({

404+

expectLaneSnapshotFields(lane, {

387405

activeCount: 0,

388406

queuedCount: 0,

389407

maxConcurrent: 1,

@@ -401,7 +419,7 @@ describe("command queue", () => {

401419

});

402420

const second = enqueueCommandInLane(lane, async () => "second");

403421404-

expect(getCommandLaneSnapshot(lane)).toMatchObject({

422+

expectLaneSnapshotFields(lane, {

405423

lane,

406424

activeCount: 1,

407425

queuedCount: 1,

@@ -436,10 +454,12 @@ describe("command queue", () => {

436454

(snapshot) => snapshot.lane === alphaLane || snapshot.lane === betaLane,

437455

);

438456

expect(snapshots.map((snapshot) => snapshot.lane)).toEqual([alphaLane, betaLane]);

439-

expect(snapshots).toEqual([

440-

expect.objectContaining({ lane: alphaLane, activeCount: 1, queuedCount: 0 }),

441-

expect.objectContaining({ lane: betaLane, activeCount: 1, queuedCount: 0 }),

442-

]);

457+

expect(snapshots[0]?.lane).toBe(alphaLane);

458+

expect(snapshots[0]?.activeCount).toBe(1);

459+

expect(snapshots[0]?.queuedCount).toBe(0);

460+

expect(snapshots[1]?.lane).toBe(betaLane);

461+

expect(snapshots[1]?.activeCount).toBe(1);

462+

expect(snapshots[1]?.queuedCount).toBe(0);

443463444464

alphaBlocker.resolve();

445465

betaBlocker.resolve();