From 0ad80bafaae7bfe852530ab99ea6ed0296412d06 Mon Sep 17 00:00:00 2001 From: Nathan Carter Date: Mon, 28 Sep 2026 17:40:36 -0400 Subject: [PATCH] orchestrator: the fault-recovery test expects at least one pass after the heartbeat, since a queued refs or completion pass may follow it (#555) --- packages/orchestrator/test/several-engines.test.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/orchestrator/test/several-engines.test.ts b/packages/orchestrator/test/several-engines.test.ts index 15cbcbdf..d7470a00 100644 --- a/packages/orchestrator/test/several-engines.test.ts +++ b/packages/orchestrator/test/several-engines.test.ts @@ -413,9 +413,13 @@ describe('fault isolation: one engine failing leaves the others running', () => // Later faults of the same streak log their message and no stack. expect(lines.filter((l) => l.startsWith('[alpha] stack: '))).toHaveLength(1) // The heartbeat still retries: after the fault clears, alpha recovers and dispatches. + // At least one pass, not exactly one (#555): the recovered pass's own commits + // and settlement can queue a refs or completion pass while it runs, and that + // pass starts before the heartbeat's trigger returns. Every pass before the + // heartbeat backed off, so any count above zero is the heartbeat's retry. broken = false await ea!.loop.trigger('heartbeat') - expect(ticks).toBe(1) + expect(ticks).toBeGreaterThanOrEqual(1) expect((await health(a.dir)).failed).toBeUndefined() expect(lines.some((l) => /^\[alpha\] recovered after \d fault\(s\) — engine no longer marked failed for its passes$/.test(l))).toBe(true)