Session storage and retrieval store APIs(redis)#393
Merged
Thirunayan22 merged 59 commits intobuerokratt:wipfrom Apr 16, 2026
Merged
Session storage and retrieval store APIs(redis)#393Thirunayan22 merged 59 commits intobuerokratt:wipfrom
Thirunayan22 merged 59 commits intobuerokratt:wipfrom
Conversation
Get update from wip into llm-316
Get update from llm-316
Intent enrichment pipeline (buerokratt#319)
get update from wip into llm-304
Service layer validation in tool classifier (buerokratt#321)
Get update from wip
Pulling changes from BYK wip to LLM-Module WIP
Get update from wip into optimization/data-enrichment
…mance improvement
Get update from optimization/data-enrichment into optimization/vector-indexer
Get update from llm-309 before getting context generation workflow changes
Get update from llm-310 into llm/service-integration
Get update from llm-310
Context based response generation workflow (buerokratt#327)
Sync wip branches 3/18/2026
fixed the test production UI issue (buerokratt#366)
Sync wip branches 3/23/2026
Missing helm charts for Vault (buerokratt#375)
Sync wip branches 4/7/2026
Sync wip branches
Sync wip branches
Parameter Extractor DSPy Module. (buerokratt#391)
Get update from wip
Thirunayan22
requested changes
Apr 16, 2026
Collaborator
Thirunayan22
left a comment
There was a problem hiding this comment.
Review Overview
Verdict: Request Changes — 2 critical issues must be resolved before merge.
Issues by Severity
Critical
- Hardcoded Redis password in docker-compose files (violates ADR SEC-001)
- Race condition in
update()— non-atomic read-modify-write
High
- No TLS support despite existing TLS config vars in
env.example - Silent
Nonefallback with no consumer feedback mechanism - Global mutable state for Redis client singleton
Medium
update()accepts arbitrary**kwargswith no field validationREDIS_SESSION_DBmisplaced inenv.example- No integration tests — all Redis interactions mocked
- Dead code in documentation usage example
Low
close_redis_client()outside try/except in shutdown path- Legacy
typing.Dict/typing.Optionalimports (Python 3.12 project)
ADR Compliance
| ADR | Status | Notes |
|---|---|---|
| SEC-001: Secrets Management | VIOLATION | Default password myredissecret hardcoded in compose files |
| ARCH-001: Modular Architecture | PASS | Clean module separation |
| VIS-003: Observability Contracts | PARTIAL | Health check present, no /metrics for session ops |
| DATA-001: Client Data Boundary | NEEDS REVIEW | Session data may contain user-provided params |
| NOOPS-004: Fault Tolerance | PARTIAL | Graceful degradation present, no retry/backoff |
| LOG-001: Structured Logging | PARTIAL | Loguru used, not JSON schema per ADR |
Thirunayan22
approved these changes
Apr 16, 2026
nuwangeek
added a commit
to rootcodelabs/LLM-Module
that referenced
this pull request
Apr 16, 2026
Session storage and retrieval store APIs(redis) (buerokratt#393)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces a Redis-backed session store for managing multi-turn API tool workflows, including all necessary infrastructure, application logic, configuration, and documentation. The main changes add a robust, async CRUD interface for storing session state in Redis, integrate the store into the FastAPI app lifecycle, and provide clear usage documentation. Redis connectivity is now surfaced in the service health check, and all configuration is parameterized for flexible deployment.
Session Store Implementation and Integration
APIToolSessionStoreandAPIToolSessionPydantic model to enable async CRUD operations for agentic session state, with sliding TTL and partial updates. (src/utils/api_tool_session_store.py,src/models/session_models.py) [1] [2]app.state.session_storeand handling Redis outages gracefully. (src/llm_orchestration_service_api.py) [1] [2] [3]src/llm_orchestration_service_api.py)Infrastructure and Configuration
src/utils/redis_client.py,env.example) [1] [2]docker-compose.yml,docker-compose-ec2.yml) [1] [2] [3] [4]Documentation and Dependencies
docs/REDIS_SESSION_STORE.md)redis[hiredis]as an application dependency and updated lint configuration to allow dynamic field updates in the session store. (pyproject.toml) [1] [2]