fix(runtime): preserve context history for prompt caching #6177
All Vouch review confidence checks passed
Residual risk 0.17 = Change Risk (0.43) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.43 · 369 lines diff across 4 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.354
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #6177"
general
weight: 0.35
M4n5ter
Time and Inbox context used to be replaced at the end of each model request. Updating the clock therefore changed an existing request prefix, reducing cache reuse even when the conversation had only grown.
Persist named runtime context as internal events and append a new value only when it changes. Historical values remain unchanged, retries reuse the same snapshot, and replay preserves event order. Split the matter clock from its Inbox so observation-only revision changes do not resend the Inbox. Context removed by compaction is refreshed afterward; internal context remains hidden from the chat transcript.
Validation on current main:
Real-model tools were read-only synthetic fixtures outside the repository, not a production business-workflow test. An earlier broader Host test process did not exit naturally and is not counted as passing; the relevant targeted Host tests completed successfully.
Review follow-up:
prompt suggestions ask Kimi K3 for its lowest effort instead of its default thinking(missingthinking: {type: adaptive}); it passed in an earlier isolated run but failed in the full suite, so the full suite is not reported as passing. Missing executor/filesystem-worker build artifacts were corrected before this final run. Separately, assistant suites passed 83 memory-network and 24 initiative tests; Matters passed 79/80, with the queued-wake timeout passing on isolated rerun. These additional failures were not hidden or relaxed. No paid-model tests or production deployment were performed for this follow-up.Generative-tool attribution: OpenAI Codex made substantive implementation, test, and documentation contributions to this PR. The follow-up commit includes
Generated-by: OpenAI Codex; preserve this trailer in the final squash commit.