Skip to content

[codex] Fix local daemon auto-connect for test-support wrappers#924

Draft
svarlamov wants to merge 1 commit intomainfrom
codex/fix-local-debug-daemon-connect
Draft

[codex] Fix local daemon auto-connect for test-support wrappers#924
svarlamov wants to merge 1 commit intomainfrom
codex/fix-local-debug-daemon-connect

Conversation

@svarlamov
Copy link
Copy Markdown
Member

Summary

  • allow locally run test-support wrappers to auto-connect to the daemon when they are not running under the integration harness
  • preserve wrapper-daemon test behavior by continuing to honor explicit daemon socket env vars first and by skipping auto-connect when the existing test DB env markers are present
  • add unit coverage for test-harness detection and explicit socket override precedence

Root Cause

init_daemon_telemetry_handle() treated every test-support build as a harness-managed test binary. In local dev, that meant the wrapper skipped daemon auto-connect unless GIT_AI_DAEMON_CONTROL_SOCKET was set, leaving the telemetry handle disconnected and producing noisy failed to send pre/post-state messages even though the daemon fallback path still worked.

Validation

  • cargo test test_harness_detection_uses_test_db_override_vars -- --nocapture
  • cargo test --lib explicit_control_socket_override_wins_over_test_harness_marker -- --nocapture
  • cargo build --bin git-ai --features test-support
  • manual repro: exec -a git target/debug/git-ai add a.txt in a temp repo without daemon socket env vars; wrapper warning no longer appears

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