Skip to content

[Bug] #942

Description

@sandrostar1-a11y

🐞 Bug Report

Describe the bug

peer_perspective filter on workspace search endpoint returns significantly fewer results than the same query without the filter. The unfiltered search returns 5 results, but adding filters: {"peer_perspective": "Sandro"} returns only 1 result (the most recent message). The peer-specific search endpoint (/peers/{id}/search) works correctly and returns 3 results for the same query.


Is this a regression?

Unknown — the peer_perspective filter was not tested in v3.0.11. The previous Hermes integration used a different code path that didn't perform real searches, so this bug may have existed before v3.0.12.


To Reproduce

  1. Have a workspace with multiple sessions and messages from peer "Sandro"
  2. Run unfiltered search:
    curl -X POST http://localhost:8000/v3/workspaces/hermes/search -H "Content-Type: application/json" -d '{"query": "redis portainer", "limit": 5}'
    → Returns 5 results
  3. Run same search with peer_perspective filter:
    curl -X POST http://localhost:8000/v3/workspaces/hermes/search -H "Content-Type: application/json" -d '{"query": "redis portainer", "filters": {"peer_perspective": "Sandro"}, "limit": 5}'
    → Returns only 1 result
  4. Compare with peer-specific search endpoint:
    curl -X POST http://localhost:8000/v3/workspaces/hermes/peers/Sandro/search -H "Content-Type: application/json" -d '{"query": "redis portainer", "max_results": 5}'
    → Returns 3 results

Expected behaviour

The peer_perspective-filtered workspace search should return a similar number of results as the unfiltered search, since the peer "Sandro" is the primary author in this workspace. The peer-specific search endpoint already works correctly.


Media prove

N/A


Your environment

  • OS: Ubuntu 26.04 (Contabo VPS)
  • Honcho Server Version: v3.0.12
  • Honcho Client Version: Python v2.1.2
  • Vector store: pgvector (7609 embeddings in message_embeddings)
  • Deployment: Docker Compose (self-hosted)

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions