From c7cedd3b3e2b29142c1ace98c1ab3db22f72e85e Mon Sep 17 00:00:00 2001 From: Florian Brand <46377542+xeophon@users.noreply.github.com> Date: Wed, 18 Nov 2026 17:05:42 -0800 Subject: [PATCH] Preserve OpenClaw reasoning summaries across bundle renames --- verifiers/v1/harnesses/openclaw/harness.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/verifiers/v1/harnesses/openclaw/harness.py b/verifiers/v1/harnesses/openclaw/harness.py index a36c1b7db1..74cbda1d9c 100644 --- a/verifiers/v1/harnesses/openclaw/harness.py +++ b/verifiers/v1/harnesses/openclaw/harness.py @@ -34,12 +34,15 @@ throw new Error("OpenClaw's transcript sanitizer exceeds the replay patch size limit"); } const source = fs.readFileSync(file, "utf8"); +// The published bundle can rename the local that holds the validated reasoning item. +const item = source.match(/(\w+)\.summary !== void 0 && !Array\.isArray\(\1\.summary\)/)?.[1]; +if (!item) throw new Error("could not locate OpenClaw's reasoning summary validation"); const patches = [ [ "const OPAQUE_REPLAY_TOKEN_RE = /^[A-Za-z0-9+/_-]+={0,2}$/;", "const OPAQUE_REPLAY_TOKEN_RE = /^[A-Za-z0-9+/_-]+={0,2}(?:[.][A-Za-z0-9+/_-]+={0,2})*$/;", ], - ["\t\tsummary: [],", "\t\tsummary: parsed.summary ?? [],"], + ['type: "reasoning",\n\t\tsummary: [],', `type: "reasoning",\n\t\tsummary: ${item}.summary ?? [],`], ]; let patched = source; for (const [before, after] of patches) {