Repository navigation
Build four update tests' values with ordered maps - #4553
Open
evanchooly wants to merge 1 commit into
Open
evanchooly wants to merge 1 commit into
evanchooly wants to merge 1 commit into
Conversation
TestSet, TestSlice and TestSort built update values with Map.of, whose key order is unspecified, and skipped their action checks for it. They now use Documents in the documented field order and convert to the case runner. A converted ledger entry may record a reviewed BodyEdit, which the binding projection applies only from the recorded body.
This branch has not been deployed
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.
Stacked on #4552.
Problem
Four update tests built their values with
Map.of, whose iteration order is unspecified (it changes between JVM runs):TestSet#testSetTopLevelFields;TestSlice#testUseSliceWithOtherPushModifiers;TestSort#testSortArrayOfDocumentsByAFieldInTheDocuments;TestSort#testUseSortWithOtherPushModifiers.Each test skipped its action check because of it ("the Map order varies"). Under the case runner's strict behavior check, the stored subdocuments came out in an arbitrary order. For example,
detailswas stored as{make, model}where the page has{model, make}. These four stayed legacy-only in #4550.Changes
Documents in the documented field order.skipActionCheck(true)and its comment are removed. The legacy path passes with the action check back on, under both mappers.BodyEdit: the frozen digest it starts from and the reason.FixtureMigration.removeapplies the edit only when the catalog records that starting digest, so an unrecorded body change still fails the drift test. A test covers an edit that doesn't start from the recorded body.skipActionCheck).Review note
The independent local reviewer hit its weekly limit before reviewing this change, and Codex and Copilot are out of quota. I reviewed it myself. The independent review will be requested again on this PR when the limit resets on Nov 26.