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

推荐订阅源

博客园_首页
H
Help Net Security
腾讯CDC
宝玉的分享
宝玉的分享
H
Hackread – Cybersecurity News, Data Breaches, AI and More
L
LangChain Blog
爱范儿
爱范儿
T
The Blog of Author Tim Ferriss
J
Java Code Geeks
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
MyScale Blog
MyScale Blog
Engineering at Meta
Engineering at Meta
N
Netflix TechBlog - Medium
D
Docker
V
V2EX
Last Week in AI
Last Week in AI
G
Google Developers Blog
IT之家
IT之家
C
Check Point Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
人人都是产品经理
人人都是产品经理
博客园 - 叶小钗
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
博客园 - 聂微东

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
perf: speed up cli prepare tests · openclaw/openclaw@93e95a2
steipete · 2026-04-24 · via Recent Commits to openclaw:main

@@ -5,6 +5,7 @@ import { CURRENT_SESSION_VERSION } from "@mariozechner/pi-coding-agent";

55

import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";

66

import type { OpenClawConfig } from "../../config/types.openclaw.js";

77

import { getGlobalHookRunner } from "../../plugins/hook-runner-global.js";

8+

import { __testing as cliBackendsTesting } from "../cli-backends.js";

89

import { buildActiveMusicGenerationTaskPromptContextForSession } from "../music-generation-task-status.js";

910

import { buildActiveVideoGenerationTaskPromptContextForSession } from "../video-generation-task-status.js";

1011

import {

@@ -51,10 +52,11 @@ const mockBuildActiveMusicGenerationTaskPromptContextForSession = vi.mocked(

5152

buildActiveMusicGenerationTaskPromptContextForSession,

5253

);

535454-

function createCliBackendConfig(): OpenClawConfig {

55+

function createCliBackendConfig(params: { systemPromptOverride?: string } = {}): OpenClawConfig {

5556

return {

5657

agents: {

5758

defaults: {

59+

systemPromptOverride: params.systemPromptOverride ?? "test system prompt",

5860

cliBackends: {

5961

"test-cli": {

6062

command: "test-cli",

@@ -114,6 +116,10 @@ function appendTranscriptEntry(

114116115117

describe("shouldSkipLocalCliCredentialEpoch", () => {

116118

beforeEach(() => {

119+

cliBackendsTesting.setDepsForTest({

120+

resolvePluginSetupCliBackend: () => undefined,

121+

resolveRuntimeCliBackends: () => [],

122+

});

117123

setCliRunnerPrepareTestDeps({

118124

makeBootstrapWarn: vi.fn(() => () => undefined),

119125

resolveBootstrapContextForRun: vi.fn(async () => ({

@@ -128,6 +134,7 @@ describe("shouldSkipLocalCliCredentialEpoch", () => {

128134

});

129135130136

afterEach(() => {

137+

cliBackendsTesting.resetDepsForTest();

131138

mockGetGlobalHookRunner.mockReset();

132139

mockBuildActiveVideoGenerationTaskPromptContextForSession.mockReset();

133140

mockBuildActiveMusicGenerationTaskPromptContextForSession.mockReset();

@@ -336,12 +343,11 @@ describe("shouldSkipLocalCliCredentialEpoch", () => {

336343

model: "test-model",

337344

timeoutMs: 1_000,

338345

runId: "run-test-hook-failure",

339-

extraSystemPrompt: "base extra system",

340-

config: createCliBackendConfig(),

346+

config: createCliBackendConfig({ systemPromptOverride: "base extra system" }),

341347

});

342348343349

expect(context.params.prompt).toBe("latest ask");

344-

expect(context.systemPrompt).toContain("base extra system");

350+

expect(context.systemPrompt).toBe("base extra system");

345351

expect(context.systemPrompt).not.toContain("hook exploded");

346352

expect(hookRunner.runBeforePromptBuild).toHaveBeenCalledOnce();

347353

} finally {