Skip to content

test: assert Logger output for backpressure and thread-pool worker exceptions#471

Merged
mvillmow merged 1 commit into
mainfrom
337-auto-impl
Apr 26, 2026
Merged

test: assert Logger output for backpressure and thread-pool worker exceptions#471
mvillmow merged 1 commit into
mainfrom
337-auto-impl

Conversation

@mvillmow
Copy link
Copy Markdown
Collaborator

Summary

  • Adds AgentCoreLogTest suite to test_agent_core.cpp with two new tests:
    • BackpressureInboxFullLogsWarn — verifies [BACKPRESSURE] ... inbox full is logged at warn level when AgentCore receives messages beyond AGENT_MAX_QUEUE_SIZE
    • BackpressureRecoveryLogsInfo — verifies ... recovered ... accepting messages is logged at info level once the queue drains below the low watermark
  • Adds ThreadPoolLogTest suite to test_thread_pool.cpp with two new tests:
    • WorkerStdExceptionIsLogged — verifies ThreadPool: Exception in worker: <msg> is logged at error when a task throws std::exception
    • WorkerUnknownExceptionIsLogged — verifies ThreadPool: Unknown exception in worker is logged at error for non-std::exception throws
  • Uses spdlog::sinks::ringbuffer_sink_mt injected via spdlog::get("keystone")->sinks() so assertions run against real spdlog output without requiring stderr capture or mocking.

Closes #337

Test plan

  • cmake --preset debug && cmake --build --preset debug && ctest --preset debug -R "AgentCoreLog|ThreadPoolLog" --output-on-failure
  • cmake --preset asan && cmake --build --preset asan && ctest --preset asan -R "AgentCoreLog|ThreadPoolLog" --output-on-failure
  • just format-check passes (verified locally)

🤖 Generated with Claude Code

@mvillmow mvillmow enabled auto-merge (rebase) April 26, 2026 00:47
@github-actions
Copy link
Copy Markdown

✅ Dependency Audit

Severity Count
Critical 0
High 0
Medium 0
Low 0

See the Security tab for detailed findings.


Workflow: Dependency Audit

@github-actions
Copy link
Copy Markdown

Security Scan Results

  • ❌ Secret Scanning: Potential secrets found
  • ✅ SAST: Completed (check Security tab for details)
  • ✅ Dependency Scanning: Completed
  • ✅ C++ Static Analysis: Completed
  • ✅ Docker Image Scanning: 0 high, 22 medium vulnerabilities (acceptable)

Recommendations

  • Review findings in the GitHub Security tab
  • Check artifact uploads for detailed reports
  • Address critical Docker vulnerabilities immediately

Workflow: Security Scanning

…ceptions

Add spdlog ringbuffer_sink_mt-based assertions to test_agent_core.cpp
(AgentCoreLogTest) and test_thread_pool.cpp (ThreadPoolLogTest) so that
backpressure inbox-full / recovered log lines and worker exception log
lines are verified at the correct content level, not just "no crash".

Closes #337

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@mvillmow mvillmow merged commit 4d8cc7f into main Apr 26, 2026
7 of 9 checks passed
@mvillmow mvillmow deleted the 337-auto-impl branch April 26, 2026 18:31
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.

Test Logger output in unit tests for backpressure and thread pool

1 participant