Repository navigation
test: the contract's and the store's refusals are each held by a test that fails without them - #56
Merged
Conversation
… that fails without them A contributor without a placement and an ImpactOf that returns null had no test. The ordering test could not fail: EF Core returns an entity type's annotations sorted, so it now also reads through an entity type that returns them reversed. A property stored twice was refused only because what was read did not write back the same, with the message for a Read that changed the declaration, and not at all when both values were equal. It is now refused before anything is read, for what it is. Closes #52 Co-Authored-By: Claude Fable 5.2 <[email protected]>
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 #52
Problem
The analysis of #46 removed each guard in a scratch copy. Three refusals had no test that failed, and one test could not fail:
SchemaContributorRegistry),ImpactOfreturning null (the base class),The_read_model_is_ordered_by_key_whatever_the_order_of_declarationpassed without theOrderBy, because EF Core returns an entity type's annotations sorted by name.Change
Tests, and one change under
src/:"nullsDistinct":false,"nullsDistinct":truewas refused only because what was read did not write back the same, with the message that blames the contributor'sRead. And"nullsDistinct":true,"nullsDistinct":truewas not refused at all.DeclarationCodec.Readnow checks the whole value, nested objects and lists included, before anything is read, and names the object and the property ('K.keys[1]' has the property 'column' twice).OrderByand reads a second time through an entity type that returns its annotations reversed (aDispatchProxyover the real one). The order is the store's promise; that EF Core's own entity types happen to sort is not.CLAUDE.mdnames the new refusal beside the others.Tests
Kernel tests without a server, on SDK 11.0.100 in the checkout: 279 before, 287 after. The PostgreSQL integration tests did not run locally; CI runs them.
New:
A_contributor_without_a_placement_is_refused,An_impact_that_is_null_is_refused,A_property_that_is_stored_twice_is_refused(5 rows: different values, equal values, the version, inside a list, inside a nested object) and its allowed twinThe_value_the_repetitions_are_made_from_is_read.Each guard undone in a scratch copy:
Placement is nullrefusalA_contributor_without_a_placement_is_refusedImpactOf returned nullrefusalAn_impact_that_is_null_is_refusedA_property_that_is_stored_twice_is_refusedOrderByinStoredThe_read_model_is_ordered_by_key_whatever_the_order_of_declaration🤖 Generated with Claude Code