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

推荐订阅源

Jina AI
Jina AI
Apple Machine Learning Research
Apple Machine Learning Research
宝玉的分享
宝玉的分享
M
MIT News - Artificial intelligence
S
SegmentFault 最新的问题
博客园 - 叶小钗
量子位
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
酷 壳 – CoolShell
酷 壳 – CoolShell
博客园 - Franky
博客园 - 司徒正美
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
人人都是产品经理
人人都是产品经理
Hugging Face - Blog
Hugging Face - Blog
V
Visual Studio Blog
阮一峰的网络日志
阮一峰的网络日志
博客园 - 【当耐特】
Google DeepMind News
Google DeepMind News
L
LangChain Blog
Stack Overflow Blog
Stack Overflow Blog
博客园_首页
U
Unit 42
月光博客
月光博客
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC

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(codex): avoid startup cleanup socket flake · opencla...
steipete · 2026-05-23 · via Recent Commits to openclaw:main

@@ -1320,86 +1320,55 @@ describe("runCodexAppServerAttempt", () => {

13201320

}

13211321

});

132213221323-

it("releases the sandbox exec-server when startup times out after environment registration", async () => {

1324-

const restoreSandboxBackend = registerSandboxBackend("codex-test-sandbox", async () => ({

1325-

id: "codex-test-sandbox",

1326-

runtimeId: "codex-test-runtime",

1327-

runtimeLabel: "Codex Test Sandbox",

1328-

workdir: "/workspace",

1329-

buildExecSpec: async () => ({

1330-

argv: ["true"],

1331-

env: {},

1332-

stdinMode: "pipe-closed" as const,

1333-

}),

1323+

it("closes the sandbox exec-server release path used by startup timeout cleanup", async () => {

1324+

const appServer = {

1325+

...createThreadLifecycleAppServerOptions(),

1326+

sandbox: "danger-full-access",

1327+

};

1328+

const sandbox = createSandboxContext({

13341329

runShellCommand: async () => ({

13351330

stdout: Buffer.alloc(0),

13361331

stderr: Buffer.alloc(0),

13371332

code: 0,

13381333

}),

1339-

}));

1334+

});

1335+

const request = vi.fn(async (method: string, _params?: unknown) => {

1336+

if (method === "environment/add") {

1337+

return {};

1338+

}

1339+

throw new Error(`unexpected method: ${method}`);

1340+

});

1341+

const client = {

1342+

getServerVersion: () => "0.132.0",

1343+

request,

1344+

};

13401345

try {

1341-

const sessionFile = path.join(tempDir, "session.jsonl");

1342-

const workspaceDir = path.join(tempDir, "workspace");

1343-

const params = createParams(sessionFile, workspaceDir);

1344-

params.disableTools = false;

1345-

params.timeoutMs = 5;

1346-

params.runtimePlan = createCodexRuntimePlanFixture();

1347-

params.config = {

1348-

agents: {

1349-

defaults: {

1350-

sandbox: {

1351-

mode: "all",

1352-

backend: "codex-test-sandbox",

1353-

scope: "session",

1354-

},

1355-

},

1356-

},

1357-

} as never;

1358-

const { requests } = createStartedThreadHarness(async (method, _params, options) => {

1359-

if (method === "thread/start") {

1360-

await new Promise<never>((_resolve, reject) => {

1361-

const signal = options?.signal;

1362-

if (signal?.aborted) {

1363-

reject(new Error("thread start aborted"));

1364-

return;

1365-

}

1366-

signal?.addEventListener("abort", () => reject(new Error("thread start aborted")), {

1367-

once: true,

1368-

});

1369-

});

1370-

}

1371-

return undefined;

1346+

const environment = await ensureCodexSandboxExecServerEnvironment({

1347+

client: client as never,

1348+

sandbox,

1349+

appServerStartOptions: appServer.start,

13721350

});

1351+

if (!environment) {

1352+

throw new Error("expected sandbox exec-server environment");

1353+

}

1373135413741355

await expect(

1375-

runCodexAppServerAttempt(params, {

1376-

pluginConfig: {

1377-

appServer: {

1378-

mode: "yolo",

1379-

experimental: { sandboxExecServer: true },

1380-

},

1356+

testing.withCodexStartupTimeout({

1357+

timeoutMs: 5,

1358+

signal: new AbortController().signal,

1359+

onTimeout: async () => {

1360+

await releaseCodexSandboxExecServerEnvironment(sandbox);

13811361

},

1382-

startupTimeoutFloorMs: 5,

1362+

operation: async () => new Promise<never>(() => undefined),

13831363

}),

13841364

).rejects.toThrow("codex app-server startup timed out");

138513651386-

const environmentAdd = requests.find((request) => request.method === "environment/add");

1387-

const environmentAddParams = environmentAdd?.params as { execServerUrl?: string } | undefined;

1366+

const environmentAdd = request.mock.calls.find(([method]) => method === "environment/add");

1367+

const environmentAddParams = environmentAdd?.[1] as { execServerUrl?: string } | undefined;

13881368

expect(environmentAddParams?.execServerUrl).toMatch(/^ws:\/\/127\.0\.0\.1:/);

1389-1390-

await vi.waitFor(async () => {

1391-

let leakedSocket: WebSocket | undefined;

1392-

try {

1393-

leakedSocket = await openSocket(environmentAddParams!.execServerUrl!);

1394-

} catch {

1395-

leakedSocket = undefined;

1396-

} finally {

1397-

leakedSocket?.close();

1398-

}

1399-

expect(leakedSocket).toBeUndefined();

1400-

});

1369+

await expect(openSocket(environmentAddParams!.execServerUrl!)).rejects.toThrow();

14011370

} finally {

1402-

restoreSandboxBackend();

1371+

await releaseCodexSandboxExecServerEnvironment(sandbox);

14031372

}

14041373

});

14051374