feat(#384): a shared research cache whose failure modes are disclosure, not staleness #389
All Vouch review confidence checks passed
Residual risk 0.30 = Change Risk (0.40) × (1 − Review Confidence (0.25)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.40 · 301 lines diff across 3 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 30% · 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
Shallow Review Depth
shallow_review_depth
0.344
Diff Size
diff_size
0.342
Real PR Conversation Timeline
1 comments
"Review active on #389"
general
weight: 0.35
chatgpt-codex-connector[bot]
feat(#384): a shared research cache whose failure modes are disclosure, not staleness
Two clients asking the same question within 24 hours should cost one retrieval and one generation. The
client contract already carried
cached,refreshandanswered_at; nothing implemented the cachebehind them, so this adds it as a library with an explicit store protocol — Mongo/Redis adapters and the
request handler stay with the service that owns retrieval.
What it is careful about, because each item is a way a cache corrupts a research answer:
principal. Serving across scopes is a disclosure, not a staleness bug.
by one token and by everything that matters; no stemming, no synonym folding.
insufficient_evidenceentry lives 6 hinstead of 24 h and records the
pending_task_idsit waits on; the finishing task invalidates it, so auser is not told "unknown" after the evidence arrived.
jobs, different questions never block each other, and a dead worker's reservation is reclaimable.
the normal retrieval path rather than failing the chat.
Cached
rag.retrieveresults and generatedresearch.answerresults are kept separately, so retrievedevidence is never presented as a generated answer or the reverse.
Evidence
18 offline tests (
tests/test_issue_384_research_cache.py) and 18 existing transport/assistant tests stillpass;
scripts/check_public_tree.pypasses; ruff clean.Also: the Research Assistant skill now states the answer-side rules — label a cached answer with its
original timestamp and revisions, honour refresh, and never repeat a negative answer whose named task has
succeeded — and
docs/AI26_RESEARCH_CACHE.mdrecords the contract and what is deliberately not built here.Not in this PR: the chat page and its authorization, the service that stores these entries, and the
dispatcher that carries fire-and-forget
collection.discoverrequests (shared transport, Analysis-owned).