Skip to content

Garry's Opinionated OpenClaw/Hermes Agent Brain

TypeScript

Fix the cooperative-abort test for the extract_facts call that now passes deferFactEmbedding after the signal

garrytanfc9351520cb3
diff --git a/test/cycle-abort.test.ts b/test/cycle-abort.test.ts
index b0157e4281..cf8e0873e3 100644
--- a/test/cycle-abort.test.ts
+++ b/test/cycle-abort.test.ts
@@ -178,7 +178,7 @@ describe('#1972 — complete cooperative-abort coverage', () => {
// Each long phase receives the signal (W0: the combined cycleSignal, so
// phases also stop on lock-steal, not just external aborts).
expect(body).toContain('runPhaseExtract(engine, brainDir, dryRun, sourceWindow?.slugs ?? syncPagesAffected, cycleSignal, cycleSourceId)');
- expect(body).toMatch(/runPhaseExtractFacts\([^)]*cycleSignal\)/);
+ expect(body).toMatch(/runPhaseExtractFacts\([^)]*cycleSignal[,)]/); // GBRA-438: deferFactEmbedding follows the signal
expect(body).toContain('signal: cycleSignal'); // consolidate opts
expect(body).toContain("runPhaseLint(brainDir, dryRun, engine, cycleSignal, cycleSourceId, { once: opts.onceForPhase === 'lint' })"); // #5180 threads the source id after the signal; #6369 the --once bypass after it
// Reaper runs at cycle start.