Repository navigation
feat: add principal-scoped CCR MCP lifecycle - #7282
diegosouzapw merged 6 commits into
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
There was a problem hiding this comment.
Code Review
This pull request introduces six new canonical Caller-isolated Content Retrieval (CCR) lifecycle tools to the MCP server, increasing the total unique tool count to 104. The underlying CCR engine has been refactored to support LRU eviction, TTLs, and strict memory limits (per-block, per-principal, and global). The review feedback focuses on critical performance optimizations on hot paths, specifically recommending a lazy expiration strategy via a new getActiveEntry helper to avoid O(N) full-map scans on every read, maintaining a principalBytesMap to reduce principal byte calculations to O(1), optimizing array copying in listCcrBlocks, and removing redundant purges.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
|
Thanks for this — the CCR lifecycle work is thorough and well-tested. Ran the full targeted suite in an isolated worktree: all 29 Node tests + the 4 Vitest catalog tests pass, ESLint is clean on every touched file, and the principal-isolation / audit-no-content guarantees check out exactly as described (cross-tenant retrieve/inspect/list all correctly return empty/not-found for a different caller, and the store audit input never carries raw content). Two small non-blocking follow-ups we'll likely fold in before/at merge:
One perf nit for a future PR (not this one): Nothing here blocks merge — great work. |
Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com>
5f04d5b
into
cheaper-inference:release/v3.8.49
|
Thanks @JxnLexn! Merged into release/v3.8.49 after combined merge-train validation (static gates + tests + vitest green on the merged tree). Where quality gates flagged growth we decomposed/extracted inside your branch keeping you as author — including renumbering the reasoning-routing migration slot and the ProviderDetailPageClient rebaseline annotation. |
* feat: add principal-scoped CCR MCP lifecycle * refactor: extract CCR MCP schemas * refactor: reduce CCR store complexity * fix: preserve CCR retrieval feedback * fix: keep CCR expiry/accounting scoped to accessed entries --------- Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com>
* feat: add principal-scoped CCR MCP lifecycle * refactor: extract CCR MCP schemas * refactor: reduce CCR store complexity * fix: preserve CCR retrieval feedback * fix: keep CCR expiry/accounting scoped to accessed entries --------- Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com>
Summary
Motivation
CCR previously exposed retrieval only and used an entry-count-only in-memory map. MCP clients could not manage the full content lifecycle, inspect stored metadata, or understand capacity and expiration behavior. The retrieve tool was also absent from the canonical schema and scope maps, which made discovery and authorization metadata incomplete.
This change turns CCR into a bounded, caller-isolated MCP context store without adding persistence or local client hooks.
Behavior and limits
Validation
npm run lintnpm run typecheck:coregit diff --checknpm run check:docs-all(passes hard gates; existing soft documentation drift warnings remain outside this change)