feat(memory): native short-term KV + dual-layer resolve_context - #7
Merged
Merged
Conversation
Port session silo (silo_size LRU), peek/set/flush/resolve, and solution engine tools from ppm/mcp into Context+ TypeScript. Add mergeRankHits for unified ranking in resolve_context (KV first, then graph). Docs cite PPM three-way speed numbers only; complementary pmll-memory-mcp remains optional for Q-promise / Python SQLite P0.
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ❌ Deployment failed View logs |
contextplus | dbc1ba5 | Sep 01 2026, 04:38 AM |
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (9)
📝 WalkthroughWalkthroughThe change adds session-scoped short-term KV storage, ranked long-term graph fallback, KV-to-graph promotion, memory status reporting, MCP endpoints, tests, and updated documentation. ChangesNative memory integration
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant Client
participant MCP
participant memory_tools
participant ShortTermKVStore
participant solution_engine
participant MemoryGraph
Client->>MCP: resolve_context(sessionId, key)
MCP->>memory_tools: toolResolveContext(...)
memory_tools->>ShortTermKVStore: peekContext(key)
alt short-term hit
ShortTermKVStore-->>memory_tools: resolved value
else miss
memory_tools->>solution_engine: resolveContext(...)
solution_engine->>MemoryGraph: search direct and neighbor hits
MemoryGraph-->>solution_engine: ranked graph results
solution_engine-->>memory_tools: long-term result or miss
end
memory_tools-->>MCP: JSON response
MCP-->>Client: context result
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
7 tasks
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.
Native short-term KV + solution engine (ppm/mcp TS port). Tools: init/peek/set/resolve/flush/resolve_context/promote_to_long_term/memory_status. mergeRankHits = unified ranking for dual-layer resolve (NOT a searchGraph bug fix; pmll#14 was harness-stub). PPM three-way only: baseline ~302ms, peek ~26ms, combined ~36ms, peek hits ~0ms. Retrieval = labeled P@k/R@k/MRR not agent accuracy; no 99% claims. No FUNDING/tools hub. Tests: 254 pass.
Upstream pitch for @forloopcodes
Title: Native short-term KV + dual-layer resolve inside Context+ (supersedes docs-only forloopcodes#46)
Summary by CodeRabbit