Skip to content

Fix NativeAOT vector mapping and metadata serialization - #634

Merged
HavenDV merged 3 commits into
tryAGI:mainfrom
mikemikimike:codex/issue-631-nativeaot-mapping
Oct 17, 2026
Merged

HavenDV merged 3 commits into
tryAGI:mainfrom
mikemikimike:codex/issue-631-nativeaot-mapping

Conversation

@mikemikimike

Copy link
Copy Markdown
Contributor

Fixes #631

Issue: #631

Summary

  • Add NativeAOT-friendly dynamic vector collection operations for document loading, insertion, retrieval by ID, and similarity search.
  • Use source-generated JSON metadata for JSON-compatible values while retaining the reflection fallback on JIT. Unsupported POCO metadata fails clearly when reflection is disabled; the existing typed API remains available for JIT and is marked as requiring dynamic code on supported targets.
  • Update the Chroma sample with a smoke path that checks upsert, read, metadata round-trip, and similarity search.
  • Keep writes sequential per record, matching the existing typed API; a provider failure during a batch can leave earlier records written. Concurrent writers were not stress-tested.

Validation

  • .NET 10.0.400 Core multi-target build and Chroma sample build passed.
  • Focused vector metadata tests passed (2/2).
  • Windows NativeAOT publish passed. The Chroma 1.5.9 round-trip smoke passed in both NativeAOT and JIT modes.
  • The full solution test run reports failures in the existing TextLoaderTest and Excel tests. Both failures were reproduced on unmodified upstream commit 4d80626 using the same .NET 10.0.400 container.

@CLAassistant

CLAassistant commented Oct 17, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@HavenDV HavenDV left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Reviewed the complete vector mapping, metadata serialization, sample, and regression-test changes. The contribution preserves the typed API and its POCO serialization behavior while adding an explicit dynamic-record path for NativeAOT.

Validated the combined changes locally on macOS arm64: full solution Release build (zero errors; existing warnings remain), 42 core tests, 8 splitter abstraction tests, and 2 C# splitter tests passed. Published a real NativeAOT Chroma sample with reflection disabled and executed its synthetic-embedding upsert/read/metadata/search smoke against loopback-only Chroma 1.5.9; it passed. No provider endpoint or paid API was invoked.

The reviewed source files are unchanged by the subsequent merges from main. Current-main SQLite follow-up 68e3613 also covers LocalRAG. Awaiting the refreshed required CI check before merging. Existing unrelated LangChain reflection/AOT warnings and advisories are not claims of full-library NativeAOT compatibility.

@HavenDV
HavenDV enabled auto-merge (squash) October 17, 2026 14:29
@HavenDV
HavenDV merged commit b208d07 into tryAGI:main Oct 17, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make vector mapping and metadata serialization compatible with NativeAOT

3 participants