Repository navigation
fix(embeddings): every embedding model resolves from the index's recorded space or the active model; unrecorded docs collections keep working and propose a stamp (#18143) - #18327
Merged
Conversation
Contributor
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 1 minute. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This was referenced Oct 11, 2026
Contributor
✅ SSOT Configuration Compliance: Passing🎉 No new hardcoded values of either class — Known backlog in |
This was referenced Oct 11, 2026
This was referenced Oct 11, 2026
neoneye
pushed a commit
to agent-memory-atlas-archive/mrveiss--AutoBot-AI
that referenced
this pull request
Oct 13, 2026
…ration (mrveiss#18143) Measured on this train tree (main 5efe902 + 6 constituents): - credential-field-name-only-callers 6394 (population 6544), kb-admin-read-bypass 2652 (2752), response-model-secret-scan 5137 (5212), no-created-by-admin-literal 3635 (3785), mid-window. - mrveiss#18327 embedding-model-literal-sites: scope recorded in reach_scope_claim and its ALLOWANCE_VERDICTS row added. reach_declarations + reach_scope_claim: 529 passed locally before push.
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.
Thinking Path
#18143 was reopened on its AC1, "one resolver for the generator and every cache key": several pipelines still hard-coded
nomic-embed-text. Swapping every literal toactive_embedding_model()would reintroduce the bug #18230 fixed: a pipeline with stored vectors would query in a different space after an active-model change. So each embedding-model literal was classified:knowledge/index_embedding_space.py, and the generator and cache key resolve from that table.active_embedding_model().What Changed
analytics_infrastructurevia aCollectionEmbeddingSpacemixin) resolve their model and cache key from the table (make_key(space.space_id, …)).nomic-embed-text/768, taken from its own build path.EmbeddingUnavailableError).nomic-embed-textbecomesnomic-embed-text/768, so old entries miss once.active_npu_worker_model()(new, inautobot_shared/embedding_model.py). The memory-graph config readsactive_embedding_model()at call time. The cognition seeder embeds with the active model, records the (model, dim) it creates, and refuses a collection recorded in a different space. The doc indexer's hard-coded fallback default is removed, so an empty model now fails loudly.services/knowledge/doc_searcher.py) uses the space the collection records. For a collection that records none (the liveautobot_docsrecords none, verified read-only), the owner chose on 2026-10-11:collection_space_stamp_action.py, registered with its proposer, so the bug(approvals-seam): the orphan-storage deletion gate has a detector and an executor but no proposer — the registered post-approval action is unreachable #17315 guard passes) runs on approval. It re-checks the dimension, refuses on a mismatch, merges the model and dim into the existing metadata, reads it back, and writes an approval comment and an audit entry.knowledge/backends/hnsw_params.py): a ChromaDBmodifydropshnsw:*frommetadatabut keeps it inconfiguration. So the helper readsconfiguration["hnsw"]first, with the metadata fallback.knowledge/index.pyuses it, and the in-memory backend mirrors real ChromaDB.repo_tests/embedding_model_literal_guard_18143_test.py): no bare embedding-model literal in production code outside the table, the SSOT defaults and a reasoned allowlist. Contrast fixtures, a reach floor, and stale entries fail.Behaviour changes
CrossLanguagePatternDetectorand_init_infrastructureno longer take anembedding_modelargument.Verification
PersistentClienton the pinned chromadb, the existing metadata keys survivedmodify_metadata;hnsw:spaceleftmetadatabut stayed inconfiguration.hnsw; queries still returned cosine distances.Not done, stated rather than implied
autobot_shared/content_digest.py, which comes from the kb: two independent semantic chunkers — the ingest pipeline uses neither the embedding-based one nor its metadata #14485/canonical(knowledge): two functions named content_hash return different values — full digest vs 16-char truncation #15722 branch.autobot_codecollection can hold 384-d and 768-d vectors side by side. It is left unrecorded, so any vector read refuses.Closes #18143
Model Used
Claude Opus 5.5 (master session: classification decision, host check, PR). Implementation by a Claude Sonnet subagent.
🤖 Generated with Claude Code