Repository navigation
fix(core): reuse semantic query vectors and bound inference batches - #192
Merged
Merged
Conversation
Release highlights: - reduce repeated semantic retrieval work while preserving results and citations - keep every semantic model call within the configured batch limit Release details: - **Core:** cache query vectors by project and exact model identity within bounded memory - **Core:** preserve input order and cancellation across semantic batches - **Toolchain:** update Handlebars and HTTP cache semantics; replace Mammoth CLI argparse to remove sprintf-js from the workspace dependency graph - **Documentation:** explain model cache scope and batch guarantees Verification: - pass pnpm validate with 481 Core tests and 24 landing tests - compare 288 repeated and 288 unique embeddings plus 144 searches per variant across three alternating runs with identical vector and search fingerprints - verify cache eviction, cancellation, model lifecycle, and fresh evidence after ingestion
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.
Repeated semantic searches currently run model inference for every request, and the embedding adapter relies on its caller to keep input arrays within the configured batch limit. Cache single-query vectors in memory by project and exact model identity, and enforce the existing batch limit inside the adapter. Search results still come from the current index generation, with unchanged ranking and citation behavior.
The cache is bounded by both entries and vector values, returns independent arrays, and retires with its model. Failed or cancelled inference is not cached. Semantic batches preserve input order and check cancellation between calls.
Refresh the workspace's affected transitive dependencies, remove the repaired HTTP-cache audit exception, and replace Mammoth's CLI-only argparse chain with its compatible version 2 to remove sprintf-js from the workspace graph.
Validation:
pnpm validate: 481 Core tests, 24 landing tests, coverage, builds, public API, CLI/MCP, packaging, licenses and release smoke checks passed.