Skip to content

bug: uteke-serve /stats endpoint rejects namespace query parameter #382

Closed

Description

@ajianaz

Description

GET /stats?namespace=<name> returns {"error":"Not found"} even when the namespace has memories. Without the parameter, GET /stats returns global stats correctly.

Steps to Reproduce

# Start server
uteke-serve --port 8767

# Store a memory in a namespace
curl -s -X POST http://127.0.0.1:8767/remember \
  -H "Content-Type: application/json" \
  -d '{"content":"test","tags":["t"],"namespace":"hermes"}'
# → {"id":"..."}

# Global stats works
curl -s http://127.0.0.1:8767/stats
# → {"total_memories":78,"unique_tags":133,...}

# Namespace-scoped stats fails
curl -s "http://127.0.0.1:8767/stats?namespace=hermes"
# → {"error":"Not found"}

Expected Behavior

GET /stats?namespace=hermes should return stats scoped to the hermes namespace:

{
  "total_memories": 1,
  "namespace": "hermes",
  ...
}

Actual Behavior

{"error":"Not found"}

Environment

  • uteke version: 0.2.0
  • Platform: macOS (Apple Silicon)
  • Server mode: uteke-serve --port 8767

Notes

The /namespaces endpoint exists (returns available namespaces), and the CLI uteke stats --namespace hermes works correctly via the direct store. The bug is only in the HTTP server's /stats route handler not parsing the namespace query parameter.

Related docs reference: Hermes integration guide shows GET /stats?namespace=hermes as the intended usage pattern.

Activity

  1. added
    bug
    scope:server
    on Jun 18, 2026
  2. added a commit that references this issue on Jun 19, 2026
  3. ajianaz commented on Jun 19, 2026

    @ajianaz
    CollaboratorAuthor

    Fixed in #391 (merged to develop). GET /stats now parses ?namespace= query parameter and passes it to uteke.stats() for scoped results.

  4. added a commit that references this issue on Aug 13, 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

    bugpriority:mediumscope:server

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions