Reproduce edit-local KV cache repair for mutable agent memory
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 4.5k
- Forks
- 603
- Avg merge
- 23h 32m
- Merged PRs (30d)
- 59
Description
Finding
Contiguity, Not Importance: Budgeted Repair of Stale KV Caches After Document Edits, arXiv:2609.17983, submitted 2026-09-16, studies stale KV state after edits to retrieved knowledge, working memory, or user state. The originating team reports that a contiguous edit-local recomputation window recovers at least 0.94 of the post-edit answer margin at its primary budget and is 13 to 21 times faster than full re-prefill. Scattered selectors based on attention, KV deviation, or structure can underperform because recomputed positions still inherit stale surrounding state. The advantage depends on adjacency and largely disappears when answer-bearing text moves downstream.
Evidence class: originating team measured result across three model families. No independent RuV reproduction yet.
Opportunity Score: 4.33 / 5.
RuV implication
This is directly relevant to RuVector retrieval caches, RuVector WASM browser runtimes, Core Memory edits and forget operations, MetaHarness long-running sessions, RuFlo agent loops, MidStream state invalidation, and Cognitum persistent agents.
The key primitive is not repair everything near an edit. It is a conservative cache invalidation and bounded recomputation contract with an explicit fallback to full re-prefill when locality assumptions fail.
Core Memory ADR 0021 already treats runtime state after forgotten information as potentially tainted and uses selective replay versus full reset. This issue should align with that governance model rather than create a second forgetting authority.
Frozen experiment
Compare under identical model, tokenizer, prompt, and edit corpus:
- no repair after edit
- full re-prefill
- edited span only
- contiguous edit-local repair at fixed token budgets
- attention-ranked scattered repair
- KV-deviation-ranked scattered repair
- a simple downstream suffix repair control
Use both direct factual edits and derived reasoning edits. Include cases where the answer-bearing text remains adjacent and cases where it is moved downstream.
Metrics
Report exact model and runtime versions, KV format, prompt length, edit location, edit size, repair token budget, seeds, sample size, answer margin versus full re-prefill, exact-match or task utility, p50/p95 repair latency, prefill latency, speedup, recomputed tokens, GPU and system memory, failures, variance, cost, energy where measurable, and reproduction steps.
For agentic workloads also report downstream action divergence, stale-memory leakage, and whether repaired state remains stable across the next N turns.
Falsification
- If full re-prefill cost is already small relative to generation or tool latency on the target runtime, reject repair complexity.
- If adjacency cannot be determined safely after structured edits, fail closed to full re-prefill.
- If edit-local repair recovers answer margin but changes downstream action behavior versus full re-prefill, treat it as a failure for agents.
- Forget and revocation operations require stronger semantics than ordinary document edits. Do not use partial repair to claim deletion or unlearning unless it matches the full reset leakage baseline.
- Browser and WASM runtimes may have different KV layouts and copying costs. Reproduce separately rather than extrapolating GPU results.
Acceptance
Advance an implementation only if edit-local repair matches at least 98 percent of full re-prefill task utility on the preregistered adjacent-edit arm, shows at least 5 times lower repair latency or 70 percent fewer recomputed tokens, produces zero additional stale-memory leakage on agent probes, and reliably detects the nonlocal cases that require full re-prefill. Negative results remain durable evidence.
No autonomous merge, deployment, model mutation, credential escalation, or weakening of forget semantics.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names no implementation files or tests; first locate the KV-cache, Core Memory, and state-invalidation entry points, then read Core Memory ADR 0021. Reproduce the frozen experiment separately for GPU and WASM runtimes, and treat the stated acceptance thresholds, nonlocal fallback behavior, and forget-semantics constraints as the definition of done.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust, wasm
- Domain
- ai, performance, testing-qa
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Needs clarification
- Newbie friendliness
- 28/100