Skip to content

test(daemon): sync daemon before asserting wltrace checkpoint ops - #2070

Open
svarlamov wants to merge 1 commit into
mainfrom
fix/wltrace-test-sync
Open

test(daemon): sync daemon before asserting wltrace checkpoint ops#2070
svarlamov wants to merge 1 commit into
mainfrom
fix/wltrace-test-sync

Conversation

@svarlamov

@svarlamov svarlamov commented Aug 3, 2026

Copy link
Copy Markdown
Member

Summary

wltrace_captures_daemon_working_log_ops_when_enabled read the wltrace 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 can run mid-execution and miss the later ops.

Observed on macOS CI in #2030's run: checkpoint.admission and drain.exec were present in the trace but working_log.append_checkpoint was not — the daemon was mid-checkpoint when the file was read. The race exists since #2063 tightened the test's assertions and can bite any PR.

Fix: drain the daemon (repo.sync_daemon()) before reading the trace file, matching the idiom used elsewhere in daemon_mode.rs. sync.family completes only after the family sequencer has fully executed the checkpoint, so all traced ops are on disk by the time the test reads them.

Validation

  • Test-only change; no production code touched.
  • CI runs the full matrix including this test on all three platforms.

🤖 Generated with Claude Code


Open in Devin Review

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 <noreply@anthropic.com>

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Open in Devin Review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant