mirror of
https://github.com/openclaw/openclaw.git
synced 2026-09-04 07:08:23 +00:00
Some checks are pending
ClawSweeper Dispatch / dispatch (push) Waiting to run
CodeQL / Security High (actions) (push) Waiting to run
CodeQL / Security High (channel-runtime-boundary) (push) Waiting to run
CodeQL / Security High (core-auth-secrets) (push) Waiting to run
CodeQL / Security High (mcp-process-tool-boundary) (push) Waiting to run
CodeQL / Security High (network-ssrf-boundary) (push) Waiting to run
CodeQL / Security High (plugin-trust-boundary) (push) Waiting to run
CodeQL / Security High (process-exec-boundary) (push) Waiting to run
Control UI Locale Refresh / resolve-base (push) Waiting to run
Control UI Locale Refresh / Verify generated PR App permissions (push) Blocked by required conditions
Control UI Locale Refresh / Refresh (push) Blocked by required conditions
Control UI Locale Refresh / Commit control UI locale refresh (push) Blocked by required conditions
Docs Sync Publish Repo / sync-publish-repo (push) Waiting to run
Docs / docs (push) Waiting to run
Native App Locale Refresh / Refresh native id (push) Blocked by required conditions
Native App Locale Refresh / Refresh native it (push) Blocked by required conditions
Native App Locale Refresh / Refresh native ja-JP (push) Blocked by required conditions
Native App Locale Refresh / Refresh native ko (push) Blocked by required conditions
Native App Locale Refresh / Refresh native nl (push) Blocked by required conditions
Native App Locale Refresh / Refresh native pl (push) Blocked by required conditions
Native App Locale Refresh / Refresh native pt-BR (push) Blocked by required conditions
Native App Locale Refresh / Refresh native ru (push) Blocked by required conditions
Native App Locale Refresh / Refresh native sv (push) Blocked by required conditions
Native App Locale Refresh / Refresh native th (push) Blocked by required conditions
Native App Locale Refresh / Refresh native tr (push) Blocked by required conditions
Native App Locale Refresh / Refresh native uk (push) Blocked by required conditions
Native App Locale Refresh / Refresh native vi (push) Blocked by required conditions
Native App Locale Refresh / Refresh native zh-CN (push) Blocked by required conditions
Native App Locale Refresh / Refresh native zh-TW (push) Blocked by required conditions
Native App Locale Refresh / Commit native locale refresh (push) Blocked by required conditions
Native App Locale Refresh / resolve-base (push) Waiting to run
Native App Locale Refresh / Verify generated PR App permissions (push) Blocked by required conditions
Native App Locale Refresh / Refresh native ar (push) Blocked by required conditions
Native App Locale Refresh / Refresh native de (push) Blocked by required conditions
Native App Locale Refresh / Refresh native es (push) Blocked by required conditions
Native App Locale Refresh / Refresh native fa (push) Blocked by required conditions
Native App Locale Refresh / Refresh native fr (push) Blocked by required conditions
Native App Locale Refresh / Refresh native hi (push) Blocked by required conditions
OpenClaw Stable Main Closeout / Resolve stable release closeout inputs (push) Waiting to run
OpenClaw Stable Main Closeout / Verify stable main closeout (push) Blocked by required conditions
Plugin Init Scaffold Validation / Validate provider scaffold (push) Waiting to run
Plugin NPM Release / preview_plugins_npm (push) Waiting to run
Plugin NPM Release / Validate release publish approval (push) Blocked by required conditions
Plugin NPM Release / preview_plugin_pack (push) Blocked by required conditions
Plugin NPM Release / Preflight plugin npm package () (push) Blocked by required conditions
Plugin NPM Release / Trusted publisher OIDC exchange (push) Blocked by required conditions
Plugin NPM Release / publish_plugins_npm (push) Blocked by required conditions
Plugin NPM Release / verify_plugins_npm (push) Blocked by required conditions
Vitest Cache Warm / warm (push) Waiting to run
Website Installer Sync / static (push) Waiting to run
Website Installer Sync / linux-docker (push) Waiting to run
Website Installer Sync / debian-installer (push) Waiting to run
Website Installer Sync / linux-build-tools-failure (push) Waiting to run
Website Installer Sync / linux-non-root (push) Waiting to run
Website Installer Sync / Fedora installer (non-root) (push) Waiting to run
Website Installer Sync / Fedora installer (root) (push) Waiting to run
Website Installer Sync / macos-installer (push) Waiting to run
Website Installer Sync / windows-installer (push) Waiting to run
Website Installer Sync / sync-website (push) Blocked by required conditions
Workflow Sanity / no-tabs (push) Waiting to run
Workflow Sanity / actionlint (push) Waiting to run
Workflow Sanity / generated-doc-baselines (push) Waiting to run
Allow ClawHub release validation and publish retries to stay bounded on stock macOS by using the existing managed-process owner when GNU timeout is unavailable. Preserve the GNU timeout path and status 124 retry contract. Verify TERM-before-KILL cleanup, descendant exit, and release-plan ownership for the portable fallback. Closes #125295 Co-authored-by: Ayaan Zaidi <hi@obviy.us>
45 lines
1.2 KiB
TypeScript
45 lines
1.2 KiB
TypeScript
import { runManagedCommand } from "./managed-child-process.mjs";
|
|
|
|
const NODE_TIMEOUT_MAX_MS = 2 ** 31 - 1;
|
|
|
|
function usage(message?: string): never {
|
|
if (message) {
|
|
console.error(message);
|
|
}
|
|
console.error(
|
|
"usage: node --import tsx scripts/lib/bounded-command.mts <timeout-ms> -- <command> [args...]",
|
|
);
|
|
process.exit(2);
|
|
}
|
|
|
|
const [timeoutMsRaw, separator, command, ...args] = process.argv.slice(2);
|
|
if (separator !== "--" || !command) {
|
|
usage();
|
|
}
|
|
if (!timeoutMsRaw || !/^[1-9][0-9]*$/u.test(timeoutMsRaw)) {
|
|
usage("timeout-ms must be a positive integer");
|
|
}
|
|
const timeoutMs = Number(timeoutMsRaw);
|
|
if (!Number.isSafeInteger(timeoutMs)) {
|
|
usage("timeout-ms must be a safe integer");
|
|
}
|
|
if (timeoutMs > NODE_TIMEOUT_MAX_MS) {
|
|
usage(`timeout-ms must be at most ${NODE_TIMEOUT_MAX_MS}`);
|
|
}
|
|
|
|
try {
|
|
process.exitCode = await runManagedCommand({
|
|
args,
|
|
bin: command,
|
|
requireProcessTreeExit: true,
|
|
timeoutForceKillOnLeaderExit: true,
|
|
timeoutKillGraceMs: 10_000,
|
|
timeoutMs,
|
|
});
|
|
} catch (error) {
|
|
if (error instanceof Error && "code" in error && error.code === "ETIMEDOUT") {
|
|
process.exitCode = 124;
|
|
} else {
|
|
throw error;
|
|
}
|
|
}
|