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

推荐订阅源

量子位
Recent Announcements
Recent Announcements
D
Docker
V
V2EX
阮一峰的网络日志
阮一峰的网络日志
Vercel News
Vercel News
Microsoft Security Blog
Microsoft Security Blog
The GitHub Blog
The GitHub Blog
U
Unit 42
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
月光博客
月光博客
腾讯CDC
B
Blog
博客园_首页
罗磊的独立博客
D
DataBreaches.Net
IT之家
IT之家
酷 壳 – CoolShell
酷 壳 – CoolShell
L
LangChain Blog
aimingoo的专栏
aimingoo的专栏
MongoDB | Blog
MongoDB | Blog
GbyAI
GbyAI
Stack Overflow Blog
Stack Overflow Blog
M
MIT News - Artificial intelligence

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(auto-reply): keep room event cli sessions transient ·...
obviyus · 2026-05-30 · via Recent Commits to openclaw:main

@@ -1888,9 +1888,9 @@ describe("runAgentTurnWithFallback", () => {

18881888

payloads: [{ text: "ambient" }],

18891889

meta: {

18901890

agentMeta: {

1891-

sessionId: "transient-cli-session",

1891+

sessionId: "existing-cli-session",

18921892

cliSessionBinding: {

1893-

sessionId: "transient-cli-session",

1893+

sessionId: "existing-cli-session",

18941894

authProfileId: "profile",

18951895

},

18961896

},

@@ -1902,15 +1902,17 @@ describe("runAgentTurnWithFallback", () => {

19021902

followupRun.currentInboundEventKind = "room_event";

19031903

followupRun.run.provider = "codex-cli";

19041904

followupRun.run.model = "gpt-5.4";

1905+

const sessionEntry = {

1906+

cliSessionBindings: {

1907+

"codex-cli": { sessionId: "existing-cli-session" },

1908+

},

1909+

} as unknown as SessionEntry;

1910+

const activeSessionStore = { main: sessionEntry };

1905191119061912

const result = await runAgentTurnWithFallback({

19071913

...createMinimalRunAgentTurnParams({ followupRun }),

1908-

getActiveSessionEntry: () =>

1909-

({

1910-

cliSessionBindings: {

1911-

"codex-cli": { sessionId: "existing-cli-session" },

1912-

},

1913-

}) as unknown as SessionEntry,

1914+

activeSessionStore,

1915+

getActiveSessionEntry: () => sessionEntry,

19141916

});

1915191719161918

expect(result.kind).toBe("success");

@@ -1924,13 +1926,116 @@ describe("runAgentTurnWithFallback", () => {

19241926

if (result.kind !== "success") {

19251927

throw new Error("expected success");

19261928

}

1927-

expect(result.runResult.meta?.agentMeta?.sessionId).toBe("transient-cli-session");

1929+

expect(result.runResult.meta?.agentMeta?.sessionId).toBe("existing-cli-session");

19281930

expect(result.runResult.meta?.agentMeta?.cliSessionBinding).toEqual({

1929-

sessionId: "transient-cli-session",

1931+

sessionId: "existing-cli-session",

19301932

authProfileId: "profile",

19311933

});

19321934

});

193319351936+

it("keeps new room-event CLI sessions transient when reuse fails", async () => {

1937+

state.isCliProviderMock.mockReturnValue(true);

1938+

state.runWithModelFallbackMock.mockImplementationOnce(async (params: FallbackRunnerParams) => ({

1939+

result: await params.run("codex-cli", "gpt-5.4"),

1940+

provider: "codex-cli",

1941+

model: "gpt-5.4",

1942+

attempts: [],

1943+

}));

1944+

state.runCliAgentMock.mockResolvedValueOnce({

1945+

payloads: [{ text: "ambient" }],

1946+

meta: {

1947+

agentMeta: {

1948+

sessionId: "transient-cli-session",

1949+

cliSessionBinding: {

1950+

sessionId: "transient-cli-session",

1951+

authProfileId: "profile",

1952+

},

1953+

},

1954+

},

1955+

});

1956+1957+

const runAgentTurnWithFallback = await getRunAgentTurnWithFallback();

1958+

const followupRun = createFollowupRun();

1959+

followupRun.currentInboundEventKind = "room_event";

1960+

followupRun.run.provider = "codex-cli";

1961+

followupRun.run.model = "gpt-5.4";

1962+

const sessionEntry = {

1963+

cliSessionBindings: {

1964+

"codex-cli": { sessionId: "existing-cli-session" },

1965+

},

1966+

} as unknown as SessionEntry;

1967+

const activeSessionStore = { main: sessionEntry };

1968+1969+

const result = await runAgentTurnWithFallback({

1970+

...createMinimalRunAgentTurnParams({ followupRun }),

1971+

activeSessionStore,

1972+

getActiveSessionEntry: () => sessionEntry,

1973+

});

1974+1975+

expect(result.kind).toBe("success");

1976+

expectMockCallArgFields(state.runCliAgentMock, 0, "CLI run params", {

1977+

currentInboundEventKind: "room_event",

1978+

cliSessionId: "existing-cli-session",

1979+

cliSessionBinding: {

1980+

sessionId: "existing-cli-session",

1981+

},

1982+

});

1983+

if (result.kind !== "success") {

1984+

throw new Error("expected success");

1985+

}

1986+

expect(result.runResult.meta?.agentMeta?.sessionId).toBe("");

1987+

expect(result.runResult.meta?.agentMeta?.cliSessionBinding).toBeUndefined();

1988+

expect(activeSessionStore.main.cliSessionBindings?.["codex-cli"]).toBeUndefined();

1989+

});

1990+1991+

it("keeps room-event CLI bindings when synthetic hooks return no CLI binding", async () => {

1992+

state.isCliProviderMock.mockReturnValue(true);

1993+

state.runWithModelFallbackMock.mockImplementationOnce(async (params: FallbackRunnerParams) => ({

1994+

result: await params.run("codex-cli", "gpt-5.4"),

1995+

provider: "codex-cli",

1996+

model: "gpt-5.4",

1997+

attempts: [],

1998+

}));

1999+

state.runCliAgentMock.mockResolvedValueOnce({

2000+

payloads: [{ text: "handled" }],

2001+

meta: {

2002+

agentMeta: {

2003+

sessionId: "openclaw-session",

2004+

provider: "codex-cli",

2005+

model: "gpt-5.4",

2006+

},

2007+

},

2008+

});

2009+2010+

const runAgentTurnWithFallback = await getRunAgentTurnWithFallback();

2011+

const followupRun = createFollowupRun();

2012+

followupRun.currentInboundEventKind = "room_event";

2013+

followupRun.run.provider = "codex-cli";

2014+

followupRun.run.model = "gpt-5.4";

2015+

const sessionEntry = {

2016+

cliSessionBindings: {

2017+

"codex-cli": { sessionId: "existing-cli-session" },

2018+

},

2019+

} as unknown as SessionEntry;

2020+

const activeSessionStore = { main: sessionEntry };

2021+2022+

const result = await runAgentTurnWithFallback({

2023+

...createMinimalRunAgentTurnParams({ followupRun }),

2024+

activeSessionStore,

2025+

getActiveSessionEntry: () => sessionEntry,

2026+

});

2027+2028+

expect(result.kind).toBe("success");

2029+

if (result.kind !== "success") {

2030+

throw new Error("expected success");

2031+

}

2032+

expect(result.runResult.meta?.agentMeta?.sessionId).toBe("");

2033+

expect(result.runResult.meta?.agentMeta?.cliSessionBinding).toBeUndefined();

2034+

expect(activeSessionStore.main.cliSessionBindings?.["codex-cli"]).toEqual({

2035+

sessionId: "existing-cli-session",

2036+

});

2037+

});

2038+19342039

it("bridges CLI assistant agent events into onPartialReply for live preview (#76869)", async () => {

19352040

state.isCliProviderMock.mockReturnValue(true);

19362041

state.runWithModelFallbackMock.mockImplementationOnce(async (params: FallbackRunnerParams) => ({