fix(release): stabilize plugin prerelease validation

This commit is contained in:
Peter Steinberger
2026-05-01 19:25:36 +01:00
parent 13c4066816
commit 73c429d24f
8 changed files with 45 additions and 16 deletions

View File

@@ -82,19 +82,26 @@ async function waitForProbeExit(params: {
throw new Error(`${label} MCP probe process still alive after run: pid=${pid} args=${args}`);
}
async function waitForAnyProbeExit(params: {
async function waitForAllProbeExits(params: {
pidsPath: string;
label: string;
timeoutMs: number;
}): Promise<number> {
}): Promise<number[]> {
const startedAt = Date.now();
let observed: number[] = [];
while (Date.now() - startedAt < params.timeoutMs) {
observed = await readProbePids(params.pidsPath);
for (const pid of observed) {
const args = await describeProbePid(pid);
if (!args || !args.includes("openclaw-cron-mcp-cleanup-probe")) {
return pid;
if (observed.length > 0) {
let allExited = true;
for (const pid of observed) {
const args = await describeProbePid(pid);
if (args?.includes("openclaw-cron-mcp-cleanup-probe")) {
allExited = false;
break;
}
}
if (allExited) {
return observed;
}
}
await delay(100);
@@ -201,7 +208,7 @@ async function runSubagentCleanupScenario(params: {
pidPath: string;
pidsPath: string;
exitPath: string;
}): Promise<{ runId: string; exitedPid: number; pids: number[] }> {
}): Promise<{ runId: string; exitedPids: number[]; pids: number[] }> {
const { gateway, pidPath, pidsPath, exitPath } = params;
await resetProbeFiles({ pidPath, pidsPath, exitPath });
@@ -238,14 +245,14 @@ async function runSubagentCleanupScenario(params: {
`subagent cleanup run did not finish ok: ${JSON.stringify(finished)}`,
);
const exitedPid = await waitForAnyProbeExit({
const exitedPids = await waitForAllProbeExits({
pidsPath,
label: "subagent",
timeoutMs: 240_000,
});
return {
runId: run.runId,
exitedPid,
exitedPids,
pids: await readProbePids(pidsPath),
};
}

View File

@@ -14,7 +14,7 @@ const READY_TIMEOUT_MS = readPositiveInt(
const RPC_TIMEOUT_MS = readPositiveInt(process.env.OPENCLAW_BUNDLED_PLUGIN_RUNTIME_RPC_MS, 60000);
const RPC_READY_TIMEOUT_MS = readPositiveInt(
process.env.OPENCLAW_BUNDLED_PLUGIN_RUNTIME_RPC_READY_MS,
90000,
210000,
);
function readPositiveInt(raw, fallback) {

View File

@@ -198,7 +198,8 @@ run_proxy_env_flow() {
printf "%s\n" "Environment=HTTP_PROXY=http://stale-proxy.local:7890"
printf "%s\n" "Environment=HTTPS_PROXY=https://stale-proxy.local:7890"
} >>"$unit_path"
if ! timeout "$command_timeout" node "$git_cli" doctor --repair --yes >"$doctor_log" 2>&1; then
if ! timeout "$command_timeout" env OPENCLAW_UPDATE_IN_PROGRESS=1 \
node "$git_cli" doctor --repair --force --yes --non-interactive >"$doctor_log" 2>&1; then
cat "$doctor_log"
exit 1
fi