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

推荐订阅源

P
Proofpoint News Feed
V
V2EX
WordPress大学
WordPress大学
Google DeepMind News
Google DeepMind News
Martin Fowler
Martin Fowler
小众软件
小众软件
Blog — PlanetScale
Blog — PlanetScale
月光博客
月光博客
The Cloudflare Blog
T
Tailwind CSS Blog
H
Help Net Security
腾讯CDC
爱范儿
爱范儿
人人都是产品经理
人人都是产品经理
H
Hackread – Cybersecurity News, Data Breaches, AI and More
The GitHub Blog
The GitHub Blog
Microsoft Security Blog
Microsoft Security Blog
Stack Overflow Blog
Stack Overflow Blog
D
DataBreaches.Net
C
Check Point Blog
量子位
酷 壳 – CoolShell
酷 壳 – CoolShell
美团技术团队
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com

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: tighten agent defaults schema assertions · openclaw...
steipete · 2026-05-11 · via Recent Commits to openclaw:main

@@ -8,6 +8,10 @@ type SchemaParseResult = {

88

error?: { issues: Array<{ path: Array<string | number | symbol> }> };

99

};

101011+

function expectSchemaSuccess(result: SchemaParseResult): void {

12+

expect(result.success).toBe(true);

13+

}

14+1115

function expectSchemaFailurePath(result: SchemaParseResult, expectedPathPrefix: string): void {

1216

expect(result.success).toBe(false);

1317

if (result.success || !result.error) {

@@ -23,31 +27,31 @@ function expectSchemaFailurePath(result: SchemaParseResult, expectedPathPrefix:

23272428

describe("agent defaults schema", () => {

2529

it("accepts subagent archiveAfterMinutes=0 to disable archiving", () => {

26-

expect(

30+

expectSchemaSuccess(

2731

AgentDefaultsSchema.safeParse({

2832

subagents: {

2933

archiveAfterMinutes: 0,

3034

},

3135

}),

32-

).toMatchObject({ success: true });

36+

);

3337

});

34383539

it("accepts subagent delegation mode on defaults and agent entries", () => {

36-

expect(

40+

expectSchemaSuccess(

3741

AgentDefaultsSchema.safeParse({

3842

subagents: {

3943

delegationMode: "prefer",

4044

},

4145

}),

42-

).toMatchObject({ success: true });

43-

expect(

46+

);

47+

expectSchemaSuccess(

4448

AgentEntrySchema.safeParse({

4549

id: "coordinator",

4650

subagents: {

4751

delegationMode: "suggest",

4852

},

4953

}),

50-

).toMatchObject({ success: true });

54+

);

5155

expectSchemaFailurePath(

5256

AgentDefaultsSchema.safeParse({

5357

subagents: {

@@ -59,14 +63,14 @@ describe("agent defaults schema", () => {

5963

});

60646165

it("accepts videoGenerationModel", () => {

62-

expect(

66+

expectSchemaSuccess(

6367

AgentDefaultsSchema.safeParse({

6468

videoGenerationModel: {

6569

primary: "qwen/wan2.6-t2v",

6670

fallbacks: ["minimax/video-01"],

6771

},

6872

}),

69-

).toMatchObject({ success: true });

73+

);

7074

});

71757276

it("accepts imageGenerationModel timeoutMs", () => {

@@ -93,11 +97,11 @@ describe("agent defaults schema", () => {

9397

});

94989599

it("accepts mediaGenerationAutoProviderFallback", () => {

96-

expect(

100+

expectSchemaSuccess(

97101

AgentDefaultsSchema.safeParse({

98102

mediaGenerationAutoProviderFallback: false,

99103

}),

100-

).toMatchObject({ success: true });

104+

);

101105

});

102106103107

it("accepts experimental.localModelLean", () => {

@@ -270,14 +274,12 @@ describe("agent defaults schema", () => {

270274

},

271275

});

272276273-

expect(result).toMatchObject({

274-

ok: true,

275-

config: {

276-

agents: {

277-

list: [{ contextTokens: 1_048_576 }],

278-

},

279-

},

280-

});

277+

expect(result.ok).toBe(true);

278+

if (!result.ok) {

279+

throw new Error("expected config validation to succeed");

280+

}

281+

const config = result.config as { agents?: { list?: Array<{ contextTokens?: number }> } };

282+

expect(config.agents?.list?.[0]?.contextTokens).toBe(1_048_576);

281283

});

282284283285

it("rejects non-positive contextTokens on agent entries and defaults", () => {