Repository navigation
Convert the legacy cases whose pages print results the server does not return - #4579
Open
evanchooly wants to merge 1 commit into
Open
evanchooly wants to merge 1 commit into
evanchooly wants to merge 1 commit into
Conversation
…t return A ledger entry can carry a reviewed page error that skips only the published check, keeping serialization and behavior strict. Nine cases convert that way, each with the evidence: printed field orders the server does not return, a Long printed as a plain number, and facets printed out of the pipeline's order. The $addToSet and $setUnion cases declare their set arrays unordered instead, so all their checks stay strict. Five legacy cases remain.
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.
Toward retiring the legacy loader (step 7). Stacked on #4578.
Problem
After #4578, 16 legacy cases remained, all with a documented source. 11 of them failed only the published check: Morphia's serialization matched the page, and its behavior matched the documented command run through the driver, but the page prints results the server doesn't return. For example,
$cos's page prints{_id, angle_a, side_a, hypotenuse}, but$addFieldsappendsside_alast, so the server returns{_id, angle_a, hypotenuse, side_a}.Change
publishedSkip, a reviewed page error with its evidence. Its scenario then getsskipped.published, and the runner skips only the published comparison; serialization and behavior stay strict.FixtureMigration.scenario(migrated)is now the one way to write a ledger case's scenario, so the migration, rescenario, candidate and verification paths all include the skip.$cos×2 and$sin×2: the page prints the field$addFieldsadds before an existing one;$getField×2: the page prints the fields in an order its own insert doesn't store;$isoWeekYear: a Long printed as2015, where mongosh printsLong('2015');$bucketAuto×2: facets printed asarea, price, year, where$facetreturns the pipeline's order,price, year, area.$addToSetuseInGroupStage(/itemsSold) and$setUnion's accumulator case (/allValues). With a published skip alone,$addToSet's behavior check flaked under reflection, because the server builds the set in no defined order between runs. Declaring the arrays keeps every check strict, and both passed four times in a row.$setUniondeclaration inform-review.jsonand the$addToSetreference inlegacy-references.jsoncarry the reviewed arrays.Result
384 cases are on the runner and 5 legacy directories remain, the last users of the legacy loader:
tan/tangentOfValueInRadians,densify/densifyTimeSeriesDataandgraphLookup/acrossMultipleCollections: the page's printed results don't parse (typos such as a missing comma);rand/selectRandomItemsFromACollection: the page projects{_id: 0, name: 1, registered: 1}. Morphia writes inclusions before exclusions, and a pinned reference can't declarePROJECT_ID_FIRST;type/queryingByMultipleDataTypes: alternative commands, which conversion doesn't support.Decisions for review
fixture-migration.json. These, together with Follow up: report two mongodb/docs operator page errors #4563's two, are page errors you may want to report upstream; I haven't filed anything._idfirst in projections, for$rand. I can delete the three with unparseable pages as unbacked, as with Delete the legacy tests that no documented source backs #4578. And I can teach conversion alternative commands.Verification
TestCos,TestSin,TestGetField,TestIsoWeekYear,TestAddToSet,TestSetUnionandTestBucketAutopass under Critter, then reflection.Self-reviewed only: the independent reviewers are out of quota until 2026-11-26.