Skip to content

test(logging): drain mixed-mode probe logger - #99

Merged
LimiNode merged 1 commit into
mainfrom
fix/per-logger-mixed-mode-flake
May 18, 2026
Merged

test(logging): drain mixed-mode probe logger#99
LimiNode merged 1 commit into
mainfrom
fix/per-logger-mixed-mode-flake

Conversation

@LimiNode

@LimiNode LimiNode commented May 18, 2026

Copy link
Copy Markdown
Owner

Summary

  • Fix per_logger_mixed_mode_test probe logger teardown so global-executor tasks cannot outlive the stack logger they capture.
  • Align the test probe lifecycle with built-in async logger behavior by calling shutdown() from the destructor.

Cause

The failed macOS main run printed PASS: mixed_mode_drain, PASS: mixed_mode_shutdown, and 2 passed, 0 failed, but CTest still marked the process failed. LastTest.log points to a post-output process failure: CountingLogger only shut down its dedicated executor in the destructor, while global-executor tasks captured this and could run after the stack object was destroyed.

Tests

  • cmake --build build-codex-fix --target per_logger_mixed_mode_test
  • ctest --test-dir build-codex-fix -R per_logger_mixed_mode_test --output-on-failure --repeat until-fail:100
  • cmake --build build-codex-fix --target per_logger_isolation_test
  • ctest --test-dir build-codex-fix -R "per_logger_isolation_test|per_logger_mixed_mode_test" --output-on-failure --repeat until-fail:50
  • GitHub Actions CI #308: passed after rerunning checkout-failed jobs

Make the per_logger_mixed_mode_test probe logger call shutdown from its destructor so tasks submitted to the global TaskExecutor cannot run after the stack logger is destroyed.

This mirrors the built-in async logger lifecycle and fixes the macOS post-main crash where the test printed all PASS lines but CTest still observed a failed process exit.
@LimiNode
LimiNode merged commit 680f993 into main May 18, 2026
18 of 24 checks passed
@LimiNode
LimiNode deleted the fix/per-logger-mixed-mode-flake branch May 21, 2026 19:52
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