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

推荐订阅源

I
InfoQ
G
Google Developers Blog
Engineering at Meta
Engineering at Meta
月光博客
月光博客
博客园 - 聂微东
博客园 - Franky
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
有赞技术团队
有赞技术团队
A
About on SuperTechFans
Microsoft Azure Blog
Microsoft Azure Blog
Blog — PlanetScale
Blog — PlanetScale
U
Unit 42
T
Tailwind CSS Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
云风的 BLOG
云风的 BLOG
S
SegmentFault 最新的问题
F
Fortinet All Blogs
H
Help Net Security
J
Java Code Geeks
酷 壳 – CoolShell
酷 壳 – CoolShell
博客园 - 叶小钗
L
LangChain Blog
Martin Fowler
Martin Fowler
N
Netflix TechBlog - Medium

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 subagent target assertions · openclaw/openc...
shakkernerd · 2026-05-09 · via Recent Commits to openclaw:main

@@ -40,6 +40,18 @@ function resolveTarget(runs: SubagentRunRecord[], token: string | undefined) {

4040

});

4141

}

424243+

function expectResolvedRunId(

44+

runs: SubagentRunRecord[],

45+

token: string | undefined,

46+

expectedRunId: string,

47+

): void {

48+

const resolved = resolveTarget(runs, token);

49+

if (!resolved.entry) {

50+

throw new Error(`Expected ${String(token)} to resolve, got ${resolved.error ?? "no target"}`);

51+

}

52+

expect(resolved.entry.runId).toBe(expectedRunId);

53+

}

54+4355

describe("subagents utils", () => {

4456

afterEach(() => {

4557

vi.restoreAllMocks();

@@ -65,8 +77,7 @@ describe("subagents utils", () => {

6577

makeRun({ runId: "old", createdAt: NOW_MS - 2_000 }),

6678

makeRun({ runId: "new", createdAt: NOW_MS - 500 }),

6779

];

68-

const resolved = resolveTarget(runs, " last ");

69-

expect(resolved.entry?.runId).toBe("new");

80+

expectResolvedRunId(runs, " last ", "new");

7081

});

71827283

it("resolves numeric index from running then recent finished order", () => {

@@ -91,14 +102,14 @@ describe("subagents utils", () => {

91102

}),

92103

];

9310494-

expect(resolveTarget(runs, "1").entry?.runId).toBe("running");

95-

expect(resolveTarget(runs, "2").entry?.runId).toBe("recent-finished");

105+

expectResolvedRunId(runs, "1", "running");

106+

expectResolvedRunId(runs, "2", "recent-finished");

96107

expect(resolveTarget(runs, "3").error).toBe("invalid:3");

97108

});

9810999110

it("resolves session key target and unknown session errors", () => {

100111

const run = makeRun({ runId: "abc123", childSessionKey: "agent:beta:subagent:xyz" });

101-

expect(resolveTarget([run], "agent:beta:subagent:xyz").entry?.runId).toBe("abc123");

112+

expectResolvedRunId([run], "agent:beta:subagent:xyz", "abc123");

102113

expect(resolveTarget([run], "agent:beta:subagent:missing").error).toBe(

103114

"unknown-session:agent:beta:subagent:missing",

104115

);

@@ -111,11 +122,11 @@ describe("subagents utils", () => {

111122

makeRun({ runId: "run-beta-1", label: "Beta Worker" }),

112123

];

113124114-

expect(resolveTarget(runs, "beta worker").entry?.runId).toBe("run-beta-1");

115-

expect(resolveTarget(runs, "beta").entry?.runId).toBe("run-beta-1");

116-

expect(resolveTarget(runs, "run-beta").entry?.runId).toBe("run-beta-1");

125+

expectResolvedRunId(runs, "beta worker", "run-beta-1");

126+

expectResolvedRunId(runs, "beta", "run-beta-1");

127+

expectResolvedRunId(runs, "run-beta", "run-beta-1");

117128118-

expect(resolveTarget(runs, "alpha core").entry?.runId).toBe("run-alpha-1");

129+

expectResolvedRunId(runs, "alpha core", "run-alpha-1");

119130

expect(resolveTarget(runs, "alpha").error).toBe("ambiguous-prefix:alpha");

120131

expect(resolveTarget(runs, "run-alpha").error).toBe("ambiguous-run:run-alpha");

121132

expect(resolveTarget(runs, "missing").error).toBe("unknown:missing");

@@ -149,6 +160,6 @@ describe("subagents utils", () => {

149160

}),

150161

];

151162152-

expect(resolveTarget(runs, "same worker").entry?.runId).toBe("run-new");

163+

expectResolvedRunId(runs, "same worker", "run-new");

153164

});

154165

});