From 6db0d228c068f862550911987e89fcd04eab506c Mon Sep 17 00:00:00 2001 From: Codex Date: Wed, 17 Jun 2026 16:53:07 +0000 Subject: [PATCH] fix: recover hwlab git mirror flush partial success --- scripts/src/hwlab-node.ts | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/scripts/src/hwlab-node.ts b/scripts/src/hwlab-node.ts index e61a4599..6cb909dd 100644 --- a/scripts/src/hwlab-node.ts +++ b/scripts/src/hwlab-node.ts @@ -2266,12 +2266,24 @@ function nodeRuntimeGitMirrorRun(scoped: ReturnType 0 + && !nodeRuntimeGitMirrorNeedsFlush(partialSuccessRecoveryStatus); + const actionSucceeded = isCommandSuccess(result) || fallback?.ok === true || partialSuccessRecovered; + const status = scoped.dryRun || !actionSucceeded + ? undefined + : partialSuccessRecovered + ? partialSuccessRecovery?.status + : nodeRuntimeGitMirrorStatus({ ...scoped, action: "status", dryRun: true, confirm: false }); return { ok: actionSucceeded && (status === undefined || status.ok === true), command: `hwlab nodes git-mirror ${scoped.action} --node ${scoped.node} --lane ${scoped.lane}`, @@ -2286,12 +2298,18 @@ function nodeRuntimeGitMirrorRun(scoped: ReturnType