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

推荐订阅源

GbyAI
GbyAI
阮一峰的网络日志
阮一峰的网络日志
G
Google Developers Blog
J
Java Code Geeks
Blog — PlanetScale
Blog — PlanetScale
大猫的无限游戏
大猫的无限游戏
云风的 BLOG
云风的 BLOG
Vercel News
Vercel News
L
LangChain Blog
Hugging Face - Blog
Hugging Face - Blog
T
The Blog of Author Tim Ferriss
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Stack Overflow Blog
Stack Overflow Blog
P
Proofpoint News Feed
腾讯CDC
博客园_首页
博客园 - 聂微东
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
M
MIT News - Artificial intelligence
WordPress大学
WordPress大学
D
DataBreaches.Net
Microsoft Security Blog
Microsoft Security 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: defer Claude live MCP cleanup (#73351) · openclaw/op...
edwin-rivera · 2026-04-28 · via Recent Commits to openclaw:main

@@ -834,6 +834,60 @@ describe("runCliAgent spawn path", () => {

834834

}

835835

});

836836837+

it("defers prepared backend cleanup to the Claude live session lifecycle", async () => {

838+

let stdoutListener: ((chunk: string) => void) | undefined;

839+

const stdin = {

840+

write: vi.fn((_data: string, cb?: (err?: Error | null) => void) => {

841+

stdoutListener?.(

842+

[

843+

JSON.stringify({ type: "system", subtype: "init", session_id: "live-session-cleanup" }),

844+

JSON.stringify({

845+

type: "result",

846+

session_id: "live-session-cleanup",

847+

result: "ok",

848+

}),

849+

].join("\n") + "\n",

850+

);

851+

cb?.();

852+

}),

853+

end: vi.fn(),

854+

};

855+

supervisorSpawnMock.mockImplementation(async (...args: unknown[]) => {

856+

const input = (args[0] ?? {}) as { onStdout?: (chunk: string) => void };

857+

stdoutListener = input.onStdout;

858+

return {

859+

runId: "live-cleanup-run",

860+

pid: 2346,

861+

startedAtMs: Date.now(),

862+

stdin,

863+

wait: vi.fn(() => new Promise(() => {})),

864+

cancel: vi.fn(),

865+

};

866+

});

867+

const preparedBackendCleanup = vi.fn(async () => {});

868+

const context = buildPreparedCliRunContext({

869+

provider: "claude-cli",

870+

model: "sonnet",

871+

runId: "run-live-cleanup",

872+

prompt: "first",

873+

backend: {

874+

args: ["-p", "--strict-mcp-config", "--mcp-config", "/tmp/mcp-cleanup.json"],

875+

liveSession: "claude-stdio",

876+

},

877+

mcpConfigHash: "cleanup-mcp-config",

878+

});

879+

context.preparedBackend.cleanup = preparedBackendCleanup;

880+881+

const result = await executePreparedCliRun(context);

882+883+

expect(result.text).toBe("ok");

884+

expect(context.preparedBackend.cleanup).toBeUndefined();

885+

expect(preparedBackendCleanup).not.toHaveBeenCalled();

886+887+

resetClaudeLiveSessionsForTest();

888+

await vi.waitFor(() => expect(preparedBackendCleanup).toHaveBeenCalledOnce());

889+

});

890+837891

it("accepts Claude live stream-json lines larger than 256 KiB", async () => {

838892

const largeText = "x".repeat(270 * 1024);

839893

let stdoutListener: ((chunk: string) => void) | undefined;