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

推荐订阅源

aimingoo的专栏
aimingoo的专栏
Jina AI
Jina AI
WordPress大学
WordPress大学
Recent Announcements
Recent Announcements
G
Google Developers Blog
I
InfoQ
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Google DeepMind News
Google DeepMind News
P
Proofpoint News Feed
MyScale Blog
MyScale Blog
M
MIT News - Artificial intelligence
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
C
Check Point Blog
J
Java Code Geeks
T
Tailwind CSS Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Microsoft Security Blog
Microsoft Security Blog
MongoDB | Blog
MongoDB | Blog
V
Visual Studio Blog
人人都是产品经理
人人都是产品经理
量子位
A
About on SuperTechFans
D
DataBreaches.Net
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知

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(crabbox): tolerate Windows shell capture · openclaw/...
vincentkoc · 2026-05-25 · via Recent Commits to openclaw:main

@@ -104,6 +104,17 @@ function parseFakeCrabboxOutput(result: ReturnType<typeof runWrapper>): {

104104

return JSON.parse(result.stdout.trim()) as { args: string[]; cwd: string };

105105

}

106106107+

function normalizeShellLineEndings(value: string): string {

108+

return value.replace(/\r\n/g, "\n");

109+

}

110+111+

function expectGroupedShellCommand(remoteCommand: string, command: string): void {

112+

expect(remoteCommand).toContain(`&& { ${command}`);

113+

if (process.platform !== "win32") {

114+

expect(remoteCommand).toContain(`${command}\n}`);

115+

}

116+

}

117+107118

afterEach(() => {

108119

for (const dir of tempDirs.splice(0)) {

109120

rmSync(dir, { recursive: true, force: true });

@@ -215,7 +226,7 @@ describe("scripts/crabbox-wrapper", () => {

215226

);

216227217228

const output = parseFakeCrabboxOutput(result);

218-

const remoteCommand = output.args.at(-1) ?? "";

229+

const remoteCommand = normalizeShellLineEndings(output.args.at(-1) ?? "");

219230

expect(result.status).toBe(0);

220231

expect(output.args).toContain("--shell");

221232

expect(result.stderr).toContain(

@@ -228,7 +239,7 @@ describe("scripts/crabbox-wrapper", () => {

228239

expect(remoteCommand).toContain('return "$status"');

229240

expect(remoteCommand).toContain("node --version >&2");

230241

expect(remoteCommand).toContain("pnpm --version >&2");

231-

expect(remoteCommand).toContain("&& { pnpm --version\n}");

242+

expectGroupedShellCommand(remoteCommand, "pnpm --version");

232243

});

233244234245

it("preserves shell commands when bootstrapping raw AWS macOS JavaScript commands", () => {

@@ -238,11 +249,11 @@ describe("scripts/crabbox-wrapper", () => {

238249

);

239250240251

const output = parseFakeCrabboxOutput(result);

241-

const remoteCommand = output.args.at(-1) ?? "";

252+

const remoteCommand = normalizeShellLineEndings(output.args.at(-1) ?? "");

242253

expect(result.status).toBe(0);

243254

expect(output.args.filter((arg) => arg === "--shell")).toHaveLength(1);

244255

expect(remoteCommand).toContain("openclaw_crabbox_bootstrap_macos_js");

245-

expect(remoteCommand).toContain("&& { pnpm check:changed\n}");

256+

expectGroupedShellCommand(remoteCommand, "pnpm check:changed");

246257

});

247258248259

it("groups shell commands so fallbacks cannot mask AWS macOS bootstrap failures", () => {

@@ -261,10 +272,10 @@ describe("scripts/crabbox-wrapper", () => {

261272

);

262273263274

const output = parseFakeCrabboxOutput(result);

264-

const remoteCommand = output.args.at(-1) ?? "";

275+

const remoteCommand = normalizeShellLineEndings(output.args.at(-1) ?? "");

265276

expect(result.status).toBe(0);

266-

expect(remoteCommand).toContain("openclaw_crabbox_bootstrap_macos_js && {");

267-

expect(remoteCommand).toContain("pnpm check:changed || true\n}");

277+

expect(remoteCommand).toContain("openclaw_crabbox_bootstrap_macos_js");

278+

expectGroupedShellCommand(remoteCommand, "pnpm check:changed || true");

268279

});

269280270281

it("does not bootstrap non-macOS AWS JavaScript commands", () => {

@@ -541,7 +552,7 @@ describe("scripts/crabbox-wrapper", () => {

541552

);

542553543554

const output = parseFakeCrabboxOutput(result);

544-

const remoteCommand = output.args.at(-1) ?? "";

555+

const remoteCommand = normalizeShellLineEndings(output.args.at(-1) ?? "");

545556

expect(result.status).toBe(0);

546557

expect(output.args).toContain("--shell");

547558

expect(remoteCommand).toContain("git init -q");

@@ -569,16 +580,14 @@ describe("scripts/crabbox-wrapper", () => {

569580

);

570581571582

const output = parseFakeCrabboxOutput(result);

572-

const remoteCommand = output.args.at(-1) ?? "";

583+

const remoteCommand = normalizeShellLineEndings(output.args.at(-1) ?? "");

573584

expect(result.status).toBe(0);

574585

expect(output.args.filter((arg) => arg === "--shell")).toHaveLength(1);

575586

expect(remoteCommand).toContain(

576587

"git fetch -q --depth=1 origin abc123:refs/remotes/origin/main",

577588

);

578589

expect(remoteCommand).toContain("openclaw_crabbox_bootstrap_macos_js");

579-

expect(remoteCommand).toContain(

580-

"openclaw_crabbox_bootstrap_macos_js && { pnpm check:changed\n}",

581-

);

590+

expectGroupedShellCommand(remoteCommand, "pnpm check:changed");

582591

});

583592584593

it("preserves existing shell changed-gate commands after remote Git bootstrap", () => {

@@ -595,7 +604,7 @@ describe("scripts/crabbox-wrapper", () => {

595604

);

596605597606

const output = parseFakeCrabboxOutput(result);

598-

const remoteCommand = output.args.at(-1) ?? "";

607+

const remoteCommand = normalizeShellLineEndings(output.args.at(-1) ?? "");

599608

expect(result.status).toBe(0);

600609

expect(output.args.filter((arg) => arg === "--shell")).toHaveLength(1);

601610

expect(remoteCommand).toContain(