# Feature Spec: Service Mesh Interop ## Summary Enable inter-service communication: Chat Service validates tokens via auth-svc, and pushes async tasks to the PostgreSQL job queue for Worker to process. ## Requirements 1. **Auth-svc /validate endpoint**: Auth Service exposes `POST /api/auth-svc/validate` that accepts a Bearer token and returns the validated user info. 2. **Chat-svc token validation**: Chat Service calls `http://auth-svc/api/auth-svc/validate` via `pkg/svc` client to check tokens on protected endpoints. 3. **Chat-svc queue producer**: Chat Service pushes jobs to the PostgreSQL queue (via `pkg/queue`) for async processing by Worker. 4. **Worker job processing**: Worker registers a handler for `chat_task` job type and processes tasks from the queue. ## Non-Goals - No new database schemas beyond existing jobs table - No Redis (using existing PostgreSQL queue) - No new frontend changes ## Acceptance Criteria - [ ] Auth-svc has a `/validate` endpoint that validates JWT tokens - [ ] Chat-svc calls auth-svc to validate tokens on protected routes - [ ] Chat-svc can enqueue jobs to the queue - [ ] Worker processes `chat_task` jobs - [ ] All components have tests - [ ] All tests pass