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

推荐订阅源

C
Check Point Blog
有赞技术团队
有赞技术团队
博客园 - 三生石上(FineUI控件)
博客园_首页
博客园 - 【当耐特】
WordPress大学
WordPress大学
月光博客
月光博客
博客园 - 叶小钗
S
SegmentFault 最新的问题
雷峰网
雷峰网
H
Help Net Security
宝玉的分享
宝玉的分享
A
About on SuperTechFans
IT之家
IT之家
J
Java Code Geeks
Hugging Face - Blog
Hugging Face - Blog
D
DataBreaches.Net
酷 壳 – CoolShell
酷 壳 – CoolShell
博客园 - 聂微东
T
The Blog of Author Tim Ferriss
B
Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
H
Hackread – Cybersecurity News, Data Breaches, AI and More
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
fix(doctor): warn for scoped channel fallbacks · openclaw...
stainlu · 2026-05-11 · via Recent Commits to openclaw:main
Original file line numberDiff line numberDiff line change

@@ -613,4 +613,43 @@ describe("doctor preview warnings", () => {

613613

expect(warnings.join("\n")).not.toContain("commander");

614614

expect(warnings.join("\n")).not.toContain("discord");

615615

});

616+
617+

it("warns for default-routed traffic when a channel only has scoped routes", () => {

618+

const warnings = collectChannelBoundMessageToolPolicyWarnings({

619+

channels: {

620+

discord: {},

621+

},

622+

agents: {

623+

list: [

624+

{

625+

id: "main",

626+

default: true,

627+

tools: {

628+

allow: ["read"],

629+

},

630+

},

631+

{

632+

id: "commander",

633+

tools: {

634+

profile: "messaging",

635+

},

636+

},

637+

],

638+

},

639+

bindings: [

640+

{

641+

agentId: "commander",

642+

match: {

643+

channel: "discord",

644+

accountId: "workspace-1",

645+

},

646+

},

647+

],

648+

});

649+
650+

expect(warnings).toEqual([

651+

expect.stringContaining('Agent "main" is routed from channel "discord"'),

652+

]);

653+

expect(warnings.join("\n")).not.toContain("commander");

654+

});

616655

});

Original file line numberDiff line numberDiff line change

@@ -222,6 +222,14 @@ function formatChannelList(channels: string[]): string {

222222

.join(", ")}, and ${channels.length - 2} more`;

223223

}

224224
225+

function isUnscopedChannelRouteBinding(binding: AgentRouteBinding): boolean {

226+

const match = binding.match;

227+

const accountId = match.accountId?.trim();

228+

const hasScopedAccount = Boolean(accountId && accountId !== "*");

229+

const hasRoles = Array.isArray(match.roles) && match.roles.length > 0;

230+

return !hasScopedAccount && !match.peer && !match.guildId && !match.teamId && !hasRoles;

231+

}

232+
225233

function collectBoundChannelTargets(cfg: OpenClawConfig): Array<{

226234

agentId: string;

227235

channels: string[];

@@ -242,18 +250,18 @@ function collectBoundChannelTargets(cfg: OpenClawConfig): Array<{

242250

};

243251
244252

const routeBindings: AgentRouteBinding[] = listRouteBindings(cfg);

245-

const explicitlyBoundChannels = new Set<string>();

253+

const fullyCoveredChannels = new Set<string>();

246254

for (const binding of routeBindings) {

247255

const channel = binding.match.channel.trim();

248256

add(binding.agentId, channel);

249-

if (channel) {

250-

explicitlyBoundChannels.add(channel);

257+

if (channel && isUnscopedChannelRouteBinding(binding)) {

258+

fullyCoveredChannels.add(channel);

251259

}

252260

}

253261
254262

const defaultAgentId = resolveDefaultAgentId(cfg);

255263

for (const channel of listConfiguredChannelIds(cfg)) {

256-

if (!explicitlyBoundChannels.has(channel)) {

264+

if (!fullyCoveredChannels.has(channel)) {

257265

add(defaultAgentId, channel);

258266

}

259267

}