Skip to content
This repository was archived by the owner on Oct 9, 2026. It is now read-only.

Reject the storage names that start with #, which Chroma reserves - #21

Closed
Laurianti wants to merge 1 commit into
mainfrom
reserved-storage-names
Closed

Laurianti wants to merge 1 commit into
mainfrom
reserved-storage-names

Conversation

@Laurianti

@Laurianti Laurianti commented Oct 8, 2026 •

Copy link
Copy Markdown
Member

The provider rejects, when it builds the model, a data property whose storage name starts with #: Chroma reserves those metadata keys, like #id and #document of the Search API.

  • Before: with a data property stored as #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.
  • Now: creating the collection throws a NotSupportedException that names the property and its storage name. A # inside a storage name, like tag#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.

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.
Copilot AI balanced review requested due to automatic review settings October 8, 2026 16:34
@Laurianti
Laurianti requested a review from a team as a code owner October 8, 2026 16:34

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 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
Laurianti marked this pull request as draft October 8, 2026 18:55
@Laurianti

Laurianti commented Oct 9, 2026 •

Copy link
Copy Markdown
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.

@Laurianti Laurianti closed this Oct 9, 2026
@Laurianti
Laurianti deleted the reserved-storage-names branch October 9, 2026 20:29
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants