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

推荐订阅源

Blog — PlanetScale
Blog — PlanetScale
J
Java Code Geeks
月光博客
月光博客
Engineering at Meta
Engineering at Meta
WordPress大学
WordPress大学
Jina AI
Jina AI
小众软件
小众软件
U
Unit 42
云风的 BLOG
云风的 BLOG
Stack Overflow Blog
Stack Overflow Blog
雷峰网
雷峰网
博客园 - Franky
Microsoft Security Blog
Microsoft Security Blog
罗磊的独立博客
宝玉的分享
宝玉的分享
B
Blog
C
Check Point Blog
爱范儿
爱范儿
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
量子位
阮一峰的网络日志
阮一峰的网络日志
Vercel News
Vercel News
酷 壳 – CoolShell
酷 壳 – CoolShell

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(cron): preflight implicit announce targets (#78644) ·...
sallyom · 2026-05-07 · via Recent Commits to openclaw:main

@@ -1,4 +1,4 @@

1-

import { afterEach, beforeEach, describe, expect, it } from "vitest";

1+

import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";

22

import type { SkillSnapshot } from "../../agents/skills.js";

33

import type { CronDeliveryMode } from "../types.js";

44

import type { MutableCronSession } from "./run-session-state.js";

@@ -695,16 +695,17 @@ describe("runCronIsolatedAgentTurn message tool policy", () => {

695695

resolveCronDeliveryPlanMock.mockReturnValue({

696696

requested: true,

697697

mode: "announce",

698-

channel: "last",

698+

channel: "messagechat",

699+

to: "bad-target",

699700

});

700701

resolveDeliveryTargetMock.mockResolvedValue({

701702

ok: false,

702-

channel: undefined,

703+

channel: "messagechat",

703704

to: undefined,

704705

accountId: undefined,

705706

threadId: undefined,

706-

mode: "implicit",

707-

error: new Error("sessionKey is required to resolve delivery.channel=last"),

707+

mode: "explicit",

708+

error: new Error("Invalid delivery target: unknown recipient"),

708709

});

709710

runEmbeddedPiAgentMock.mockResolvedValue(

710711

makeMessageToolRunResult([{ tool: "message", provider: "messagechat", to: "123" }]),

@@ -720,15 +721,64 @@ describe("runCronIsolatedAgentTurn message tool policy", () => {

720721

unverifiedMessagingToolDelivery: true,

721722

}),

722723

);

724+

expect(result.delivery).toEqual(

725+

expect.objectContaining({

726+

intended: { channel: "messagechat", to: "bad-target", source: "explicit" },

727+

resolved: expect.objectContaining({

728+

ok: false,

729+

channel: "messagechat",

730+

source: "explicit",

731+

error: "Invalid delivery target: unknown recipient",

732+

}),

733+

messageToolSentTo: [{ channel: "messagechat", to: "123" }],

734+

fallbackUsed: false,

735+

delivered: false,

736+

}),

737+

);

738+

});

739+740+

it("fails implicit announce delivery before running the agent when last has no route", async () => {

741+

const onExecutionStarted = vi.fn();

742+

resolveCronDeliveryPlanMock.mockReturnValue({

743+

requested: true,

744+

mode: "announce",

745+

channel: "last",

746+

});

747+

resolveDeliveryTargetMock.mockResolvedValue({

748+

ok: false,

749+

channel: undefined,

750+

to: undefined,

751+

accountId: undefined,

752+

threadId: undefined,

753+

mode: "implicit",

754+

error: new Error("Channel is required when delivery.channel=last has no previous channel."),

755+

});

756+757+

const result = await runCronIsolatedAgentTurn({

758+

...makeParams(),

759+

onExecutionStarted,

760+

});

761+762+

expect(runEmbeddedPiAgentMock).not.toHaveBeenCalled();

763+

expect(dispatchCronDeliveryMock).not.toHaveBeenCalled();

764+

expect(onExecutionStarted).not.toHaveBeenCalled();

765+

expect(result).toEqual(

766+

expect.objectContaining({

767+

status: "error",

768+

error: "Channel is required when delivery.channel=last has no previous channel.",

769+

errorKind: "delivery-target",

770+

delivered: false,

771+

deliveryAttempted: false,

772+

}),

773+

);

723774

expect(result.delivery).toEqual(

724775

expect.objectContaining({

725776

intended: { channel: "last", to: null, source: "last" },

726777

resolved: expect.objectContaining({

727778

ok: false,

728779

source: "last",

729-

error: "sessionKey is required to resolve delivery.channel=last",

780+

error: "Channel is required when delivery.channel=last has no previous channel.",

730781

}),

731-

messageToolSentTo: [{ channel: "messagechat", to: "123" }],

732782

fallbackUsed: false,

733783

delivered: false,

734784

}),