Repository navigation
test: map each translator operand from its declared type, and sweep for it, on 10.x (port of #295, #433) - #435
Merged
Conversation
…erload does not declare (#295) The translators recognized an overload by its name and argument count, and mapped an operand from what it was not: a RangeSet operand that was neither the multirange nor the element became a range, a value set call's second operand a set, a factory's bounds the element, an aggregate's source ranges. Every answer was right for the overloads that exist, but one added later with another operand type would have been translated as one of them, without an error: RangeSet.Contains(StringSet) became @> over a value set mapped as a range. TranslatorDispatchSweepTests (conventions, no database) hands every public query member over every discovered type to the translator providers of a real context, one operand per declared parameter type, and requires each operand mapped as its declared type and the member's own result type. The translators now map an operand from its declared parameter type and throw MissingArm, naming the overload, for any other; MissingArmTests holds each arm with an overload that does not exist. QueryMembers.Close moves from the translation-support probe so both share it. (cherry picked from commit aae116e) Ported to release/10.x for #433. Found-By: RV Defect-Class: SQL Co-Authored-By: Claude Opus 5.5 <[email protected]>
This was referenced Oct 25, 2026
Closed
Merged
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Closes #433
Port of #295 (PR #432, merged into
mainas 9caa202) torelease/10.x, for 10.3.0 (#408). It goes ahead of the 10.x picks of #405, #406 and #191. Fixed only on this branch, so #433 is closed by hand after the merge. #326 (the port of #320) is stacked on this PR.Problem
On this line the EF translators recognized an overload by its name and argument count, and some mapped an operand from what it wasn't:
RangeSetcalls: anything that wasn't the multirange or the element became a range.That's right for every overload that exists. An overload added later with another operand type would have been translated as one of them, without an error, and nothing on this line would have noticed.
Change
db609eb: cherry-pick of aae116e (-x):MissingArmand the four translator changes.TranslatorDispatchSweepTests,MissingArmTests, the oracle entry and the seedrangeset-overload-without-translator-arm.patch.docs/oracles.mdparagraph and theAGENTS.mdrule.QueryMembers.Close, which the translation-support probe from 10.x: translation-support inventory, every public query member classified and probed (port of #384) #430 now calls.AGENTS.md: 10.x's version mentions the NuGet release notes andmain's doesn't. I kept 10.x's line and added the translator-dispatch phrase.No answer changes for any existing overload, and no public API change, so there's no changelog row.
Tests
Run on
release/10.xwith SDK 10.0.402:TranslatorDispatchSweepTestspasses, andMissingArmTests7/7.release/10.x: all 7MissingArmTestsfail.RangeSetContains.Equivalenthands any other one-argumentContainsto the value overload (port of #320) #326 branch (which holds both commits), SDK 10.0.402: core 1,399, NodaTime 239, conventions 420, EF translation 323, NodaTime EF translation 91, ASP.NET Core 92, and on the EF floor both integration projects on PostgreSQL 16 and 18 (296 and 4 each), all passing. The newest-patch leg (EF Core 10.0.13, Npgsql EF 10.0.3) could not be run locally: restore fails intermittently on this machine with MSB4181 ("RestoreTask returned false but did not log an error"), and the test hosts kept the floor (deps.json checked), so I did not count those runs. CI ran it: both "EF Core 10.0.13" integration legs pass on this PR, after the step that checks each EF test host resolved 10.0.13.🤖 Generated with Claude Code