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

推荐订阅源

博客园_首页
量子位
D
DataBreaches.Net
博客园 - 司徒正美
J
Java Code Geeks
博客园 - 【当耐特】
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
aimingoo的专栏
aimingoo的专栏
B
Blog
The Cloudflare Blog
D
Docker
I
InfoQ
爱范儿
爱范儿
MongoDB | Blog
MongoDB | Blog
腾讯CDC
月光博客
月光博客
Hugging Face - Blog
Hugging Face - Blog
Microsoft Azure Blog
Microsoft Azure Blog
Vercel News
Vercel News
阮一峰的网络日志
阮一峰的网络日志
小众软件
小众软件
S
SegmentFault 最新的问题
GbyAI
GbyAI
有赞技术团队
有赞技术团队

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 sessions list wait in live harness sta...
steipete · 2026-06-01 · via Recent Commits to openclaw:main

@@ -781,70 +781,31 @@ async function verifyCodexCronMcpProbe(params: {

781781

}

782782

}

783783784-

async function readSpawnedChildRow(params: {

784+

function hasCodexAppServerLifecycleEvent(params: {

785785

childSessionKey: string;

786-

client: GatewayClient;

787-

parentSessionKey: string;

788-

}): Promise<Record<string, unknown> | undefined> {

789-

const result = await params.client.request(

790-

"sessions.list",

791-

{

792-

spawnedBy: params.parentSessionKey,

793-

limit: 20,

794-

},

795-

{ timeoutMs: 10_000 },

786+

events: CapturedAgentEvent[];

787+

}): boolean {

788+

return params.events.some(

789+

(event) =>

790+

event.sessionKey === params.childSessionKey && event.stream === "codex_app_server.lifecycle",

796791

);

797-

const sessions = asRecord(result)?.sessions;

798-

if (!Array.isArray(sessions)) {

799-

return undefined;

800-

}

801-

return sessions

802-

.map((entry) => asRecord(entry))

803-

.find((entry): entry is Record<string, unknown> => entry?.key === params.childSessionKey);

804-

}

805-806-

function isActiveCodexSubagentRow(row: Record<string, unknown> | undefined): boolean {

807-

if (!row) {

808-

return false;

809-

}

810-

return row.hasActiveSubagentRun === true || row.subagentRunState === "active";

811792

}

812793813794

async function waitForCodexSubagentStarted(params: {

814795

childSessionKey: string;

815-

client: GatewayClient;

816796

events: CapturedAgentEvent[];

817-

parentSessionKey: string;

818-

}): Promise<Record<string, unknown> | undefined> {

797+

}): Promise<void> {

819798

const deadline = Date.now() + Math.min(CODEX_HARNESS_REQUEST_TIMEOUT_MS, 120_000);

820-

let lastRow: Record<string, unknown> | undefined;

821-

let lastError: unknown;

822799

while (Date.now() < deadline) {

823-

try {

824-

lastRow = await readSpawnedChildRow({

825-

childSessionKey: params.childSessionKey,

826-

client: params.client,

827-

parentSessionKey: params.parentSessionKey,

828-

});

829-

const hasLifecycleEvent = params.events.some(

830-

(event) =>

831-

event.sessionKey === params.childSessionKey &&

832-

event.stream === "codex_app_server.lifecycle",

833-

);

834-

if (lastRow && (hasLifecycleEvent || isActiveCodexSubagentRow(lastRow))) {

835-

return lastRow;

836-

}

837-

} catch (error) {

838-

lastError = error;

800+

if (hasCodexAppServerLifecycleEvent(params)) {

801+

return;

839802

}

840803

await delay(2_000);

841804

}

842805

throw new Error(

843806

[

844807

`subagent ${params.childSessionKey} did not start through the Codex app-server harness`,

845-

`lastRow=${JSON.stringify(lastRow)}`,

846808

`events=${JSON.stringify(params.events)}`,

847-

`lastError=${lastError instanceof Error ? lastError.message : String(lastError)}`,

848809

].join("\n"),

849810

);

850811

}

@@ -937,13 +898,10 @@ async function verifyCodexSubagentProbe(params: {

937898

`subagent spawn did not return a child session key: ${JSON.stringify(spawnResult)}`,

938899

);

939900

}

940-

const childRow = await waitForCodexSubagentStarted({

901+

await waitForCodexSubagentStarted({

941902

childSessionKey,

942-

client: params.client,

943903

events,

944-

parentSessionKey: params.sessionKey,

945904

});

946-

expect(childRow?.key).toBe(childSessionKey);

947905

} finally {

948906

const { testing: subagentSpawnTesting } = await import("../agents/subagent-spawn.js");

949907

subagentSpawnTesting.setDepsForTest();