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

推荐订阅源

Recent Announcements
Recent Announcements
V
Visual Studio Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
云风的 BLOG
云风的 BLOG
Microsoft Security Blog
Microsoft Security Blog
博客园 - 司徒正美
Y
Y Combinator Blog
Stack Overflow Blog
Stack Overflow Blog
雷峰网
雷峰网
小众软件
小众软件
GbyAI
GbyAI
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
aimingoo的专栏
aimingoo的专栏
MyScale Blog
MyScale Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
腾讯CDC
A
About on SuperTechFans
宝玉的分享
宝玉的分享
WordPress大学
WordPress大学
B
Blog RSS Feed
G
Google Developers Blog
量子位
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
博客园 - 三生石上(FineUI控件)

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): guard boundary check cli args · openclaw/openc...
vincentkoc · 2026-06-20 · via Recent Commits to openclaw:main

@@ -495,44 +495,85 @@ export async function runChecks(

495495

return failures;

496496

}

497497498-

function resolveCliShardSpec(args, env) {

499-

const shardIndex = args.indexOf("--shard");

500-

if (shardIndex !== -1) {

501-

return args[shardIndex + 1] ?? "";

502-

}

503-

const inlineShard = args.find((arg) => arg.startsWith("--shard="));

504-

if (inlineShard) {

505-

return inlineShard.slice("--shard=".length);

498+

function usage() {

499+

return `Usage: node scripts/run-additional-boundary-checks.mjs [--shard <N/TOTAL>[,<N/TOTAL>]]

500+501+

Runs supplemental architecture and boundary checks with bounded concurrency.

502+503+

Options:

504+

--shard <spec> Run only checks selected by one or more N/TOTAL shard specs

505+

-h, --help Show this help

506+

`;

507+

}

508+509+

export function parseCliArgs(args, env = process.env) {

510+

let shardSpec = env.OPENCLAW_ADDITIONAL_BOUNDARY_SHARD ?? "";

511+

let help = false;

512+

for (let index = 0; index < args.length; index += 1) {

513+

const arg = args[index];

514+

if (arg === "-h" || arg === "--help") {

515+

help = true;

516+

continue;

517+

}

518+

if (arg === "--shard") {

519+

const value = args[index + 1];

520+

if (!value || value.startsWith("--")) {

521+

throw new Error("--shard requires a value");

522+

}

523+

shardSpec = value;

524+

index += 1;

525+

continue;

526+

}

527+

if (arg.startsWith("--shard=")) {

528+

const value = arg.slice("--shard=".length);

529+

if (!value) {

530+

throw new Error("--shard requires a value");

531+

}

532+

shardSpec = value;

533+

continue;

534+

}

535+

throw new Error(`Unknown argument: ${arg}`);

506536

}

507-

return env.OPENCLAW_ADDITIONAL_BOUNDARY_SHARD ?? "";

537+

return { help, shardSpec };

508538

}

509539510540

if (import.meta.url === `file://${process.argv[1]}`) {

511-

const concurrencyRaw =

512-

process.env.OPENCLAW_ADDITIONAL_BOUNDARY_CONCURRENCY ??

513-

process.env.OPENCLAW_EXTENSION_BOUNDARY_CONCURRENCY;

514-

const concurrencyLabel =

515-

process.env.OPENCLAW_ADDITIONAL_BOUNDARY_CONCURRENCY === undefined

516-

? "OPENCLAW_EXTENSION_BOUNDARY_CONCURRENCY"

517-

: "OPENCLAW_ADDITIONAL_BOUNDARY_CONCURRENCY";

518-

const concurrency = resolveConcurrency(concurrencyRaw, 4, concurrencyLabel);

519-

const checkTimeoutMs = resolvePositiveInteger(

520-

process.env.OPENCLAW_ADDITIONAL_BOUNDARY_TIMEOUT_MS,

521-

DEFAULT_CHECK_TIMEOUT_MS,

522-

"OPENCLAW_ADDITIONAL_BOUNDARY_TIMEOUT_MS",

523-

);

524-

const outputMaxBytes = resolvePositiveInteger(

525-

process.env.OPENCLAW_ADDITIONAL_BOUNDARY_OUTPUT_MAX_BYTES,

526-

DEFAULT_OUTPUT_MAX_BYTES,

527-

"OPENCLAW_ADDITIONAL_BOUNDARY_OUTPUT_MAX_BYTES",

528-

);

529-

const shards = parseShardSelection(resolveCliShardSpec(process.argv.slice(2), process.env));

530-

const checks = selectChecksForShard(BOUNDARY_CHECKS, shards);

531-

if (shards) {

532-

process.stdout.write(

533-

`Running ${checks.length}/${BOUNDARY_CHECKS.length} additional boundary checks (shard ${shards.map((shard) => shard.label).join(",")})\n`,

534-

);

541+

try {

542+

const cliArgs = parseCliArgs(process.argv.slice(2), process.env);

543+

if (cliArgs.help) {

544+

process.stdout.write(usage());

545+

process.exitCode = 0;

546+

} else {

547+

const concurrencyRaw =

548+

process.env.OPENCLAW_ADDITIONAL_BOUNDARY_CONCURRENCY ??

549+

process.env.OPENCLAW_EXTENSION_BOUNDARY_CONCURRENCY;

550+

const concurrencyLabel =

551+

process.env.OPENCLAW_ADDITIONAL_BOUNDARY_CONCURRENCY === undefined

552+

? "OPENCLAW_EXTENSION_BOUNDARY_CONCURRENCY"

553+

: "OPENCLAW_ADDITIONAL_BOUNDARY_CONCURRENCY";

554+

const concurrency = resolveConcurrency(concurrencyRaw, 4, concurrencyLabel);

555+

const checkTimeoutMs = resolvePositiveInteger(

556+

process.env.OPENCLAW_ADDITIONAL_BOUNDARY_TIMEOUT_MS,

557+

DEFAULT_CHECK_TIMEOUT_MS,

558+

"OPENCLAW_ADDITIONAL_BOUNDARY_TIMEOUT_MS",

559+

);

560+

const outputMaxBytes = resolvePositiveInteger(

561+

process.env.OPENCLAW_ADDITIONAL_BOUNDARY_OUTPUT_MAX_BYTES,

562+

DEFAULT_OUTPUT_MAX_BYTES,

563+

"OPENCLAW_ADDITIONAL_BOUNDARY_OUTPUT_MAX_BYTES",

564+

);

565+

const shards = parseShardSelection(cliArgs.shardSpec);

566+

const checks = selectChecksForShard(BOUNDARY_CHECKS, shards);

567+

if (shards) {

568+

process.stdout.write(

569+

`Running ${checks.length}/${BOUNDARY_CHECKS.length} additional boundary checks (shard ${shards.map((shard) => shard.label).join(",")})\n`,

570+

);

571+

}

572+

const failures = await runChecks(checks, { checkTimeoutMs, concurrency, outputMaxBytes });

573+

process.exitCode = failures === 0 ? 0 : 1;

574+

}

575+

} catch (error) {

576+

process.stderr.write(`${error instanceof Error ? error.message : String(error)}\n\n${usage()}`);

577+

process.exitCode = 1;

535578

}

536-

const failures = await runChecks(checks, { checkTimeoutMs, concurrency, outputMaxBytes });

537-

process.exitCode = failures === 0 ? 0 : 1;

538579

}