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

推荐订阅源

MyScale Blog
MyScale Blog
F
Fortinet All Blogs
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
D
Docker
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
爱范儿
爱范儿
V
Visual Studio Blog
Last Week in AI
Last Week in AI
WordPress大学
WordPress大学
aimingoo的专栏
aimingoo的专栏
小众软件
小众软件
L
LangChain Blog
Vercel News
Vercel News
阮一峰的网络日志
阮一峰的网络日志
IT之家
IT之家
P
Proofpoint News Feed
博客园_首页
D
DataBreaches.Net
T
The Blog of Author Tim Ferriss
The GitHub Blog
The GitHub Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
C
Check Point Blog
Engineering at Meta
Engineering at Meta
Microsoft Azure Blog
Microsoft Azure 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
fix(crabbox): bootstrap macos js toolchain · openclaw/ope...
vincentkoc · 2026-05-25 · via Recent Commits to openclaw:main

@@ -204,6 +204,85 @@ describe("scripts/crabbox-wrapper", () => {

204204

]);

205205

});

206206207+

it("bootstraps a Node toolchain for raw AWS macOS JavaScript commands", () => {

208+

const result = runWrapper(

209+

"provider: hetzner, aws, local-container, blacksmith-testbox, or cloudflare\n",

210+

["run", "--provider", "aws", "--target", "macos", "--", "pnpm", "--version"],

211+

);

212+213+

const output = parseFakeCrabboxOutput(result);

214+

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

215+

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

216+

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

217+

expect(result.stderr).toContain(

218+

"bootstrapping a pinned user-local Node toolchain before the command",

219+

);

220+

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

221+

expect(remoteCommand).toContain("node-v${node_version}-darwin-${node_arch}.tar.gz");

222+

expect(remoteCommand).toContain("shasum -a 256 -c -");

223+

expect(remoteCommand).not.toContain("set -euo pipefail");

224+

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

225+

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

226+

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

227+

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

228+

});

229+230+

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

231+

const result = runWrapper(

232+

"provider: hetzner, aws, local-container, blacksmith-testbox, or cloudflare\n",

233+

["run", "--provider", "aws", "--target", "macos", "--shell", "--", "pnpm check:changed"],

234+

);

235+236+

const output = parseFakeCrabboxOutput(result);

237+

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

238+

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

239+

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

240+

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

241+

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

242+

});

243+244+

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

245+

const result = runWrapper(

246+

"provider: hetzner, aws, local-container, blacksmith-testbox, or cloudflare\n",

247+

[

248+

"run",

249+

"--provider",

250+

"aws",

251+

"--target",

252+

"macos",

253+

"--shell",

254+

"--",

255+

"pnpm check:changed || true",

256+

],

257+

);

258+259+

const output = parseFakeCrabboxOutput(result);

260+

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

261+

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

262+

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

263+

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

264+

});

265+266+

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

267+

const result = runWrapper(

268+

"provider: hetzner, aws, local-container, blacksmith-testbox, or cloudflare\n",

269+

["run", "--provider", "aws", "--target", "linux", "--", "pnpm", "--version"],

270+

);

271+272+

const output = parseFakeCrabboxOutput(result);

273+

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

274+

expect(output.args).toEqual([

275+

"run",

276+

"--provider",

277+

"aws",

278+

"--target",

279+

"linux",

280+

"--",

281+

"pnpm",

282+

"--version",

283+

]);

284+

});

285+207286

it("finds a Crabbox checkout next to the Git common dir in linked worktrees", () => {

208287

const fakeWorkspaceParent = mkdtempSync(path.join(tmpdir(), "openclaw-linked-worktree-"));

209288

tempDirs.push(fakeWorkspaceParent);

@@ -442,6 +521,32 @@ describe("scripts/crabbox-wrapper", () => {

442521

expect(remoteCommand).toMatch(/&& corepack pnpm check:changed$/u);

443522

});

444523524+

it("preserves macOS JS bootstrapping for sparse changed gates on remote raw syncs", () => {

525+

const result = runWrapper(

526+

"provider: hetzner, aws, local-container, blacksmith-testbox, or cloudflare\n",

527+

["run", "--provider", "aws", "--target", "macos", "--", "pnpm", "check:changed"],

528+

{

529+

gitResponses: {

530+

["config\u0000--bool\u0000core.sparseCheckout"]: { stdout: "true\n" },

531+

["status\u0000--porcelain=v1"]: { stdout: "" },

532+

["merge-base\u0000origin/main\u0000HEAD"]: { stdout: "abc123\n" },

533+

},

534+

},

535+

);

536+537+

const output = parseFakeCrabboxOutput(result);

538+

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

539+

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

540+

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

541+

expect(remoteCommand).toContain(

542+

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

543+

);

544+

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

545+

expect(remoteCommand).toContain(

546+

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

547+

);

548+

});

549+445550

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

446551

const result = runWrapper(

447552

"provider: hetzner, aws, local-container, blacksmith-testbox, or cloudflare\n",