Skip to content

bug: Agent-scoped notification endpoints return 404 #339

Closed

Description

@vybe

Summary

Agent-scoped notification endpoints return 404 "Agent not found" for valid test agents.

Reproduction

pytest tests/test_notifications.py::TestAgentNotifications -v

Error Details

GET /api/agents/{name}/notifications
Expected 200, got 404: {"detail":"Agent not found"}

GET /api/agents/{name}/notifications/count  
Expected 200, got 404: {"detail":"Agent not found"}

Investigation Needed

  1. Check if TestAgentNotifications fixture properly creates the agent
  2. Verify test ordering — another test may delete the agent before these run
  3. Check if the endpoint uses a stricter agent lookup (e.g., requires running state)
  4. Verify case-sensitivity in agent name lookup

Possible Causes

  • Fixture teardown order issue
  • Agent not created by the time these tests run
  • Endpoint requires agent to be running, not just existing
  • Different lookup path than other /api/agents/{name}/... endpoints

Affected Tests (2)

  • test_notifications.py::TestAgentNotifications::test_get_agent_notifications_success
  • test_notifications.py::TestAgentNotifications::test_count_agent_notifications_success

Activity

  1. added
    priority-p1
    type-bug
    on Apr 14, 2026
  2. vybe commented on Apr 16, 2026

    @vybe
    ContributorAuthor

    Fixed in commit 4445193 (PR #343) — corrected created_agent fixture usage from dict to dict["name"] in test assertions.

  3. added
    complexity-low
    on Jun 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    complexity-lowpriority-p1type-bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions