From 64a869e61367d5140c5d33b6d5544f5979625058 Mon Sep 17 00:00:00 2001 From: Sasha Varlamov Date: Mon, 3 Aug 2026 02:09:04 +0000 Subject: [PATCH] test(daemon): sync daemon before asserting wltrace checkpoint ops wltrace_captures_daemon_working_log_ops_when_enabled read the trace file immediately after 'git-ai checkpoint' returned. The CLI is acknowledged at receipt, before the daemon executes the checkpoint, so on a slow runner the assertions could run mid-execution and miss later ops (observed on macOS CI: admission and drain.exec present, append missing). Drain the daemon before reading the trace. Co-Authored-By: Claude Fable 5 --- tests/daemon_mode.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/daemon_mode.rs b/tests/daemon_mode.rs index 98cc816836..f2efb5db8b 100644 --- a/tests/daemon_mode.rs +++ b/tests/daemon_mode.rs @@ -1792,6 +1792,9 @@ fn wltrace_captures_daemon_working_log_ops_when_enabled() { fs::write(&file_path, "AI content\n").unwrap(); repo.git_ai(&["checkpoint", "mock_ai", "traced.txt"]) .unwrap(); + // The checkpoint is acknowledged at receipt, before the daemon executes + // it; wait for the daemon to drain so every traced op has been written. + repo.sync_daemon(); let trace = fs::read_to_string(trace_file.path()).expect("read wltrace output"); for op in [