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

推荐订阅源

B
Blog RSS Feed
Martin Fowler
Martin Fowler
爱范儿
爱范儿
IT之家
IT之家
Last Week in AI
Last Week in AI
A
About on SuperTechFans
Google DeepMind News
Google DeepMind News
阮一峰的网络日志
阮一峰的网络日志
V
V2EX
aimingoo的专栏
aimingoo的专栏
G
Google Developers Blog
J
Java Code Geeks
Microsoft Azure Blog
Microsoft Azure Blog
美团技术团队
The Cloudflare Blog
MyScale Blog
MyScale Blog
T
The Blog of Author Tim Ferriss
Hugging Face - Blog
Hugging Face - Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
云风的 BLOG
云风的 BLOG
Y
Y Combinator Blog
The GitHub Blog
The GitHub Blog
腾讯CDC
Microsoft Security Blog
Microsoft Security 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
refactor(cron): centralize source delivery plan · opencla...
steipete · 2026-05-18 · via Recent Commits to openclaw:main

@@ -1,5 +1,5 @@

11

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

2-

import { matchesMessagingToolDeliveryTarget } from "./delivery-dispatch.js";

2+

import { sourceDeliveryTargetsMatch } from "../../infra/outbound/source-delivery-plan.js";

3344

// Mock the announce flow dependencies to test the fallback behavior.

55

vi.mock("../../agents/subagent-announce.js", () => ({

@@ -9,10 +9,10 @@ vi.mock("../../agents/subagent-registry-read.js", () => ({

99

countActiveDescendantRuns: vi.fn().mockReturnValue(0),

1010

}));

111112-

describe("matchesMessagingToolDeliveryTarget", () => {

12+

describe("sourceDeliveryTargetsMatch", () => {

1313

it("matches when channel and to agree", () => {

1414

expect(

15-

matchesMessagingToolDeliveryTarget(

15+

sourceDeliveryTargetsMatch(

1616

{ provider: "telegram", to: "123456" },

1717

{ channel: "telegram", to: "123456" },

1818

),

@@ -21,7 +21,7 @@ describe("matchesMessagingToolDeliveryTarget", () => {

21212222

it("rejects when channel differs", () => {

2323

expect(

24-

matchesMessagingToolDeliveryTarget(

24+

sourceDeliveryTargetsMatch(

2525

{ provider: "whatsapp", to: "123456" },

2626

{ channel: "telegram", to: "123456" },

2727

),

@@ -30,7 +30,7 @@ describe("matchesMessagingToolDeliveryTarget", () => {

30303131

it("rejects when to is missing from delivery", () => {

3232

expect(

33-

matchesMessagingToolDeliveryTarget(

33+

sourceDeliveryTargetsMatch(

3434

{ provider: "telegram", to: "123456" },

3535

{ channel: "telegram", to: undefined },

3636

),

@@ -39,25 +39,34 @@ describe("matchesMessagingToolDeliveryTarget", () => {

39394040

it("rejects when channel is missing from delivery", () => {

4141

expect(

42-

matchesMessagingToolDeliveryTarget(

42+

sourceDeliveryTargetsMatch(

4343

{ provider: "telegram", to: "123456" },

4444

{ channel: undefined, to: "123456" },

4545

),

4646

).toBe(false);

4747

});

484849-

it("strips :topic:NNN suffix from target.to before comparing", () => {

49+

it("matches topic suffixes against the resolved delivery thread", () => {

5050

expect(

51-

matchesMessagingToolDeliveryTarget(

51+

sourceDeliveryTargetsMatch(

5252

{ provider: "telegram", to: "-1003597428309:topic:462" },

53-

{ channel: "telegram", to: "-1003597428309" },

53+

{ channel: "telegram", to: "-1003597428309", threadId: 462 },

5454

),

5555

).toBe(true);

5656

});

575758+

it("rejects matching room targets when thread ids differ", () => {

59+

expect(

60+

sourceDeliveryTargetsMatch(

61+

{ provider: "telegram", to: "-1003597428309", threadId: "111" },

62+

{ channel: "telegram", to: "-1003597428309", threadId: 462 },

63+

),

64+

).toBe(false);

65+

});

66+5867

it("matches when provider is 'message' (generic)", () => {

5968

expect(

60-

matchesMessagingToolDeliveryTarget(

69+

sourceDeliveryTargetsMatch(

6170

{ provider: "message", to: "123456" },

6271

{ channel: "telegram", to: "123456" },

6372

),

@@ -66,7 +75,7 @@ describe("matchesMessagingToolDeliveryTarget", () => {

66756776

it("rejects when accountIds differ", () => {

6877

expect(

69-

matchesMessagingToolDeliveryTarget(

78+

sourceDeliveryTargetsMatch(

7079

{ provider: "telegram", to: "123456", accountId: "bot-a" },

7180

{ channel: "telegram", to: "123456", accountId: "bot-b" },

7281

),

@@ -75,7 +84,7 @@ describe("matchesMessagingToolDeliveryTarget", () => {

75847685

it("matches when delivery has accountId and target omits it (tool fills accountId at exec)", () => {

7786

expect(

78-

matchesMessagingToolDeliveryTarget(

87+

sourceDeliveryTargetsMatch(

7988

{ provider: "message", to: "123456" },

8089

{ channel: "telegram", to: "123456", accountId: "bot-a" },

8190

),

@@ -84,7 +93,7 @@ describe("matchesMessagingToolDeliveryTarget", () => {

84938594

it("matches when delivery and target carry the same accountId", () => {

8695

expect(

87-

matchesMessagingToolDeliveryTarget(

96+

sourceDeliveryTargetsMatch(

8897

{ provider: "telegram", to: "123456", accountId: "bot-a" },

8998

{ channel: "telegram", to: "123456", accountId: "bot-a" },

9099

),