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

推荐订阅源

Jina AI
Jina AI
云风的 BLOG
云风的 BLOG
人人都是产品经理
人人都是产品经理
T
The Blog of Author Tim Ferriss
阮一峰的网络日志
阮一峰的网络日志
罗磊的独立博客
J
Java Code Geeks
博客园 - 聂微东
B
Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
WordPress大学
WordPress大学
腾讯CDC
L
LangChain Blog
Apple Machine Learning Research
Apple Machine Learning Research
Microsoft Azure Blog
Microsoft Azure Blog
D
DataBreaches.Net
The GitHub Blog
The GitHub Blog
美团技术团队
博客园 - Franky
Google DeepMind News
Google DeepMind News
V
V2EX
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
月光博客
月光博客
The Cloudflare Blog

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: type cli test mocks · openclaw/openclaw@5c2487d
shakkernerd · 2026-06-16 · via Recent Commits to openclaw:main
Original file line numberDiff line numberDiff line change

@@ -31,7 +31,13 @@ const runGatewayLoop = vi.fn(async ({ start }: { start: GatewayLoopStart }) => {

3131

const normalizeStateDirEnv = vi.fn((_env?: NodeJS.ProcessEnv) => undefined);

3232

const pinConfigDir = vi.fn((_env?: NodeJS.ProcessEnv) => undefined);

3333

const pinRuntimePaths = vi.fn((_env?: NodeJS.ProcessEnv) => undefined);

34-

const loadGlobalRuntimeDotEnvFiles = vi.fn((_opts?: unknown) => undefined);

34+

type RuntimeDotEnvLoadResult = {

35+

gatewayEnvAppliedKeys: string[];

36+

stateEnvAppliedKeys: string[];

37+

};

38+

const loadGlobalRuntimeDotEnvFiles = vi.fn<

39+

(_opts?: unknown) => RuntimeDotEnvLoadResult | undefined

40+

>(() => undefined);

3541

const beforeRun = vi.fn(async () => {

3642

callOrder.push("bootstrap");

3743

});

Original file line numberDiff line numberDiff line change

@@ -10,7 +10,14 @@ const DISCORD_REPO_INSTALL_SPEC = repoInstallSpec("discord");

1010
1111

const setVerboseMock = vi.fn();

1212

const emitCliBannerMock = vi.fn();

13-

const ensureConfigReadyMock = vi.fn(async () => {});

13+

type EnsureConfigReadyOptions = {

14+

beforeStateMigrations?: () => Promise<boolean>;

15+

commandPath?: string[];

16+

requireConfig?: boolean;

17+

};

18+

const ensureConfigReadyMock = vi.fn<(_opts: EnsureConfigReadyOptions) => Promise<void>>(

19+

async () => {},

20+

);

1421

const ensurePluginRegistryLoadedMock = vi.fn();

1522

const routeLogsToStderrMock = vi.fn();

1623

const prepareGatewayRunBootstrapMock = vi.fn(async () => true);

Original file line numberDiff line numberDiff line change

@@ -77,8 +77,18 @@ const runCrestodianMock = vi.hoisted(() =>

7777

vi.fn<(options?: unknown) => Promise<void>>(async () => {}),

7878

);

7979

const commanderParseAsyncMock = vi.hoisted(() => vi.fn(async () => {}));

80-

const addGatewayRunCommandMock = vi.hoisted(() => vi.fn((command: unknown) => command));

81-

const ensureCliExecutionBootstrapMock = vi.hoisted(() => vi.fn(async () => {}));

80+

type GatewayRunCommandHooks = {

81+

beforeRun?: (opts: { reset?: boolean }) => Promise<void>;

82+

};

83+

type CliExecutionBootstrapOptions = {

84+

beforeStateMigrations?: () => Promise<boolean>;

85+

};

86+

const addGatewayRunCommandMock = vi.hoisted(() =>

87+

vi.fn<(command: unknown, hooks?: GatewayRunCommandHooks) => unknown>((command) => command),

88+

);

89+

const ensureCliExecutionBootstrapMock = vi.hoisted(() =>

90+

vi.fn<(_opts: CliExecutionBootstrapOptions) => Promise<void>>(async () => {}),

91+

);

8292

const emitCliBannerMock = vi.hoisted(() => vi.fn());

8393

const enableConsoleCaptureMock = vi.hoisted(() => vi.fn());

8494

const progressDoneMock = vi.hoisted(() => vi.fn());

Original file line numberDiff line numberDiff line change

@@ -52,7 +52,9 @@ describe("runDoctorConfigPreflight state migration", () => {

5252

});

5353
5454

it("runs the startup guard immediately before the first state mutation", async () => {

55-

const beforeStateMigrations = vi.fn(async () => true);

55+

const beforeStateMigrations = vi.fn<(_snapshot?: unknown) => Promise<boolean>>(

56+

async () => true,

57+

);

5658
5759

await runDoctorConfigPreflight({

5860

migrateLegacyConfig: false,

Original file line numberDiff line numberDiff line change

@@ -405,7 +405,7 @@ describe("shell env fallback", () => {

405405

exec: (() =>

406406

Buffer.from(

407407

"OPENAI_API_KEY=openai-shell\0ANTHROPIC_API_KEY=anthropic-shell\0",

408-

)) as Parameters<typeof loadShellEnvFallback>[0]["exec"],

408+

)) as unknown as Parameters<typeof loadShellEnvFallback>[0]["exec"],

409409

});

410410
411411

clearShellEnvAppliedKeys(["OPENAI_API_KEY"]);