181 context window is added to user session #201
All Vouch review confidence checks passed
Residual risk 0.16 = Change Risk (0.41) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.41 · 202 lines diff across 2 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.318
Shallow Review Depth
shallow_review_depth
0.289
Ai Authored
ai_authored
0.050
Real PR Conversation Timeline
1 comments
"Review active on #201"
general
weight: 0.35
Hoog-V
This PR introduces basic session context. By default the last 10 messages (total of both user and LLM) are stored in the cache. This can be changed in the config.
This PR also moves all environment variable calls into the config.py in the same way as is done in database-builder-scepa.
Implementation of caching
For the caching Redis has been set up. The key used is the session id. The RedisStore manages how many messages are stored per key. A limit was set on the context in order to not overwhelm the LLM.
An AbstractStore was used similar to database-builder-libs in order to allow for easy implementation of a persistent storage solution for chat history later on.
Langfuse traces that show how it works
For a trace that shows the context is added: https://scepadeploy.mads-han.src.surf-hosted.nl/project/cmn0f1gik000lph07z9kjmflt/traces?peek=ffb91f6cde117d92a9e18f78a0fecb48×tamp=2026-04-24T20%3A20%3A09.568Z&observation=d8e40dfedcdaf559
A later trace after browser refresh shows that a new session does not get the old context: https://scepadeploy.mads-han.src.surf-hosted.nl/project/cmn0f1gik000lph07z9kjmflt/traces?peek=5fc3fcfc260e79784387bc738b0b3c44×tamp=2026-04-24T20%3A27%3A25.490Z&observation=c99d815642071941
Identified Issues
Even when the LLM is asked to repeat it's previous answer and has the context of it, it will still call the MCP server. This add unnecessary waiting time to the response of the LLM and might cost extra tokens. The cause of this is the
root_question_promptas it says to use the MCP tool, but it does not specify when it should be used.