Skip to content

feat(agent): log tool dispatch errors and add tool-list and CVE regex unit tests#6

Merged
nethoundsh merged 1 commit into
mainfrom
feat/agent-logging-and-tests
May 14, 2026
Merged

feat(agent): log tool dispatch errors and add tool-list and CVE regex unit tests#6
nethoundsh merged 1 commit into
mainfrom
feat/agent-logging-and-tests

Conversation

@nethoundsh
Copy link
Copy Markdown
Owner

Summary

  • Tool dispatch errors are now logged at Warn level so failures are visible in server logs without requiring debug mode
  • Adds 6 unit tests covering tool list construction and CVE ID regex validation

Changes

  • internal/agent/agent.go: add a.log.Warn("tool error", ...) in the dispatch error branch
  • internal/agent/agent_test.go (new): TestToolsDocOnly, TestToolsWithVulnCheck, TestToolsWithBrave, TestToolsWithResearch, TestToolsAllEnabled, TestCVEIDRegex

Test plan

  • go test ./internal/agent/... passes
  • Tool errors appear in server logs at warn level when a dispatch fails

🤖 Generated with Claude Code

… unit tests

Add a Warn log line when a tool call returns an error so failures are
visible in server logs without requiring debug mode. Add 6 unit tests:
tool list construction for all client combinations (doc-only, vulncheck,
brave, research, all-enabled) and CVE ID regex correctness.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@nethoundsh nethoundsh merged commit 51966ef into main May 14, 2026
1 check passed
nethoundsh added a commit that referenced this pull request May 14, 2026
Add table rows for internal/vulncheck (7 tests) and internal/agent
(6 tests) to reflect the new test files added in PRs #5 and #6.

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
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