From 4adae40e26a3ab12636cc016be9fe853e33fd2cf Mon Sep 17 00:00:00 2001 From: HiranoMasaaki Date: Mon, 16 Feb 2026 18:44:41 +0000 Subject: [PATCH] fix: increase lazy-init e2e timing threshold for real-time events With real-time lifecycle event emission (from #545), the gap between base's skillConnected and startRun now includes other adapter setup time. Increase threshold from 50ms to 200ms to account for this. Co-Authored-By: Claude Opus 4.6 --- e2e/perstack-cli/lazy-init.test.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/e2e/perstack-cli/lazy-init.test.ts b/e2e/perstack-cli/lazy-init.test.ts index 7f32ff93..ba0f8db1 100644 --- a/e2e/perstack-cli/lazy-init.test.ts +++ b/e2e/perstack-cli/lazy-init.test.ts @@ -110,11 +110,12 @@ describe.concurrent("Lazy Init", () => { // @perstack/base (lazyInit=false) should be connected BEFORE startRun expect(baseSkillEvent!.timestamp).toBeLessThanOrEqual(startRunEvent!.timestamp) - // Verify that startRun happens immediately after base connects (not waiting for attacker) - // The gap between base connected and startRun should be small (< 50ms) - // Using 50ms to account for event loop, GC pauses, and CI runner variability + // Verify that startRun happens soon after base connects (not waiting for attacker) + // With real-time lifecycle events, the gap includes time for other adapter setup + // between base's skillConnected and startRun. Using 200ms to account for + // event loop, GC pauses, stdio spawn overhead, and CI runner variability. const gapMs = startRunEvent!.timestamp - baseSkillEvent!.timestamp - expect(gapMs).toBeLessThan(50) + expect(gapMs).toBeLessThan(200) // Run should complete successfully const completeRunEvent = events.find((e) => e.type === "completeRun")