You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug][personal-assistant]: /memory/{user_id} always 502s - list_memories() requests limit=1000, server caps search at 500 #474
statewave/server/api/memories.py:663 — limit: int = Query(20, ge=1, le=500)
So every call is rejected with a 422 before it searches anything. The SDK raises, _wrap() turns it into StatewaveError, and GET /memory/{user_id} (app/api/routes.py:103-114) returns 502 for every user — the "inspect compiled memory" endpoint never works against a real server.
The route tests don't catch it because they override get_statewave with a mock.
Expected Behavior
GET /memory/{user_id} returns the subject's memories.
Suggested fix
Set _SEARCH_LIMIT = 500, with a comment naming the server cap so it doesn't drift again.
Steps to Reproduce
Run Statewave locally and seed a user (python -m scripts.seed).
curl localhost:8000/memory/<user_id> → 502, detail contains a 422 from Statewave.
Or directly: curl "localhost:8100/v1/memories/search?subject_id=x&limit=1000" → 422.
Environment
main @ e89f33b; Statewave server main.
Severity
Medium for the demo — one of its three endpoints is always broken. One-line fix.
The fix belongs in statewave-personal-assistant, not this core repository. I am preparing the 500-result cap there, with a regression checking the actual SDK request parameter and the local CI commands. AI-assisted work prepared through Perplexity Computer; live server/warehouse access is not required for the transport contract tests.
Activity
nawaaaaaAaar commentedon Oct 5, 2026
The fix belongs in statewave-personal-assistant, not this core repository. I am preparing the 500-result cap there, with a regression checking the actual SDK request parameter and the local CI commands. AI-assisted work prepared through Perplexity Computer; live server/warehouse access is not required for the transport contract tests.