Commit Graph
4 Commits
Author SHA1 Message Date
Admin Bot e8ee03c8fc feat(sessions): add SessionAdapter — REST CRUD for sessions/milestones/episodes (#50)
CI / CI (pull_request) Successful in 2m55s
New internal/sessions package with Handler bridging 7 REST endpoints to:
- POST /memory/ingest on poimen-memory:8080 (writes)
- GraphQL hybridSearch/entity on poimen-graphql:8090 (reads)

Adapter registration: X-Service: sessions with resources sessions,
session, milestones, episodes, episode. IDs via query params
(?session_id=, ?episode_id=) — dispatcher does not substitute path params.

episode_id = sha256(session_id+milestone_id+attempt) per §4.14 Q6.
Content JSON-encoded (prevents key:value injection on user fields).
Limit capped at 200. GraphQL error body detected and surfaced as 502.
tracing.NewTransport wired for cross-service trace propagation.
JWT forwarded to both upstreams for auth.

30 tests in handler_test.go covering all 7 handlers + EpisodeID helper.

Closes #50
2026-09-28 09:39:19 +08:00
30e0a83a50 feat(network): SSE optimization for local LLM streaming (#31 #32 #33) (#26)
CI / CI (push) Successful in 3m35s
Addresses three critical network issues for LLM streaming performance:

**#33 Disable proxy buffering for SSE**
- Add X-Accel-Buffering: no header to response
- Tells nginx/Ingress to stream events immediately instead of buffering

**#32 HTTP/2 multiplexing for concurrent streams**
- Enable HTTP/2 in server config via http2.ConfigureServer()
- Increase MaxConnsPerHost to 10 for better concurrency
- Allows multiple concurrent LLM requests without blocking

**#31 TCP backpressure for streaming LLM responses**
- Set TCP_NODELAY on dialer to disable Nagle's algorithm
- Reduces latency by sending small packets immediately
- Critical for low TTFT (time-to-first-token) under load

**Tests added:**
- TestTCPBackpressure: Verifies TCP backpressure handling with slow client
- TestConcurrentSSEStreams: Confirms HTTP/2 multiplexing works correctly

---------

Co-authored-by: poison <[email protected]>
Reviewed-on: #26
Co-authored-by: poimen <[email protected]>
2026-09-13 23:37:33 +00:00
Admin Bot 951a4399d6 feat: unblock 8.9 memory adapter extended (all 33 tasks GREEN)
Build and push / Build and push image (push) Successful in 1m1s
Build / Build and push image (push) Successful in 50s
CI / Test, vet, build (push) Failing after 1m9s
2026-08-26 13:54:23 -07:00
Admin Bot 425611ec42 feat: phase 8 serviceadapter crd rollout (32/33 tasks) 2026-08-26 13:47:36 -07:00