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

推荐订阅源

博客园_首页
B
Blog RSS Feed
Microsoft Azure Blog
Microsoft Azure Blog
J
Java Code Geeks
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Google DeepMind News
Google DeepMind News
F
Fortinet All Blogs
V
V2EX
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Engineering at Meta
Engineering at Meta
月光博客
月光博客
阮一峰的网络日志
阮一峰的网络日志
M
MIT News - Artificial intelligence
IT之家
IT之家
博客园 - 【当耐特】
U
Unit 42
云风的 BLOG
云风的 BLOG
L
LangChain Blog
小众软件
小众软件
Microsoft Security Blog
Microsoft Security Blog
B
Blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More
宝玉的分享
宝玉的分享
N
Netflix TechBlog - Medium

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
refactor(path3): narrow bundled session runtime barrels (...
jalehman · 2026-06-25 · via Recent Commits to openclaw:main

@@ -3,16 +3,16 @@ import { afterAll, beforeEach, describe, expect, it, vi } from "vitest";

33

import type { ClawdbotConfig } from "./bot-runtime-api.js";

44

import { resolveFeishuReasoningPreviewEnabled } from "./reasoning-preview.js";

556-

const { loadSessionStoreMock } = vi.hoisted(() => ({

7-

loadSessionStoreMock: vi.fn(),

6+

const { getSessionEntryMock } = vi.hoisted(() => ({

7+

getSessionEntryMock: vi.fn(),

88

}));

991010

vi.mock("./bot-runtime-api.js", async () => {

1111

const actual =

1212

await vi.importActual<typeof import("./bot-runtime-api.js")>("./bot-runtime-api.js");

1313

return {

1414

...actual,

15-

loadSessionStore: loadSessionStoreMock,

15+

getSessionEntry: getSessionEntryMock,

1616

};

1717

});

1818

@@ -29,9 +29,12 @@ describe("resolveFeishuReasoningPreviewEnabled", () => {

2929

});

30303131

it("enables previews only for stream reasoning sessions", () => {

32-

loadSessionStoreMock.mockReturnValue({

33-

"agent:main:feishu:dm:ou_sender_1": { reasoningLevel: "stream" },

34-

"agent:main:feishu:dm:ou_sender_2": { reasoningLevel: "on" },

32+

getSessionEntryMock.mockImplementation(({ sessionKey }) => {

33+

const entries = {

34+

"agent:main:feishu:dm:ou_sender_1": { reasoningLevel: "stream" },

35+

"agent:main:feishu:dm:ou_sender_2": { reasoningLevel: "on" },

36+

};

37+

return entries[sessionKey as keyof typeof entries];

3538

});

36393740

expect(

@@ -50,10 +53,15 @@ describe("resolveFeishuReasoningPreviewEnabled", () => {

5053

sessionKey: "agent:main:feishu:dm:ou_sender_2",

5154

}),

5255

).toBe(false);

56+

expect(getSessionEntryMock).toHaveBeenCalledWith({

57+

storePath: "/tmp/feishu-sessions.json",

58+

sessionKey: "agent:main:feishu:dm:ou_sender_1",

59+

readConsistency: "latest",

60+

});

5361

});

54625563

it("returns false for missing sessions or load failures", () => {

56-

loadSessionStoreMock.mockImplementationOnce(() => {

64+

getSessionEntryMock.mockImplementationOnce(() => {

5765

throw new Error("disk unavailable");

5866

});

5967

@@ -75,9 +83,12 @@ describe("resolveFeishuReasoningPreviewEnabled", () => {

7583

});

76847785

it("falls back to configured stream defaults", () => {

78-

loadSessionStoreMock.mockReturnValue({

79-

"agent:main:feishu:dm:ou_sender_1": {},

80-

"agent:main:feishu:dm:ou_sender_2": { reasoningLevel: "off" },

86+

getSessionEntryMock.mockImplementation(({ sessionKey }) => {

87+

const entries = {

88+

"agent:main:feishu:dm:ou_sender_1": {},

89+

"agent:main:feishu:dm:ou_sender_2": { reasoningLevel: "off" },

90+

};

91+

return entries[sessionKey as keyof typeof entries];

8192

});

82938394

const cfg: ClawdbotConfig = {