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

推荐订阅源

腾讯CDC
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
博客园 - Franky
博客园_首页
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
IT之家
IT之家
The Cloudflare Blog
V
Visual Studio Blog
罗磊的独立博客
T
Tailwind CSS Blog
S
SegmentFault 最新的问题
Hugging Face - Blog
Hugging Face - Blog
V
V2EX
阮一峰的网络日志
阮一峰的网络日志
D
Docker
Last Week in AI
Last Week in AI
B
Blog RSS Feed
C
Check Point Blog
J
Java Code Geeks
The GitHub Blog
The GitHub Blog
有赞技术团队
有赞技术团队
博客园 - 聂微东
MongoDB | Blog
MongoDB | 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(copilot): tighten harness sdk boundaries · openclaw/o...
vincentkoc · 2026-06-23 · via Recent Commits to openclaw:main

@@ -1910,6 +1910,7 @@ describe("runCopilotAttempt", () => {

19101910

it("retains a timed-out session until later compaction reaches session.idle", async () => {

19111911

const afterCompaction = vi.fn();

19121912

const onDeferredCompaction = vi.fn();

1913+

const cleanupToolBridge = vi.fn();

19131914

initializeGlobalHookRunner(

19141915

createMockPluginRegistry([{ hookName: "after_compaction", handler: afterCompaction }]),

19151916

);

@@ -1922,8 +1923,14 @@ describe("runCopilotAttempt", () => {

19221923

);

19231924

},

19241925

});

1926+

const createToolBridge = vi.fn(async () => ({

1927+

cleanup: cleanupToolBridge,

1928+

sdkTools: [],

1929+

sourceTools: [],

1930+

}));

1925193119261932

const result = await runCopilotAttempt(makeParams(), {

1933+

createToolBridge,

19271934

onDeferredCompaction,

19281935

pool: makeFakePool(sdk),

19291936

});

@@ -1933,6 +1940,7 @@ describe("runCopilotAttempt", () => {

19331940

expect(onDeferredCompaction).toHaveBeenCalledWith(

19341941

expect.objectContaining({ sdkSessionId: "sess-1" }),

19351942

);

1943+

expect(cleanupToolBridge).not.toHaveBeenCalled();

19361944

expect(activeSession?.disconnect).not.toHaveBeenCalled();

1937194519381946

activeSession?.emit("session.compaction_start", {});

@@ -1946,6 +1954,7 @@ describe("runCopilotAttempt", () => {

19461954

await vi.waitFor(() => {

19471955

expect(activeSession?.disconnect).toHaveBeenCalledTimes(1);

19481956

});

1957+

expect(cleanupToolBridge).toHaveBeenCalledTimes(1);

19491958

});

1950195919511960

it("does not mark a timeout after SDK compaction has completed as active compaction", async () => {

@@ -3150,7 +3159,6 @@ describe("runCopilotAttempt", () => {

31503159

expect(readAvailableTools(sdk.createSession.mock.calls[0])).toEqual([

31513160

"read",

31523161

"edit",

3153-

"ask_user",

31543162

"builtin:ask_user",

31553163

]);

31563164

});

@@ -3168,10 +3176,7 @@ describe("runCopilotAttempt", () => {

3168317631693177

await runCopilotAttempt(makeParams(), { createToolBridge, pool });

317031783171-

expect(readAvailableTools(sdk.createSession.mock.calls[0])).toEqual([

3172-

"ask_user",

3173-

"builtin:ask_user",

3174-

]);

3179+

expect(readAvailableTools(sdk.createSession.mock.calls[0])).toEqual(["builtin:ask_user"]);

31753180

});

3176318131773182

it("forwards the full bridged set when the run is unrestricted (no toolsAllow)", async () => {

@@ -3197,7 +3202,6 @@ describe("runCopilotAttempt", () => {

31973202

"edit",

31983203

"exec",

31993204

"message",

3200-

"ask_user",

32013205

"builtin:ask_user",

32023206

]);

32033207

});

@@ -3224,7 +3228,7 @@ describe("runCopilotAttempt", () => {

3224322832253229

const resumeCall = sdk.resumeSession.mock.calls[0] as unknown[] | undefined;

32263230

const resumeCfg = resumeCall?.[1] as { availableTools?: string[] };

3227-

expect(resumeCfg?.availableTools).toEqual(["read", "ask_user", "builtin:ask_user"]);

3231+

expect(resumeCfg?.availableTools).toEqual(["read", "builtin:ask_user"]);

32283232

});

3229323332303234

it("forwards `[]` to resumeSession when the bridge returns no tools", async () => {

@@ -3243,7 +3247,7 @@ describe("runCopilotAttempt", () => {

3243324732443248

const resumeCall = sdk.resumeSession.mock.calls[0] as unknown[] | undefined;

32453249

const resumeCfg = resumeCall?.[1] as { availableTools?: string[] };

3246-

expect(resumeCfg?.availableTools).toEqual(["ask_user", "builtin:ask_user"]);

3250+

expect(resumeCfg?.availableTools).toEqual(["builtin:ask_user"]);

32473251

});

32483252

});

32493253