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

推荐订阅源

腾讯CDC
The Cloudflare Blog
IT之家
IT之家
V
V2EX
雷峰网
雷峰网
MyScale Blog
MyScale Blog
P
Proofpoint News Feed
Stack Overflow Blog
Stack Overflow Blog
博客园 - Franky
Engineering at Meta
Engineering at Meta
S
SegmentFault 最新的问题
GbyAI
GbyAI
Microsoft Azure Blog
Microsoft Azure Blog
博客园 - 司徒正美
云风的 BLOG
云风的 BLOG
小众软件
小众软件
博客园 - 叶小钗
Blog — PlanetScale
Blog — PlanetScale
C
Check Point Blog
A
About on SuperTechFans
B
Blog
月光博客
月光博客
宝玉的分享
宝玉的分享
Last Week in AI
Last Week in AI

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: speed up focused unit tests · openclaw/openclaw@102...
steipete · 2026-04-27 · via Recent Commits to openclaw:main

@@ -6,26 +6,7 @@ import { cleanupTempDirs, makeTempDir } from "../test/helpers/temp-dir.js";

6677

const tempRoots: string[] = [];

889-

function withFakeCli(versionOutput: string): { root: string; cliPath: string } {

10-

const root = makeTempDir(tempRoots, "openclaw-install-sh-");

11-

const cliPath = path.join(root, "openclaw");

12-

const escapedOutput = versionOutput.replace(/'/g, "'\\''");

13-

fs.writeFileSync(

14-

cliPath,

15-

`#!/bin/sh

16-

printf '%s\n' '${escapedOutput}'

17-

`,

18-

"utf-8",

19-

);

20-

fs.chmodSync(cliPath, 0o755);

21-

return { root, cliPath };

22-

}

23-24-

function resolveInstallerVersionCases(params: {

25-

cliPaths: string[];

26-

stdinCliPath: string;

27-

stdinCwd: string;

28-

}): string[] {

9+

function resolveInstallerVersionCases(params: { stdinCwd: string }): string[] {

2910

const installerPath = path.join(process.cwd(), "scripts", "install.sh");

3011

const installerSource = fs.readFileSync(installerPath, "utf-8");

3112

const versionHelperStart = installerSource.indexOf("load_install_version_helpers() {");

@@ -39,22 +20,21 @@ function resolveInstallerVersionCases(params: {

3920

[

4021

"-c",

4122

`${versionHelperSource}

42-

for openclaw_bin in "\${@:3}"; do

43-

OPENCLAW_BIN="$openclaw_bin"

44-

resolve_openclaw_version

45-

done

23+

fake_openclaw_decorated() { printf '%s\\n' 'OpenClaw 2026.3.10 (abcdef0)'; }

24+

fake_openclaw_raw() { printf '%s\\n' "OpenClaw dev's build"; }

25+

OPENCLAW_BIN=fake_openclaw_decorated resolve_openclaw_version

26+

OPENCLAW_BIN=fake_openclaw_raw resolve_openclaw_version

4627

(

47-

cd "$2"

48-

FAKE_OPENCLAW_BIN="\${@:1:1}" bash -s <<'OPENCLAW_STDIN_INSTALLER'

28+

cd "$1"

29+

bash -s <<'OPENCLAW_STDIN_INSTALLER'

4930

${versionHelperSource}

50-

OPENCLAW_BIN="$FAKE_OPENCLAW_BIN"

31+

fake_openclaw_stdin() { printf '%s\\n' 'OpenClaw 2026.3.10 (abcdef0)'; }

32+

OPENCLAW_BIN=fake_openclaw_stdin

5133

resolve_openclaw_version

5234

OPENCLAW_STDIN_INSTALLER

5335

)`,

5436

"openclaw-version-test",

55-

params.stdinCliPath,

5637

params.stdinCwd,

57-

...params.cliPaths,

5838

],

5939

{

6040

cwd: process.cwd(),

@@ -76,10 +56,6 @@ describe("install.sh version resolution", () => {

7656

it.runIf(process.platform !== "win32")(

7757

"parses CLI versions and keeps stdin helpers isolated from cwd",

7858

() => {

79-

const decorated = withFakeCli("OpenClaw 2026.3.10 (abcdef0)");

80-

const raw = withFakeCli("OpenClaw dev's build");

81-

const stdinFixture = withFakeCli("OpenClaw 2026.3.10 (abcdef0)");

82-8359

const hostileCwd = makeTempDir(tempRoots, "openclaw-install-stdin-");

8460

const hostileHelper = path.join(

8561

hostileCwd,

@@ -100,8 +76,6 @@ extract_openclaw_semver() {

1007610177

expect(

10278

resolveInstallerVersionCases({

103-

cliPaths: [decorated.cliPath, raw.cliPath],

104-

stdinCliPath: stdinFixture.cliPath,

10579

stdinCwd: hostileCwd,

10680

}),

10781

).toEqual(["2026.3.10", "OpenClaw dev's build", "2026.3.10"]);