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

推荐订阅源

Google DeepMind News
Google DeepMind News
B
Blog
博客园 - 三生石上(FineUI控件)
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
T
The Blog of Author Tim Ferriss
H
Hackread – Cybersecurity News, Data Breaches, AI and More
博客园_首页
Vercel News
Vercel News
量子位
A
About on SuperTechFans
博客园 - 聂微东
WordPress大学
WordPress大学
D
DataBreaches.Net
The Cloudflare Blog
M
MIT News - Artificial intelligence
Last Week in AI
Last Week in AI
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
D
Docker
雷峰网
雷峰网
C
Check Point Blog
S
SegmentFault 最新的问题
U
Unit 42
月光博客
月光博客
Apple Machine Learning Research
Apple Machine Learning Research

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(scripts): guard reused testbox keys · openclaw/opencl...
vincentkoc · 2026-06-20 · via Recent Commits to openclaw:main

@@ -355,6 +355,25 @@ function normalizeShellLineEndings(value: string): string {

355355

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

356356

}

357357358+

function testCrabboxConfigDir(home: string): string {

359+

if (process.platform === "darwin") {

360+

return path.join(home, "Library", "Application Support", "crabbox");

361+

}

362+

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

363+

return path.join(home, "AppData", "Roaming", "crabbox");

364+

}

365+

return path.join(home, ".config", "crabbox");

366+

}

367+368+

function testHomeEnv(home: string): Record<string, string> {

369+

return {

370+

APPDATA: path.join(home, "AppData", "Roaming"),

371+

HOME: home,

372+

USERPROFILE: home,

373+

XDG_CONFIG_HOME: path.join(home, ".config"),

374+

};

375+

}

376+358377

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

359378

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

360379

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

@@ -490,6 +509,70 @@ describe.concurrent("scripts/crabbox-wrapper", () => {

490509

expect(parseFakeCrabboxOutput(result).args).toContain("blacksmith-testbox");

491510

});

492511512+

it("rejects reused Blacksmith Testboxes that were not created by Crabbox", () => {

513+

const home = mkdtempSync(path.join(tmpdir(), "openclaw-crabbox-home-"));

514+

tempDirs.push(home);

515+516+

const result = runWrapper(

517+

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

518+

["run", "--provider", "blacksmith-testbox", "--id", "tbx_direct", "--", "echo ok"],

519+

{ env: testHomeEnv(home) },

520+

);

521+522+

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

523+

expect(result.stdout).toBe("");

524+

expect(result.stderr).toContain("provider=blacksmith-testbox --id tbx_direct");

525+

expect(result.stderr).toContain("has no Crabbox SSH key");

526+

expect(result.stderr).toContain("direct `blacksmith testbox warmup` leases");

527+

});

528+529+

it("allows reused Blacksmith Testboxes when the Crabbox SSH key exists", () => {

530+

const home = mkdtempSync(path.join(tmpdir(), "openclaw-crabbox-home-"));

531+

tempDirs.push(home);

532+

const keyPath = path.join(testCrabboxConfigDir(home), "testboxes", "tbx_owned", "id_ed25519");

533+

mkdirSync(path.dirname(keyPath), { recursive: true });

534+

writeFileSync(keyPath, "fake test key\n", "utf8");

535+536+

const result = runWrapper(

537+

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

538+

["run", "--provider", "blacksmith-testbox", "--id", "tbx_owned", "--", "echo ok"],

539+

{ env: testHomeEnv(home) },

540+

);

541+542+

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

543+

expect(parseFakeCrabboxOutput(result).args).toEqual([

544+

"run",

545+

"--provider",

546+

"blacksmith-testbox",

547+

"--id",

548+

"tbx_owned",

549+

"--",

550+

"echo ok",

551+

]);

552+

});

553+554+

it("lets Crabbox resolve reusable Testbox slugs", () => {

555+

const home = mkdtempSync(path.join(tmpdir(), "openclaw-crabbox-home-"));

556+

tempDirs.push(home);

557+558+

const result = runWrapper(

559+

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

560+

["run", "--provider", "blacksmith-testbox", "--id", "blue-hermit", "--", "echo ok"],

561+

{ env: testHomeEnv(home) },

562+

);

563+564+

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

565+

expect(parseFakeCrabboxOutput(result).args).toEqual([

566+

"run",

567+

"--provider",

568+

"blacksmith-testbox",

569+

"--id",

570+

"blue-hermit",

571+

"--",

572+

"echo ok",

573+

]);

574+

});

575+493576

it("only forces the short local-container Docker work root on Linux", () => {

494577

const result = runWrapper(

495578

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