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

推荐订阅源

aimingoo的专栏
aimingoo的专栏
I
InfoQ
B
Blog RSS Feed
D
Docker
GbyAI
GbyAI
N
Netflix TechBlog - Medium
Y
Y Combinator Blog
F
Fortinet All Blogs
P
Proofpoint News Feed
Microsoft Azure Blog
Microsoft Azure Blog
人人都是产品经理
人人都是产品经理
Martin Fowler
Martin Fowler
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
M
MIT News - Artificial intelligence
C
Check Point Blog
Vercel News
Vercel News
云风的 BLOG
云风的 BLOG
博客园 - Franky
Google DeepMind News
Google DeepMind News
WordPress大学
WordPress大学
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
V
V2EX
Last Week in AI
Last Week in AI
L
LangChain 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(scripts): bound boundary check output · openclaw/open...
vincentkoc · 2026-05-28 · via Recent Commits to openclaw:main

@@ -27,6 +27,7 @@ const prepareBoundaryArtifactsBin = resolve(

2727

);

2828

const extensionPackageBoundaryBaseConfig = "../tsconfig.package-boundary.base.json";

2929

const FAILURE_OUTPUT_TAIL_LINES = 40;

30+

const STEP_OUTPUT_MAX_CHARS = 256 * 1024;

3031

const SLOW_COMPILE_SUMMARY_LIMIT = 10;

3132

const COMPILE_INPUT_EXTENSIONS = new Set([".ts", ".tsx", ".mts", ".cts", ".js", ".mjs", ".json"]);

3233

const ROOTDIR_BOUNDARY_CANARY_IMPORT_PATH =

@@ -85,6 +86,26 @@ function formatFailureFooter(params = {}) {

8586

return footerLines.join("\n");

8687

}

878889+

function createStepOutputCapture() {

90+

return { text: "", truncatedChars: 0 };

91+

}

92+93+

export function appendBoundedStepOutput(buffer, chunk, maxChars = STEP_OUTPUT_MAX_CHARS) {

94+

const nextText = buffer.text + String(chunk);

95+

if (nextText.length <= maxChars) {

96+

return { text: nextText, truncatedChars: buffer.truncatedChars };

97+

}

98+

const truncatedChars = buffer.truncatedChars + nextText.length - maxChars;

99+

return { text: nextText.slice(-maxChars), truncatedChars };

100+

}

101+102+

function formatCapturedStepOutput(buffer) {

103+

if (buffer.truncatedChars === 0) {

104+

return buffer.text;

105+

}

106+

return `[output truncated ${buffer.truncatedChars} chars; showing tail]\n${buffer.text}`;

107+

}

108+88109

export function formatBoundaryCheckSuccessSummary(params = {}) {

89110

const lines = ["extension package boundary check passed"];

90111

if (params.mode) {

@@ -347,29 +368,31 @@ export function runNodeStepAsync(label, args, timeoutMs, params = {}) {

347368

stdio: ["ignore", "pipe", "pipe"],

348369

});

349370350-

let stdout = "";

351-

let stderr = "";

371+

let stdout = createStepOutputCapture();

372+

let stderr = createStepOutputCapture();

352373

let settled = false;

353374

const timer = setTimeout(() => {

354375

if (settled) {

355376

return;

356377

}

357378

settled = true;

358379

child.kill("SIGKILL");

380+

const stdoutText = formatCapturedStepOutput(stdout);

381+

const stderrText = formatCapturedStepOutput(stderr);

359382

const error = attachStepFailureMetadata(

360383

new Error(

361384

formatStepFailure(label, {

362-

stdout,

363-

stderr,

385+

stdout: stdoutText,

386+

stderr: stderrText,

364387

kind: "timeout",

365388

elapsedMs: Date.now() - startedAt,

366389

note: `${label} timed out after ${timeoutMs}ms`,

367390

}),

368391

),

369392

label,

370393

{

371-

stdout,

372-

stderr,

394+

stdout: stdoutText,

395+

stderr: stderrText,

373396

kind: "timeout",

374397

elapsedMs: Date.now() - startedAt,

375398

note: `${label} timed out after ${timeoutMs}ms`,

@@ -383,10 +406,10 @@ export function runNodeStepAsync(label, args, timeoutMs, params = {}) {

383406

child.stdout.setEncoding("utf8");

384407

child.stderr.setEncoding("utf8");

385408

child.stdout.on("data", (chunk) => {

386-

stdout += chunk;

409+

stdout = appendBoundedStepOutput(stdout, chunk);

387410

});

388411

child.stderr.on("data", (chunk) => {

389-

stderr += chunk;

412+

stderr = appendBoundedStepOutput(stderr, chunk);

390413

});

391414

child.on("error", (error) => {

392415

if (settled) {

@@ -404,20 +427,22 @@ export function runNodeStepAsync(label, args, timeoutMs, params = {}) {

404427

);

405428

return;

406429

}

430+

const stdoutText = formatCapturedStepOutput(stdout);

431+

const stderrText = formatCapturedStepOutput(stderr);

407432

const failure = attachStepFailureMetadata(

408433

new Error(

409434

formatStepFailure(label, {

410-

stdout,

411-

stderr,

435+

stdout: stdoutText,

436+

stderr: stderrText,

412437

kind: "spawn-error",

413438

elapsedMs: Date.now() - startedAt,

414439

note: error.message,

415440

}),

416441

),

417442

label,

418443

{

419-

stdout,

420-

stderr,

444+

stdout: stdoutText,

445+

stderr: stderrText,

421446

kind: "spawn-error",

422447

elapsedMs: Date.now() - startedAt,

423448

note: error.message,

@@ -434,22 +459,28 @@ export function runNodeStepAsync(label, args, timeoutMs, params = {}) {

434459

clearTimeout(timer);

435460

settled = true;

436461

if (code === 0) {

437-

resolvePromise({ stdout, stderr, elapsedMs: Date.now() - startedAt });

462+

resolvePromise({

463+

stdout: formatCapturedStepOutput(stdout),

464+

stderr: formatCapturedStepOutput(stderr),

465+

elapsedMs: Date.now() - startedAt,

466+

});

438467

return;

439468

}

469+

const stdoutText = formatCapturedStepOutput(stdout);

470+

const stderrText = formatCapturedStepOutput(stderr);

440471

const error = attachStepFailureMetadata(

441472

new Error(

442473

formatStepFailure(label, {

443-

stdout,

444-

stderr,

474+

stdout: stdoutText,

475+

stderr: stderrText,

445476

kind: "nonzero-exit",

446477

elapsedMs: Date.now() - startedAt,

447478

}),

448479

),

449480

label,

450481

{

451-

stdout,

452-

stderr,

482+

stdout: stdoutText,

483+

stderr: stderrText,

453484

kind: "nonzero-exit",

454485

elapsedMs: Date.now() - startedAt,

455486

},