Skip to content

Garry's Opinionated OpenClaw/Hermes Agent Brain

TypeScript

eval longmemeval: production fact extraction fails open per session in the fact-key arm

garrytan66d1bb035f69
diff --git a/src/eval/longmemeval/retrieval-arms.ts b/src/eval/longmemeval/retrieval-arms.ts
index 802d449959..551e0618f4 100644
--- a/src/eval/longmemeval/retrieval-arms.ts
+++ b/src/eval/longmemeval/retrieval-arms.ts
@@ -145,8 +145,8 @@ async function extractItems(engine: BrainEngine, arm: FactKeyArm, body: string,
} else {
const outcome = await extractFactsFromTurnWithOutcome({ turnText: body, source: 'longmemeval:fact-keys', model: arm.model, engine });
spend.calls++;
- if (!outcome.ok) throw new Error(`production fact extractor unavailable (${outcome.reason}) for ${arm.model}`);
- items = outcome.facts.map(f => f.fact).filter(f => typeof f === 'string' && f.trim().length > 0);
+ if (!outcome.ok && outcome.reason === 'chat_unavailable') throw new Error(`production fact extractor unavailable (${outcome.reason}) for ${arm.model}`);
+ items = !outcome.ok ? [] : outcome.facts.map(f => f.fact).filter(f => typeof f === 'string' && f.trim().length > 0);
}
cache.set(key, items);
return items;