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

推荐订阅源

宝玉的分享
宝玉的分享
J
Java Code Geeks
S
SegmentFault 最新的问题
L
LangChain Blog
M
MIT News - Artificial intelligence
Stack Overflow Blog
Stack Overflow Blog
IT之家
IT之家
量子位
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
雷峰网
雷峰网
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
The Cloudflare Blog
MongoDB | Blog
MongoDB | Blog
Microsoft Security Blog
Microsoft Security Blog
腾讯CDC
H
Help Net Security
阮一峰的网络日志
阮一峰的网络日志
Jina AI
Jina AI
N
Netflix TechBlog - Medium
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
fix(test): sync sparse AWS Crabbox runs from full checkou...
vincentkoc · 2026-05-24 · via Recent Commits to openclaw:main

@@ -426,8 +426,8 @@ function runCommandArgs(commandArgs) {

426426

return start >= 0 ? commandArgs.slice(start) : [];

427427

}

428428429-

function commandRuntimeEntrypoint(commandArgs) {

430-

const words = commandArgs.length === 1 ? commandArgs[0].split(/\s+/u) : commandArgs;

429+

function normalizedCommandWords(commandArgs) {

430+

const words = commandArgs.length === 1 ? commandArgs[0].split(/\s+/u) : [...commandArgs];

431431

while (words[0] === "env") {

432432

words.shift();

433433

while (/^[A-Za-z_][A-Za-z0-9_]*=/.test(words[0] ?? "")) {

@@ -437,13 +437,43 @@ function commandRuntimeEntrypoint(commandArgs) {

437437

while (/^[A-Za-z_][A-Za-z0-9_]*=/.test(words[0] ?? "")) {

438438

words.shift();

439439

}

440-

const first = (words[0] ?? "")

441-

.replace(/^['"]|['";|&()]+$/g, "")

442-

.split("/")

443-

.pop();

440+

return words.map((word) => word.replace(/^['"]|['";|&()]+$/g, ""));

441+

}

442+443+

function commandRuntimeEntrypoint(commandArgs) {

444+

const words = normalizedCommandWords(commandArgs);

445+

const first = (words[0] ?? "").split("/").pop();

444446

return ["pnpm", "npm", "npx", "corepack", "node", "yarn", "bun"].includes(first) ? first : "";

445447

}

446448449+

function isChangedGateCommand(commandArgs) {

450+

const words = normalizedCommandWords(commandArgs);

451+

if (words[0] === "corepack") {

452+

words.shift();

453+

}

454+

return (

455+

(words[0] === "pnpm" && words[1] === "check:changed") ||

456+

(words[0] === "pnpm" && words[1] === "run" && words[2] === "check:changed") ||

457+

(words[0] === "node" && (words[1] ?? "").endsWith("scripts/check-changed.mjs"))

458+

);

459+

}

460+461+

function headInRemoteRefs() {

462+

const refs = gitOutput([

463+

"for-each-ref",

464+

"--contains",

465+

"HEAD",

466+

"--format=%(refname)",

467+

"refs/remotes",

468+

]);

469+

return refs.status === 0 && refs.stdout !== "";

470+

}

471+472+

function mergeBaseForChangedGate() {

473+

const base = gitOutput(["merge-base", "origin/main", "HEAD"]);

474+

return base.status === 0 && base.stdout ? base.stdout : "origin/main";

475+

}

476+447477

function isSparseCheckout() {

448478

const config = gitOutput(["config", "--bool", "core.sparseCheckout"]);

449479

if (config.status === 0 && config.stdout === "true") {

@@ -457,8 +487,8 @@ function isWorktreeClean() {

457487

return gitOutput(["status", "--porcelain=v1"]).stdout === "";

458488

}

459489460-

function shouldUseFullCheckoutForCleanSparseBlacksmithSync(commandArgs, providerName) {

461-

if (commandArgs[0] !== "run" || providerName !== "blacksmith-testbox") {

490+

function shouldUseFullCheckoutForCleanSparseRemoteSync(commandArgs, providerName) {

491+

if (commandArgs[0] !== "run" || isLocalContainerProvider(providerName)) {

462492

return false;

463493

}

464494

if (

@@ -471,7 +501,7 @@ function shouldUseFullCheckoutForCleanSparseBlacksmithSync(commandArgs, provider

471501

return isSparseCheckout() && isWorktreeClean();

472502

}

473503474-

function prepareFullCheckoutForSync() {

504+

function prepareFullCheckoutForSync(options = {}) {

475505

const dir = mkdtempSync(resolve(tmpdir(), "openclaw-crabbox-sync-"));

476506

let active = false;

477507

const add = gitOutput(["worktree", "add", "--detach", dir, "HEAD"]);

@@ -487,8 +517,17 @@ function prepareFullCheckoutForSync() {

487517

throw new Error(`git sparse-checkout disable failed: ${disableSparse.text}`);

488518

}

489519520+

if (options.changedGateBase) {

521+

const reset = gitOutput(["-C", dir, "reset", "--mixed", "--quiet", options.changedGateBase]);

522+

if (reset.status !== 0) {

523+

cleanupFullCheckout(dir, active);

524+

throw new Error(`git reset for changed-gate sync failed: ${reset.text}`);

525+

}

526+

}

527+490528

return {

491529

dir,

530+

changedGateBase: options.changedGateBase ?? "",

492531

cleanup() {

493532

cleanupFullCheckout(dir, active);

494533

active = false;

@@ -645,13 +684,21 @@ if (provider === "blacksmith-testbox") {

645684

let childCwd = repoRoot;

646685

let cleanupChildCwd = () => {};

647686

let cleanupDone = false;

648-

if (shouldUseFullCheckoutForCleanSparseBlacksmithSync(args, provider)) {

649-

const checkout = prepareFullCheckoutForSync();

687+

if (shouldUseFullCheckoutForCleanSparseRemoteSync(args, provider)) {

688+

const runWords = runCommandArgs(args);

689+

const changedGateBase =

690+

isChangedGateCommand(runWords) && !headInRemoteRefs() ? mergeBaseForChangedGate() : "";

691+

const checkout = prepareFullCheckoutForSync({ changedGateBase });

650692

childCwd = checkout.dir;

651693

cleanupChildCwd = () => checkout.cleanup();

652694

console.error(

653695

`[crabbox] sparse clean checkout detected; syncing from temporary full checkout ${checkout.dir}`,

654696

);

697+

if (checkout.changedGateBase) {

698+

console.error(

699+

`[crabbox] remote changed gate detected; overlaying local HEAD as worktree changes from ${checkout.changedGateBase}`,

700+

);

701+

}

655702

}

656703657704

function cleanupOnce() {