Add AI artifact cache layer and AI.* RESP commands (embeddings/prompts/RAG/dedup/invalidation)#5
Merged
AutoCookies merged 2 commits intomainfrom Feb 11, 2026
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
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.
Motivation
redis-clican store, fetch, invalidate, and introspect AI artifacts.Description
AiArtifactCachelayer (include/pomai_cache/ai_cache.hpp,src/server/ai_cache.cpp) that stores typedArtifactMeta+ payloads with ablob:<content_hash>indirection, best-effort refcounts, per-epoch/model/prefix bounded indexes, and introspection (stats,top_hot,top_costly,explain).src/server/server_main.cpp) with AI commands:AI.PUT,AI.GET,AI.MGET,AI.EMB.PUT,AI.EMB.GET,AI.INVALIDATE EPOCH|MODEL|PREFIX,AI.STATS,AI.TOP HOT|COSTLY, andAI.EXPLAIN, and instantiatedAiArtifactCachein the server loop.emb/prm/rag/rrk/rsp) and owner TTL defaults + type-basedmiss_costguidance; updated engine owner miss-cost defaults insrc/engine/engine.cppto bias policy for AI artifact owners.bench/ai_artifact_bench.cppand wired up CMake (CMakeLists.txt) plus tests (tests/test_ai_cache.cpp, extendedtests/test_integration.cpp) and docs (docs/AI_CACHE.md,docs/AI_COMMANDS.md,docs/INVALIDATION.md,docs/BLOB_DEDUP.md), and updatedREADME.mdwith quickstart examples and recommended AI config.Testing
cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug && cmake --build build -j) and all test targets compiled successfully. ✅ctest --test-dir build --output-on-failure), and all tests including the new AI unit and integration tests passed. ✅pomai_cache_ai_bench) which produced a JSON summary (ops/s, p50/p95/p99/p999, hit_rate) for the embedding workload; the bench target compiles and runs but longer runs may require tuning in constrained CI environments (a longer timeout was observed during an extended run).Codex Task