Skip to content

Add test coverage for non-Tensor embedding field error handling#35729

Open
Copilot wants to merge 3 commits intomasterfrom
copilot/sub-pr-35727-again
Open

Add test coverage for non-Tensor embedding field error handling#35729
Copilot wants to merge 3 commits intomasterfrom
copilot/sub-pr-35727-again

Conversation

Copy link
Contributor

Copilot AI commented Jan 29, 2026

Addresses review feedback requesting test coverage for when an embedding field exists but contains a non-Tensor value (lines 109-112 in RelatedDocumentsByNearestNeighborSearcher).

Changes

  • Added testNonTensorEmbeddingFieldReturnsError() test case that:
    • Verifies error is returned when embedding field contains a string instead of Tensor
    • Asserts error message includes both "Could not find document" and "has no embedding"

The test validates that fetchEmbedding() correctly returns null for non-Tensor fields, triggering the appropriate error message path.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 2 commits January 29, 2026 14:33
Co-authored-by: andreer <264780+andreer@users.noreply.github.com>
Co-authored-by: andreer <264780+andreer@users.noreply.github.com>
Copilot AI changed the title [WIP] Address feedback from review on related docs query Add test coverage for non-Tensor embedding field error handling Jan 29, 2026
Copilot AI requested a review from andreer January 29, 2026 14:37
Base automatically changed from andreer/nn-by-id-searcher to master January 29, 2026 22:21
@andreer andreer marked this pull request as ready for review January 30, 2026 11:41
@andreer andreer requested a review from bjorncs January 30, 2026 11:42
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.

3 participants