Skip to content

Missing test coverage for sub-agent observability changes #1431

Description

@petabridge-netclaw

Problem

PR #1428 adds new behavior (SessionId enrichment, mandatory activity sink, OTel trace correlation) but has no tests covering these changes.

What Needs Testing

  1. SessionId enrichment — Verify that sub-agent log events include a SessionId property matching the parent session when spawned within a session context.
  2. Discard channel behavior — Verify that when activitySink is null, a discard channel is created and passed to the sub-agent without errors.
  3. OTel trace correlation — Verify that the spawner's Activity has the correct parent trace ID set.
  4. Tool START events — Verify that tool execution logs include a tool start event (separate from the existing result event).
  5. Tool denial logging — Verify that tool denials appear at INFO level (previously DEBUG).

Proposed Tests

  • Unit test: SubAgentSpawnerTestsSessionIdEnrichment_WhenSpawned_InSessionContext
  • Unit test: SubAgentSpawnerTestsActivitySink_IsDiscardChannel_WhenNotProvided
  • Integration test: SubAgentActorTestsToolStartEvents_Emitted_WithCallId
  • Integration test: SubAgentActorTestsSummaryLog_IncludesCumulativeStats
  • Integration test: SubAgentSpawnerTestsToolDenials_LogAtInfoLevel

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions