Skip to content

Garry's Opinionated OpenClaw/Hermes Agent Brain

TypeScript

test(goldens): normalize the disconnect audit's most-recent-caller frame in doctor JSON goldens (#5780)

Garry Tan09ffbf6f3c63
diff --git a/test/fixtures/goldens/doctor/json-postgres-fresh.json b/test/fixtures/goldens/doctor/json-postgres-fresh.json
index 705471953d..bd7e866f41 100644
--- a/test/fixtures/goldens/doctor/json-postgres-fresh.json
+++ b/test/fixtures/goldens/doctor/json-postgres-fresh.json
@@ -862,7 +862,7 @@
},
{
"category": "ops",
- "message": "No exhausted batch retries in last 24h. Disconnect-call audit: 2 call(s) in 24h (most recent caller: at disconnect (<repo>/src/core/db.ts:346:5)).",
+ "message": "No exhausted batch retries in last 24h. Disconnect-call audit: 2 call(s) in 24h (most recent caller: <frame>).",
"name": "batch_retry_health",
"status": "ok"
},
diff --git a/test/helpers/doctor-json-golden.ts b/test/helpers/doctor-json-golden.ts
index 79560bcdd7..e11ff65e01 100644
--- a/test/helpers/doctor-json-golden.ts
+++ b/test/helpers/doctor-json-golden.ts
@@ -136,6 +136,7 @@ export function normalizeDoctorText(text: string, roots: Record<string, string>,
let out = scrubPaths(text, roots);
for (const [pattern, label] of extra) out = typeof pattern === 'string' ? out.split(pattern).join(label) : out.replace(pattern, label);
out = scrubTimestamps(out).replace(UUID, '<uuid>');
+ out = out.replace(/\(most recent caller: at [^()]*\([^()]*\)\)/g, '(most recent caller: <frame>)');
out = out.split(PACKAGE_VERSION).join('<version>');
const host = hostname();
if (host) out = out.split(host).join('<hostname>');