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

推荐订阅源

博客园 - Franky
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
有赞技术团队
有赞技术团队
aimingoo的专栏
aimingoo的专栏
WordPress大学
WordPress大学
人人都是产品经理
人人都是产品经理
酷 壳 – CoolShell
酷 壳 – CoolShell
L
LangChain Blog
Blog — PlanetScale
Blog — PlanetScale
阮一峰的网络日志
阮一峰的网络日志
Microsoft Azure Blog
Microsoft Azure Blog
云风的 BLOG
云风的 BLOG
Google DeepMind News
Google DeepMind News
T
The Blog of Author Tim Ferriss
G
Google Developers Blog
Hugging Face - Blog
Hugging Face - Blog
Y
Y Combinator Blog
D
DataBreaches.Net
Engineering at Meta
Engineering at Meta
MyScale Blog
MyScale Blog
大猫的无限游戏
大猫的无限游戏
S
SegmentFault 最新的问题
The GitHub Blog
The GitHub Blog
Recent Announcements
Recent Announcements

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: slim routing cache rollover coverage · openclaw/ope...
steipete · 2026-04-18 · via Recent Commits to openclaw:main

@@ -1063,28 +1063,39 @@ describe("wildcard peer bindings (peer.id=*)", () => {

1063106310641064

describe("binding evaluation cache scalability", () => {

10651065

test("does not rescan full bindings after channel/account cache rollover (#36915)", () => {

1066-

const bindingCount = 2_001;

1066+

const cacheKeyCount = 2_001;

10671067

const cfg: OpenClawConfig = {

1068-

bindings: Array.from({ length: bindingCount }, (_, idx) => ({

1069-

agentId: `agent-${idx}`,

1070-

match: {

1071-

channel: "dingtalk",

1072-

accountId: `acct-${idx}`,

1073-

peer: { kind: "direct", id: `user-${idx}` },

1068+

bindings: [

1069+

{

1070+

agentId: "agent-0",

1071+

match: {

1072+

channel: "dingtalk",

1073+

accountId: "acct-0",

1074+

peer: { kind: "direct", id: "user-0" },

1075+

},

10741076

},

1075-

})),

1077+

],

10761078

};

10771079

const listBindingsSpy = vi.spyOn(routingBindings, "listBindings");

10781080

try {

1079-

for (let idx = 0; idx < bindingCount; idx += 1) {

1081+

const boundRoute = resolveAgentRoute({

1082+

cfg,

1083+

channel: "dingtalk",

1084+

accountId: "acct-0",

1085+

peer: { kind: "direct", id: "user-0" },

1086+

});

1087+

expect(boundRoute.agentId).toBe("agent-0");

1088+

expect(boundRoute.matchedBy).toBe("binding.peer");

1089+1090+

for (let idx = 1; idx < cacheKeyCount; idx += 1) {

10801091

const route = resolveAgentRoute({

10811092

cfg,

10821093

channel: "dingtalk",

10831094

accountId: `acct-${idx}`,

10841095

peer: { kind: "direct", id: `user-${idx}` },

10851096

});

1086-

expect(route.agentId).toBe(`agent-${idx}`);

1087-

expect(route.matchedBy).toBe("binding.peer");

1097+

expect(route.agentId).toBe("main");

1098+

expect(route.matchedBy).toBe("default");

10881099

}

1089110010901101

const repeated = resolveAgentRoute({

@@ -1099,4 +1110,36 @@ describe("binding evaluation cache scalability", () => {

10991110

listBindingsSpy.mockRestore();

11001111

}

11011112

});

1113+1114+

test("uses indexed channel/account bindings without per-route scans", () => {

1115+

const bindingCount = 101;

1116+

const cfg: OpenClawConfig = {

1117+

bindings: Array.from({ length: bindingCount }, (_, idx) => ({

1118+

agentId: `agent-${idx}`,

1119+

match: {

1120+

channel: "dingtalk",

1121+

accountId: `acct-${idx}`,

1122+

peer: { kind: "direct", id: `user-${idx}` },

1123+

},

1124+

})),

1125+

};

1126+1127+

const route = resolveAgentRoute({

1128+

cfg,

1129+

channel: "dingtalk",

1130+

accountId: "acct-100",

1131+

peer: { kind: "direct", id: "user-100" },

1132+

});

1133+

expect(route.agentId).toBe("agent-100");

1134+

expect(route.matchedBy).toBe("binding.peer");

1135+1136+

const defaultRoute = resolveAgentRoute({

1137+

cfg,

1138+

channel: "dingtalk",

1139+

accountId: "acct-missing",

1140+

peer: { kind: "direct", id: "user-missing" },

1141+

});

1142+

expect(defaultRoute.agentId).toBe("main");

1143+

expect(defaultRoute.matchedBy).toBe("default");

1144+

});

11021145

});