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

推荐订阅源

L
LangChain Blog
有赞技术团队
有赞技术团队
博客园_首页
IT之家
IT之家
爱范儿
爱范儿
量子位
小众软件
小众软件
Jina AI
Jina AI
WordPress大学
WordPress大学
酷 壳 – CoolShell
酷 壳 – CoolShell
博客园 - 聂微东
The Cloudflare Blog
博客园 - 司徒正美
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
V
V2EX
大猫的无限游戏
大猫的无限游戏
月光博客
月光博客
雷峰网
雷峰网
V
Visual Studio Blog
博客园 - Franky
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
美团技术团队
Last Week in AI
Last Week in AI
S
SegmentFault 最新的问题

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: resolve oneshot ACP identities before close · opencl...
steipete · 2026-04-26 · via Recent Commits to openclaw:main

@@ -2399,6 +2399,91 @@ describe("AcpSessionManager", () => {

23992399

expect(currentMeta.identity?.agentSessionId).toBe("agent-fresh");

24002400

});

240124012402+

it("reconciles oneshot ACP identity from runtime status before closing after a turn", async () => {

2403+

const runtimeState = createRuntime();

2404+

runtimeState.ensureSession.mockResolvedValue({

2405+

sessionKey: "agent:codex:acp:session-1",

2406+

backend: "acpx",

2407+

runtimeSessionName: "runtime-1",

2408+

backendSessionId: "acpx-oneshot",

2409+

});

2410+

runtimeState.getStatus.mockResolvedValue({

2411+

summary: "status=done",

2412+

backendSessionId: "acpx-oneshot",

2413+

agentSessionId: "agent-oneshot",

2414+

details: { status: "done" },

2415+

});

2416+

hoisted.requireAcpRuntimeBackendMock.mockReturnValue({

2417+

id: "acpx",

2418+

runtime: runtimeState.runtime,

2419+

});

2420+2421+

let currentMeta: SessionAcpMeta | undefined;

2422+

hoisted.readAcpSessionEntryMock.mockImplementation((paramsUnknown: unknown) => {

2423+

const sessionKey =

2424+

(paramsUnknown as { sessionKey?: string }).sessionKey ?? "agent:codex:acp:session-1";

2425+

return {

2426+

sessionKey,

2427+

storeSessionKey: sessionKey,

2428+

acp: currentMeta,

2429+

};

2430+

});

2431+

hoisted.upsertAcpSessionMetaMock.mockImplementation(async (paramsUnknown: unknown) => {

2432+

const params = paramsUnknown as {

2433+

mutate: (

2434+

current: SessionAcpMeta | undefined,

2435+

entry: { acp?: SessionAcpMeta } | undefined,

2436+

) => SessionAcpMeta | null | undefined;

2437+

};

2438+

const next = params.mutate(currentMeta, { acp: currentMeta });

2439+

if (next) {

2440+

currentMeta = next;

2441+

}

2442+

return {

2443+

sessionId: "session-1",

2444+

updatedAt: Date.now(),

2445+

acp: currentMeta,

2446+

};

2447+

});

2448+2449+

const manager = new AcpSessionManager();

2450+

await manager.initializeSession({

2451+

cfg: baseCfg,

2452+

sessionKey: "agent:codex:acp:session-1",

2453+

agent: "codex",

2454+

mode: "oneshot",

2455+

});

2456+2457+

expect(currentMeta?.identity).toMatchObject({

2458+

state: "pending",

2459+

acpxSessionId: "acpx-oneshot",

2460+

source: "ensure",

2461+

});

2462+2463+

await manager.runTurn({

2464+

cfg: baseCfg,

2465+

sessionKey: "agent:codex:acp:session-1",

2466+

text: "do work",

2467+

mode: "prompt",

2468+

requestId: "run-1",

2469+

});

2470+2471+

expect(runtimeState.getStatus).toHaveBeenCalledTimes(2);

2472+

expect(runtimeState.close).toHaveBeenCalledWith({

2473+

handle: expect.objectContaining({

2474+

backendSessionId: "acpx-oneshot",

2475+

agentSessionId: "agent-oneshot",

2476+

}),

2477+

reason: "oneshot-complete",

2478+

});

2479+

expect(currentMeta?.identity).toMatchObject({

2480+

state: "resolved",

2481+

acpxSessionId: "acpx-oneshot",

2482+

agentSessionId: "agent-oneshot",

2483+

source: "status",

2484+

});

2485+

});

2486+24022487

it("reconciles pending ACP identities during startup scan", async () => {

24032488

const runtimeState = createRuntime();

24042489

runtimeState.getStatus.mockResolvedValue({