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

推荐订阅源

C
Check Point Blog
IT之家
IT之家
V
Visual Studio Blog
The Cloudflare Blog
博客园 - 司徒正美
Jina AI
Jina AI
博客园_首页
阮一峰的网络日志
阮一峰的网络日志
美团技术团队
S
SegmentFault 最新的问题
博客园 - 聂微东
人人都是产品经理
人人都是产品经理
T
Tailwind CSS Blog
罗磊的独立博客
酷 壳 – CoolShell
酷 壳 – CoolShell
量子位
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Hugging Face - Blog
Hugging Face - Blog
博客园 - 【当耐特】
博客园 - 三生石上(FineUI控件)
爱范儿
爱范儿
博客园 - Franky
Last Week in AI
Last Week in AI
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知

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(agents): distill media lifecycle fixture · openclaw/...
obviyus · 2026-06-23 · via Recent Commits to openclaw:main

@@ -37,6 +37,20 @@ beforeEach(() => {

3737

taskRegistryDeliveryRuntimeMocks.sendMessage.mockReset();

3838

});

393940+

function createImageMediaLifecycle() {

41+

return createMediaGenerationTaskLifecycle({

42+

toolName: "image_generate",

43+

taskKind: "image_generation",

44+

label: "Image generation",

45+

queuedProgressSummary: "Queued image generation",

46+

generatedLabel: "image",

47+

failureProgressSummary: "Image generation failed",

48+

eventSource: "image_generation",

49+

announceType: "image generation task",

50+

completionLabel: "image",

51+

});

52+

}

53+4054

describe("shouldDetachMediaGenerationTask", () => {

4155

it("detaches session-backed media generation", () => {

4256

expect(shouldDetachMediaGenerationTask("agent:main:discord:direct:123")).toBe(true);

@@ -403,17 +417,7 @@ describe("createMediaGenerationTaskLifecycle", () => {

403417

subagentAnnounceDeliveryMocks.deliverSubagentAnnouncement.mockResolvedValueOnce({

404418

delivered: true,

405419

});

406-

const lifecycle = createMediaGenerationTaskLifecycle({

407-

toolName: "image_generate",

408-

taskKind: "image_generation",

409-

label: "Image generation",

410-

queuedProgressSummary: "Queued image generation",

411-

generatedLabel: "image",

412-

failureProgressSummary: "Image generation failed",

413-

eventSource: "image_generation",

414-

announceType: "image generation task",

415-

completionLabel: "image",

416-

});

420+

const lifecycle = createImageMediaLifecycle();

417421418422

const handle = lifecycle.createTaskRun({

419423

sessionKey: "agent:main:telegram:5866004662",

@@ -426,7 +430,6 @@ describe("createMediaGenerationTaskLifecycle", () => {

426430

accountId: "bot-1",

427431

});

428432429-

// Later session drift cannot change the route stored on the task handle.

430433

subagentAnnounceDeliveryMocks.loadRequesterSessionEntry.mockReturnValue({

431434

entry: {

432435

lastChannel: "telegram",

@@ -459,17 +462,7 @@ describe("createMediaGenerationTaskLifecycle", () => {

459462

lastAccountId: "bot-b",

460463

},

461464

});

462-

const lifecycle = createMediaGenerationTaskLifecycle({

463-

toolName: "image_generate",

464-

taskKind: "image_generation",

465-

label: "Image generation",

466-

queuedProgressSummary: "Queued image generation",

467-

generatedLabel: "image",

468-

failureProgressSummary: "Image generation failed",

469-

eventSource: "image_generation",

470-

announceType: "image generation task",

471-

completionLabel: "image",

472-

});

465+

const lifecycle = createImageMediaLifecycle();

473466474467

const handle = lifecycle.createTaskRun({

475468

sessionKey: "agent:main:telegram:shared",

@@ -503,17 +496,7 @@ describe("createMediaGenerationTaskLifecycle", () => {

503496

lastThreadId: 99,

504497

},

505498

});

506-

const lifecycle = createMediaGenerationTaskLifecycle({

507-

toolName: "image_generate",

508-

taskKind: "image_generation",

509-

label: "Image generation",

510-

queuedProgressSummary: "Queued image generation",

511-

generatedLabel: "image",

512-

failureProgressSummary: "Image generation failed",

513-

eventSource: "image_generation",

514-

announceType: "image generation task",

515-

completionLabel: "image",

516-

});

499+

const lifecycle = createImageMediaLifecycle();

517500518501

const handle = lifecycle.createTaskRun({

519502

sessionKey: "agent:main:telegram:room-a",

@@ -536,17 +519,7 @@ describe("createMediaGenerationTaskLifecycle", () => {

536519

lastAccountId: "bot-1",

537520

},

538521

});

539-

const lifecycle = createMediaGenerationTaskLifecycle({

540-

toolName: "image_generate",

541-

taskKind: "image_generation",

542-

label: "Image generation",

543-

queuedProgressSummary: "Queued image generation",

544-

generatedLabel: "image",

545-

failureProgressSummary: "Image generation failed",

546-

eventSource: "image_generation",

547-

announceType: "image generation task",

548-

completionLabel: "image",

549-

});

522+

const lifecycle = createImageMediaLifecycle();

550523551524

const handle = lifecycle.createTaskRun({

552525

sessionKey: "agent:main:telegram:room-a",

@@ -565,17 +538,7 @@ describe("createMediaGenerationTaskLifecycle", () => {

565538

subagentAnnounceDeliveryMocks.deliverSubagentAnnouncement.mockResolvedValueOnce({

566539

delivered: true,

567540

});

568-

const lifecycle = createMediaGenerationTaskLifecycle({

569-

toolName: "image_generate",

570-

taskKind: "image_generation",

571-

label: "Image generation",

572-

queuedProgressSummary: "Queued image generation",

573-

generatedLabel: "image",

574-

failureProgressSummary: "Image generation failed",

575-

eventSource: "image_generation",

576-

announceType: "image generation task",

577-

completionLabel: "image",

578-

});

541+

const lifecycle = createImageMediaLifecycle();

579542580543

await expect(

581544

lifecycle.wakeTaskCompletion({

@@ -603,17 +566,7 @@ describe("createMediaGenerationTaskLifecycle", () => {

603566

terminal: true,

604567

error: "generated media direct delivery failed after partial upload",

605568

});

606-

const lifecycle = createMediaGenerationTaskLifecycle({

607-

toolName: "image_generate",

608-

taskKind: "image_generation",

609-

label: "Image generation",

610-

queuedProgressSummary: "Queued image generation",

611-

generatedLabel: "image",

612-

failureProgressSummary: "Image generation failed",

613-

eventSource: "image_generation",

614-

announceType: "image generation task",

615-

completionLabel: "image",

616-

});

569+

const lifecycle = createImageMediaLifecycle();

617570618571

await expect(

619572

lifecycle.wakeTaskCompletion({

@@ -641,17 +594,7 @@ describe("createMediaGenerationTaskLifecycle", () => {

641594

error: "completion agent did not deliver generated media",

642595

});

643596

taskRegistryDeliveryRuntimeMocks.sendMessage.mockResolvedValueOnce({});

644-

const lifecycle = createMediaGenerationTaskLifecycle({

645-

toolName: "image_generate",

646-

taskKind: "image_generation",

647-

label: "Image generation",

648-

queuedProgressSummary: "Queued image generation",

649-

generatedLabel: "image",

650-

failureProgressSummary: "Image generation failed",

651-

eventSource: "image_generation",

652-

announceType: "image generation task",

653-

completionLabel: "image",

654-

});

597+

const lifecycle = createImageMediaLifecycle();

655598656599

await expect(

657600

lifecycle.wakeTaskCompletion({

@@ -765,17 +708,7 @@ describe("createMediaGenerationTaskLifecycle", () => {

765708

reason: "requester_abandoned",

766709

error: "requester session abandoned after timeout",

767710

});

768-

const lifecycle = createMediaGenerationTaskLifecycle({

769-

toolName: "image_generate",

770-

taskKind: "image_generation",

771-

label: "Image generation",

772-

queuedProgressSummary: "Queued image generation",

773-

generatedLabel: "image",

774-

failureProgressSummary: "Image generation failed",

775-

eventSource: "image_generation",

776-

announceType: "image generation task",

777-

completionLabel: "image",

778-

});

711+

const lifecycle = createImageMediaLifecycle();

779712780713

await expect(

781714

lifecycle.wakeTaskCompletion({

@@ -805,17 +738,7 @@ describe("createMediaGenerationTaskLifecycle", () => {

805738

path: "direct",

806739

error: "gateway request timeout for agent",

807740

});

808-

const lifecycle = createMediaGenerationTaskLifecycle({

809-

toolName: "image_generate",

810-

taskKind: "image_generation",

811-

label: "Image generation",

812-

queuedProgressSummary: "Queued image generation",

813-

generatedLabel: "image",

814-

failureProgressSummary: "Image generation failed",

815-

eventSource: "image_generation",

816-

announceType: "image generation task",

817-

completionLabel: "image",

818-

});

741+

const lifecycle = createImageMediaLifecycle();

819742820743

await expect(

821744

lifecycle.wakeTaskCompletion({