Skip to content

RDBC-1068 Hotfix: C# parity fixes for AI config & spatial RQL#299

Merged
poissoncorp merged 3 commits into
ravendb:v7.2from
poissoncorp:RDBC-1068-ai-config-fixes
Jun 24, 2026
Merged

RDBC-1068 Hotfix: C# parity fixes for AI config & spatial RQL#299
poissoncorp merged 3 commits into
ravendb:v7.2from
poissoncorp:RDBC-1068-ai-config-fixes

Conversation

@poissoncorp

@poissoncorp poissoncorp commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Issue

https://issues.hibernatingrhinos.com/issue/RDBC-1068

What changed

Small client/server parity hotfixes found auditing the 7.2.3 sync: ChunkingOptions overlap-method set & deserialization defaults, embeddings-config validation, and WKT order_by_distance RQL. Regression tests included.

Checklist

  • Tests added or existing tests cover the change
  • Breaking change (explain above if checked)

Overlap tokens are only consumed by the two paragraph chunking methods
(PlainTextSplitParagraphs, MarkDownSplitParagraphs) on the server. The
Python set wrongly allowed PlainTextSplit/PlainTextSplitLines (silently
ignored by the server) and omitted MarkDownSplitParagraphs (spurious
client-side rejection of a valid config). Also makes the validation
message derive from the set so it can't drift again.
- ChunkingOptions.from_json: default MaxTokensPerChunk/OverlapTokens to
  512/0 (matching C#'s non-nullable int initializers) instead of None,
  which crashed validate() with a TypeError on missing keys.
- EmbeddingsGenerationConfiguration.validate: drop the spurious
  'cannot specify both paths and transformation' rejection (C# allows
  both), and add the per-path ChunkingOptions validation loop C# performs.
- OrderByToken.create_distance_ascending_wkt: emit
  spatial.distance(field, spatial.wkt(...)) instead of the malformed
  spatial.distance(field), spatial.wkt(...) (stray paren).

Each fix has a regression test that fails on the pre-fix code.
_order_by_distance_wkt / _order_by_distance_descending_wkt passed the raw
WKT string straight in as the parameter *name*, producing
spatial.wkt($POINT(...)) which the server rejects at parse time. Register
it via add_query_parameter first, matching C# (AbstractDocumentQuery.Spatial).
This is the calling-side half of the WKT distance bug (the token-side stray
paren was fixed in the previous commit).

Adds DB-facing regression tests (embedded server):
- spatial: order_by_distance_wkt ascending + descending (fail pre-fix:
  server 500 parse error).
- embeddings: a config with BOTH paths and a transformation is accepted by
  the server, confirming the dropped client-side mutual-exclusivity rule.
@poissoncorp poissoncorp changed the title RDBC-1068 Fix C#-contradiction bugs found in 7.2.3 sync audit RDBC-1068 Hotfix: C# parity fixes for AI config & spatial RQL Jun 23, 2026
@poissoncorp poissoncorp merged commit 83165fb into ravendb:v7.2 Jun 24, 2026
5 checks 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.

1 participant