test(daemon): sync daemon before asserting wltrace checkpoint ops - #2070
Open
svarlamov wants to merge 1 commit into
Open
test(daemon): sync daemon before asserting wltrace checkpoint ops#2070svarlamov wants to merge 1 commit into
svarlamov wants to merge 1 commit into
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
wltrace_captures_daemon_working_log_ops_when_enabledread the wltrace file immediately aftergit-ai checkpointreturned. 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.admissionanddrain.execwere present in the trace butworking_log.append_checkpointwas 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 indaemon_mode.rs.sync.familycompletes 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
🤖 Generated with Claude Code