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

推荐订阅源

IT之家
IT之家
H
Help Net Security
GbyAI
GbyAI
博客园_首页
G
Google Developers Blog
Microsoft Security Blog
Microsoft Security Blog
博客园 - 【当耐特】
月光博客
月光博客
美团技术团队
B
Blog RSS Feed
博客园 - 三生石上(FineUI控件)
WordPress大学
WordPress大学
博客园 - 叶小钗
有赞技术团队
有赞技术团队
T
The Blog of Author Tim Ferriss
Engineering at Meta
Engineering at Meta
Google DeepMind News
Google DeepMind News
Y
Y Combinator Blog
宝玉的分享
宝玉的分享
Microsoft Azure Blog
Microsoft Azure Blog
罗磊的独立博客
云风的 BLOG
云风的 BLOG
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
P
Proofpoint News Feed

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): sync full sparse lease runs · openclaw/open...
vincentkoc · 2026-05-25 · via Recent Commits to openclaw:main

@@ -63,7 +63,11 @@ function makeFakeGit(

6363

"process.exit(response.status ?? 0);",

6464

].join("\n");

6565

writeFileSync(gitPath, `${script}\n`, "utf8");

66-

writeFileSync(`${gitPath}.cmd`, `@echo off\r\n"${process.execPath}" "%~dp0git" %*\r\n`, "utf8");

66+

writeFileSync(

67+

`${gitPath}.cmd`,

68+

`@echo off\r\n"${process.execPath}" "%~dp0git" %*\r\n`,

69+

"utf8",

70+

);

6771

chmodSync(gitPath, 0o755);

6872

return binDir;

6973

}

@@ -283,35 +287,40 @@ describe("scripts/crabbox-wrapper", () => {

283287

]);

284288

});

285289286-

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

287-

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

288-

tempDirs.push(fakeWorkspaceParent);

289-

const gitCommonDir = path.join(fakeWorkspaceParent, "openclaw", ".git");

290-

const crabboxBinDir = path.join(fakeWorkspaceParent, "crabbox", "bin");

291-

mkdirSync(gitCommonDir, { recursive: true });

292-

writeFakeCrabbox(crabboxBinDir, "provider: aws\n");

293-

const gitResponses = {

294-

["rev-parse\u0000--git-common-dir"]: { stdout: `${gitCommonDir}\n` },

295-

};

296-

const gitBinDir = makeFakeGit(gitResponses);

297-298-

const result = spawnSync(

299-

process.execPath,

300-

["scripts/crabbox-wrapper.mjs", "run", "--provider", "aws", "--", "echo ok"],

301-

{

302-

cwd: repoRoot,

303-

encoding: "utf8",

304-

env: {

305-

...process.env,

306-

OPENCLAW_FAKE_GIT_RESPONSES: JSON.stringify(gitResponses),

307-

PATH: [gitBinDir, path.dirname(process.execPath)].join(path.delimiter),

290+

const itWithPosixLinkedWorktreeFixture = process.platform === "win32" ? it.skip : it;

291+292+

itWithPosixLinkedWorktreeFixture(

293+

"finds a Crabbox checkout next to the Git common dir in linked worktrees",

294+

() => {

295+

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

296+

tempDirs.push(fakeWorkspaceParent);

297+

const gitCommonDir = path.join(fakeWorkspaceParent, "openclaw", ".git");

298+

const crabboxBinDir = path.join(fakeWorkspaceParent, "crabbox", "bin");

299+

mkdirSync(gitCommonDir, { recursive: true });

300+

writeFakeCrabbox(crabboxBinDir, "provider: aws\n");

301+

const gitResponses = {

302+

["rev-parse\u0000--git-common-dir"]: { stdout: `${gitCommonDir}\n` },

303+

};

304+

const gitBinDir = makeFakeGit(gitResponses);

305+306+

const result = spawnSync(

307+

process.execPath,

308+

["scripts/crabbox-wrapper.mjs", "run", "--provider", "aws", "--", "echo ok"],

309+

{

310+

cwd: repoRoot,

311+

encoding: "utf8",

312+

env: {

313+

...process.env,

314+

OPENCLAW_FAKE_GIT_RESPONSES: JSON.stringify(gitResponses),

315+

PATH: [gitBinDir, path.dirname(process.execPath)].join(path.delimiter),

316+

},

308317

},

309-

},

310-

);

318+

);

311319312-

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

313-

expect(parseFakeCrabboxOutput(result).args).toContain("aws");

314-

});

320+

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

321+

expect(parseFakeCrabboxOutput(result).args).toContain("aws");

322+

},

323+

);

315324316325

it("accepts advertised providers from wrapped Crabbox help", () => {

317326

const result = runWrapper(

@@ -355,18 +364,14 @@ describe("scripts/crabbox-wrapper", () => {

355364

}

356365357366

it("falls back to normal sync decisions when git is missing from PATH", () => {

358-

const binDir = makeFakeCrabbox(

367+

const result = runWrapper(

359368

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

360-

);

361-

const result = spawnSync(

362-

process.execPath,

363-

["scripts/crabbox-wrapper.mjs", "run", "--provider", "aws", "--", "echo ok"],

369+

["run", "--provider", "aws", "--", "echo ok"],

364370

{

365-

cwd: repoRoot,

366-

encoding: "utf8",

367-

env: {

368-

...process.env,

369-

PATH: [binDir, path.dirname(process.execPath)].join(path.delimiter),

371+

gitResponses: {

372+

["rev-parse\u0000--git-common-dir"]: { status: 1 },

373+

["config\u0000--bool\u0000core.sparseCheckout"]: { status: 1 },

374+

["sparse-checkout\u0000list"]: { status: 1 },

370375

},

371376

},

372377

);

@@ -493,6 +498,35 @@ describe("scripts/crabbox-wrapper", () => {

493498

expect(parseFakeCrabboxOutput(result).cwd).toContain("openclaw-crabbox-sync-");

494499

});

495500501+

it("uses a temporary full checkout when clean sparse AWS syncs reuse a lease", () => {

502+

const result = runWrapper(

503+

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

504+

[

505+

"run",

506+

"--provider",

507+

"aws",

508+

"--target",

509+

"windows",

510+

"--id",

511+

"cbx_existing",

512+

"--",

513+

"corepack",

514+

"pnpm",

515+

"build",

516+

],

517+

{

518+

gitResponses: {

519+

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

520+

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

521+

},

522+

},

523+

);

524+525+

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

526+

expect(result.stderr).toContain("syncing from temporary full checkout");

527+

expect(parseFakeCrabboxOutput(result).cwd).toContain("openclaw-crabbox-sync-");

528+

});

529+496530

it("bootstraps Git metadata for sparse changed gates on remote raw syncs", () => {

497531

const result = runWrapper(

498532

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

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

626660

expect(parseFakeCrabboxOutput(result).cwd).toBe(repoRoot);

627661

});

628662629-

it("keeps existing AWS leases on the original sparse checkout", () => {

663+

it("uses a temporary full checkout when existing AWS leases sync clean sparse worktrees", () => {

630664

const result = runWrapper(

631665

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

632666

["run", "--provider", "aws", "--id", "cbx_existing", "--", "echo ok"],

@@ -639,8 +673,8 @@ describe("scripts/crabbox-wrapper", () => {

639673

);

640674641675

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

642-

expect(result.stderr).not.toContain("syncing from temporary full checkout");

643-

expect(parseFakeCrabboxOutput(result).cwd).toBe(repoRoot);

676+

expect(result.stderr).toContain("syncing from temporary full checkout");

677+

expect(parseFakeCrabboxOutput(result).cwd).toContain("openclaw-crabbox-sync-");

644678

});

645679646680

it("uses a temporary full checkout when clean sparse branches differ from the Blacksmith ref", () => {