Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion verifiers/v1/harnesses/openclaw/harness.py
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
Loading