This repository was archived by the owner on Oct 9, 2026. It is now read-only.
Repository navigation
Conversation
A data property stored as #id made a filter on it select the record with that id, without an error; Chroma rejects the other metadata keys that start with #, like #document, only when a record is written. The model builder now throws a NotSupportedException that names the property and its storage name.
There was a problem hiding this comment.
🟢 Approval recommended
The narrowly scoped validation has focused regression coverage and no identified blocking issues.
0 open findings
What changed in this PR
Rejects data-property storage names beginning with # during model construction, preventing conflicts with Chroma’s reserved metadata keys.
Changes:
- Adds validation with an exception naming the property and storage name.
- Tests reserved prefixes across dynamic, typed, and full-text properties while allowing embedded
#characters.
| File | Description |
|---|---|
| test/ChromaDB.VectorData.UnitTests/ChromaCollectionTests.cs | Adds rejection and acceptance regression tests. |
| src/ChromaDB.VectorData/ChromaModelBuilder.cs | Rejects reserved metadata-key prefixes. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Laurianti
marked this pull request as draft
October 8, 2026 18:55
Member
Author
|
Closing: the provider moved to CommunityToolkit.VectorData.Chroma, and this package gets no more code changes. The same fix will be proposed to CommunityToolkit/AI. |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
The provider rejects, when it builds the model, a data property whose storage name starts with
#: Chroma reserves those metadata keys, like#idand#documentof the Search API.#id, a filter on it selected the record with that id, without an error. A record with a value under a key that starts with#was rejected by Chroma only when it was written.NotSupportedExceptionthat names the property and its storage name. A#inside a storage name, liketag#1, is still accepted.Not merged: the provider moved to CommunityToolkit.VectorData.Chroma, and this package gets no more code changes. The same change will be proposed to CommunityToolkit/AI.
Tested: new unit tests for each reserved key of the Search API and another
#key, for a record type, for the full-text property and for a#inside a name; they fail without the change. Unit tests, conformance tests against Chroma 1.5.0, 1.5.9 and the latest release, and the NativeAOT application against Chroma 1.5.9; build on Windows, .NET Framework included.