diff --git a/audits/README.md b/audits/README.md index 5c1ede2c6e9..3b5981ac02b 100644 --- a/audits/README.md +++ b/audits/README.md @@ -164,11 +164,11 @@ These remain because coverage has not fully moved off them yet. Each one goes wh its users does. - **Core's legacy fixture loader** (`data.json`, `action.json`, `expected.json` through - `TemplatedTestBase`). It runs 210 legacy fixture directories; 346 cases have moved to the runner. - Of the 210: + `TemplatedTestBase`). It runs 207 legacy fixture directories; 349 cases have moved to the runner. + Of the 207: - 98 are still locked: 96 have no documented source that reproduces them, and are listed under `unresolved` in `form-review.json`; - - 28 are tracked as legacy-only in `cutover.json`; + - 25 are tracked as legacy-only in `cutover.json`; - 81 never-locked fixtures have no pinned reference. - **The legacy RST extractor** (`rst/`, `model/CodeBlock`). Cutover and the example inventory read pages through it. It goes once the structured parser (`scenarios/`) owns example diff --git a/audits/catalog/cutover.json b/audits/catalog/cutover.json index a7fa4a0c2b1..62f83136070 100644 --- a/audits/catalog/cutover.json +++ b/audits/catalog/cutover.json @@ -4,10 +4,6 @@ "check" : "PUBLISHED", "detail" : "results differ from the printed results at /1: no result matches this constraint", "fixture" : "aggregation/expressions/addToSet/useInGroupStage" - }, { - "check" : "SERIALIZATION", - "detail" : "/0/$group/gamescores/$bottomN: key order ['output', 'n', 'sortBy'], Morphia emits ['output', 'sortBy', 'n']", - "fixture" : "aggregation/expressions/bottomN/computingNBasedOnTheGroupKeyForGroup" }, { "check" : "PUBLISHED", "detail" : "results differ from the printed results at /0: key order differs", @@ -44,10 +40,6 @@ "check" : "SOURCE", "detail" : "the shell normalizer cannot read the documented results (expected syntax)", "fixture" : "aggregation/expressions/tan/tangentOfValueInRadians" - }, { - "check" : "SERIALIZATION", - "detail" : "/0/$group/gamescores/$topN: key order ['output', 'n', 'sortBy'], Morphia emits ['output', 'sortBy', 'n']", - "fixture" : "aggregation/expressions/topN/computingNBasedOnTheGroupKeyForGroup" }, { "check" : "PUBLISHED", "detail" : "results differ from the printed results at /0: no result matches this constraint", @@ -60,10 +52,6 @@ "check" : "SOURCE", "detail" : "the shell normalizer cannot read the documented results (expected syntax)", "fixture" : "aggregation/stages/densify/densifyTimeSeriesData" - }, { - "check" : "SERIALIZATION", - "detail" : "/0/$fill: key order ['sortBy', 'partitionBy', 'output'], Morphia emits ['partitionBy', 'sortBy', 'output']", - "fixture" : "aggregation/stages/fill/fillDataForDistinctPartitions" }, { "check" : "SOURCE", "detail" : "the shell normalizer cannot read the documented results (expected syntax)", diff --git a/audits/catalog/fixture-migration.json b/audits/catalog/fixture-migration.json index b071226c404..1481bdc7ed1 100644 --- a/audits/catalog/fixture-migration.json +++ b/audits/catalog/fixture-migration.json @@ -1661,6 +1661,68 @@ "scenario" : "core/src/test/resources/dev/morphia/test/aggregation/expressions/bottom/findingTheBottomScoreAcrossMultipleGames/scenario.json", "scenarioSha256" : "cca76fae04096bf4a4fcaa7a6802b8545b0abe970c3676fbf0f6aeb7db65c4cb", "test" : "dev.morphia.test.aggregation.expressions.TestBottom#testFindingTheBottomScoreAcrossMultipleGames" + }, { + "bodyEdit" : null, + "files" : { + "action.json" : "bf22217d83fd67b9c7e83b83fb378067f645980fa67f28ae7e1583502def9c24", + "data.json" : "6831b8684b7cb54ed19676649116bb3eb6152f1e077ee8aac64840a8ef132fae", + "expected.json" : "353b9ef5d5d94b8d4686820206be94359e42facbb298bf05e5518455368089eb", + "lock" : "b9e436f27be163d32c9116ed94ab0911f93b85d9845118a787be5a408fa380bc", + "name" : "8c3e270deda46265063d5d4a54cdb7950436d97cb2c26bcbeee1e151851f7d76" + }, + "fixture" : "aggregation/expressions/bottomN/computingNBasedOnTheGroupKeyForGroup", + "kind" : "CONVERTED", + "legacyBody" : "{\n testPipeline(new ActionTestOptions().orderMatters(false),\n (aggregation) -> aggregation.pipeline(group(id(document(\"gameId\", \"$gameId\"))).field(\"gamescores\",\n bottomN(condition(eq(\"$gameId\", \"G2\"), 1, 3), \"$score\", descending(\"score\")))));\n\n }", + "legacyBodySha256" : "0dbeaef6d1623229515358128f87249c1c52dd44c22c72828bda98e6eabc532f", + "legacyMethod" : "testComputingNBasedOnTheGroupKeyForGroup", + "legacyType" : "dev.morphia.test.aggregation.expressions.TestBottomN", + "options" : [ ], + "ordered" : false, + "override" : { + "blocks" : [ { + "role" : "ACTION", + "sha256" : "7171140049a90ee4e0c8972f0e405a0f36263ce1ff68bf3358f2f35290c8824d", + "text" : "db.gamescores.aggregate([\n {\n $group:\n {\n _id: {\"gameId\": \"$gameId\"},\n gamescores:\n {\n $bottomN:\n {\n output: \"$score\",\n n: { $cond: { if: {$eq: [\"$gameId\",\"G2\"] }, then: 1, else: 3 } },\n sortBy: { \"score\": -1 }\n }\n }\n }\n }\n] )" + }, { + "role" : "DATA", + "sha256" : "34336408cd7ae4866c15c9d272a29f47efce56dbdd4924d76d9e253d8b4486f0", + "text" : "db.gamescores.insertMany([\n { playerId: \"PlayerA\", gameId: \"G1\", score: 31 },\n { playerId: \"PlayerB\", gameId: \"G1\", score: 33 },\n { playerId: \"PlayerC\", gameId: \"G1\", score: 99 },\n { playerId: \"PlayerD\", gameId: \"G1\", score: 1 },\n { playerId: \"PlayerA\", gameId: \"G2\", score: 10 },\n { playerId: \"PlayerB\", gameId: \"G2\", score: 14 },\n { playerId: \"PlayerC\", gameId: \"G2\", score: 66 },\n { playerId: \"PlayerD\", gameId: \"G2\", score: 80 }\n])" + }, { + "role" : "EXPECTED", + "sha256" : "0a827a6f6f965d6a5e89edc8c43a42e4ee5cd1f85a7238221184e4b31550536d", + "text" : "[\n { _id: { gameId: \"G2\" }, gamescores: [ 10 ] },\n { _id: { gameId: \"G1\" }, gamescores: [ 33, 31, 1 ] }\n]" + } ], + "collections" : { }, + "corrections" : [ ], + "example" : "Computing ``n`` Based on the Group Key for ``$group``", + "fixture" : "aggregation/expressions/bottomN/computingNBasedOnTheGroupKeyForGroup", + "fixtureFiles" : { + "action.json" : "bf22217d83fd67b9c7e83b83fb378067f645980fa67f28ae7e1583502def9c24", + "data.json" : "6831b8684b7cb54ed19676649116bb3eb6152f1e077ee8aac64840a8ef132fae", + "expected.json" : "353b9ef5d5d94b8d4686820206be94359e42facbb298bf05e5518455368089eb", + "name" : "8c3e270deda46265063d5d4a54cdb7950436d97cb2c26bcbeee1e151851f7d76" + }, + "includes" : [ ], + "origin" : "c3601b919364eaa92e9a8fc8860d3c2db82055b2", + "pageBlob" : "6c13c2ef114628ba3582ee463c1a86b8b9edb9bf", + "retiredLock" : { + "name" : "lock", + "sha256" : "b9e436f27be163d32c9116ed94ab0911f93b85d9845118a787be5a408fa380bc", + "text" : "morphia generates the more succinct array version vs the document version from the docs\ndocument order differs" + }, + "retypes" : [ ], + "rules" : [ "COND_ARRAY", "NAMED_ARGUMENTS" ], + "shape" : "PIPELINE", + "source" : { + "commit" : "d497b13c81d4853dce0760e07390cf9d03c33c28", + "path" : "source/reference/operator/aggregation/bottomN.txt", + "relation" : "AT_ORIGIN" + }, + "unexpandedIncludes" : [ ] + }, + "scenario" : "core/src/test/resources/dev/morphia/test/aggregation/expressions/bottomN/computingNBasedOnTheGroupKeyForGroup/scenario.json", + "scenarioSha256" : "063314d34265b88246c266f43032cd89ed353365cd635154f4f61f128db14d9e", + "test" : "dev.morphia.test.aggregation.expressions.TestBottomN#testComputingNBasedOnTheGroupKeyForGroup" }, { "bodyEdit" : null, "files" : { @@ -13529,6 +13591,68 @@ "scenario" : "core/src/test/resources/dev/morphia/test/aggregation/expressions/top/findTheTopScoreAcrossMultipleGames/scenario.json", "scenarioSha256" : "46621c13739291528010a1b86c592690e6f8349e3818452beb5909421b430cab", "test" : "dev.morphia.test.aggregation.expressions.TestTop#testFindTheTopScoreAcrossMultipleGames" + }, { + "bodyEdit" : null, + "files" : { + "action.json" : "f9c57111b63f78bc8ab906768edd3fbf9b7d4222e3b49f8432b05a73251fe136", + "data.json" : "6831b8684b7cb54ed19676649116bb3eb6152f1e077ee8aac64840a8ef132fae", + "expected.json" : "c85b080d12e933f27c59fa7b49d3baa2ca30bf110a6a00a782169accb23cb373", + "lock" : "b996f490e3f0fd383b2004f413117597fcf368482ddb5a397401dded8050e9dc", + "name" : "8c3e270deda46265063d5d4a54cdb7950436d97cb2c26bcbeee1e151851f7d76" + }, + "fixture" : "aggregation/expressions/topN/computingNBasedOnTheGroupKeyForGroup", + "kind" : "CONVERTED", + "legacyBody" : "{\n testPipeline(new ActionTestOptions().orderMatters(false),\n (aggregation) -> aggregation.pipeline(group(id(document(\"gameId\", \"$gameId\"))).field(\"gamescores\", topN(\n condition(ComparisonExpressions.eq(\"$gameId\", \"G2\"), 1, 3), \"$score\", descending(\"score\")))));\n }", + "legacyBodySha256" : "4eb5962631b18c4ed2066a2e8a86260a14477340cb83c7ddb07743d398480c33", + "legacyMethod" : "testComputingNBasedOnTheGroupKeyForGroup", + "legacyType" : "dev.morphia.test.aggregation.expressions.TestTopN", + "options" : [ ], + "ordered" : false, + "override" : { + "blocks" : [ { + "role" : "ACTION", + "sha256" : "c3765d7f98342679fda818463c567e9f533b600fb5a43c8240da664499d8dbc8", + "text" : "db.gamescores.aggregate([\n {\n $group:\n {\n _id: {\"gameId\": \"$gameId\"},\n gamescores:\n {\n $topN:\n {\n output: \"$score\",\n n: { $cond: { if: {$eq: [\"$gameId\",\"G2\"] }, then: 1, else: 3 } },\n sortBy: { \"score\": -1 }\n }\n }\n }\n }\n] )" + }, { + "role" : "DATA", + "sha256" : "34336408cd7ae4866c15c9d272a29f47efce56dbdd4924d76d9e253d8b4486f0", + "text" : "db.gamescores.insertMany([\n { playerId: \"PlayerA\", gameId: \"G1\", score: 31 },\n { playerId: \"PlayerB\", gameId: \"G1\", score: 33 },\n { playerId: \"PlayerC\", gameId: \"G1\", score: 99 },\n { playerId: \"PlayerD\", gameId: \"G1\", score: 1 },\n { playerId: \"PlayerA\", gameId: \"G2\", score: 10 },\n { playerId: \"PlayerB\", gameId: \"G2\", score: 14 },\n { playerId: \"PlayerC\", gameId: \"G2\", score: 66 },\n { playerId: \"PlayerD\", gameId: \"G2\", score: 80 }\n])" + }, { + "role" : "EXPECTED", + "sha256" : "cbdb11eda34caac9874e65f962979646ef03541d6bf8a6d066eb1fd328da55d3", + "text" : "[\n { _id: { gameId: 'G1' }, gamescores: [ 99, 33, 31 ] },\n { _id: { gameId: 'G2' }, gamescores: [ 80 ] }\n]" + } ], + "collections" : { }, + "corrections" : [ ], + "example" : "Computing ``n`` Based on the Group Key for ``$group``", + "fixture" : "aggregation/expressions/topN/computingNBasedOnTheGroupKeyForGroup", + "fixtureFiles" : { + "action.json" : "f9c57111b63f78bc8ab906768edd3fbf9b7d4222e3b49f8432b05a73251fe136", + "data.json" : "6831b8684b7cb54ed19676649116bb3eb6152f1e077ee8aac64840a8ef132fae", + "expected.json" : "c85b080d12e933f27c59fa7b49d3baa2ca30bf110a6a00a782169accb23cb373", + "name" : "8c3e270deda46265063d5d4a54cdb7950436d97cb2c26bcbeee1e151851f7d76" + }, + "includes" : [ ], + "origin" : "c3601b919364eaa92e9a8fc8860d3c2db82055b2", + "pageBlob" : "5327b184fa5b8f1342bd6cfd26f8318c09d5709c", + "retiredLock" : { + "name" : "lock", + "sha256" : "b996f490e3f0fd383b2004f413117597fcf368482ddb5a397401dded8050e9dc", + "text" : "update the docs version to use the short version morphia generates\nfix the ordering of the doc" + }, + "retypes" : [ ], + "rules" : [ "COND_ARRAY", "NAMED_ARGUMENTS" ], + "shape" : "PIPELINE", + "source" : { + "commit" : "d497b13c81d4853dce0760e07390cf9d03c33c28", + "path" : "source/reference/operator/aggregation/topN.txt", + "relation" : "AT_ORIGIN" + }, + "unexpandedIncludes" : [ ] + }, + "scenario" : "core/src/test/resources/dev/morphia/test/aggregation/expressions/topN/computingNBasedOnTheGroupKeyForGroup/scenario.json", + "scenarioSha256" : "6312a806297990f0e1e227b93da0dcbfd3d15acc16aef67a4d3d9c183a619513", + "test" : "dev.morphia.test.aggregation.expressions.TestTopN#testComputingNBasedOnTheGroupKeyForGroup" }, { "bodyEdit" : null, "files" : { @@ -14744,6 +14868,74 @@ "scenario" : "core/src/test/resources/dev/morphia/test/aggregation/stages/documents/useADocumentsStageInALookupStage/scenario.json", "scenarioSha256" : "41f547604b64f2d32549bb7fc1b1734b28f0dcc5484ef33b6be66b4cc9b7b094", "test" : "dev.morphia.test.aggregation.stages.TestDocuments#testUseADocumentsStageInALookupStage" + }, { + "bodyEdit" : null, + "files" : { + "action.json" : "ee73a850a4643122181630957b2ba73f245a9d136616c165e3a36cc701903890", + "data.json" : "d24e60395c66e510f55feac543096acb938384ef5d927d9720bb099b51aaed8f", + "expected.json" : "ac28ea2dd929c9e63cf9adbe43f17872cd1fdd67088342a18b42d4a62e5e9020", + "lock" : "3923f8ed2be2b71dc3d46090af57ed91fb0c7a5f0fbc420063fea7861a7e49ab", + "name" : "8a5be85ecdf30d55c6f9acb663f2166a858a03f27f3acff0f5eb749c38b448f8" + }, + "fixture" : "aggregation/stages/fill/fillDataForDistinctPartitions", + "kind" : "CONVERTED", + "legacyBody" : "{\n testPipeline(new ActionTestOptions().removeIds(true),\n aggregation -> aggregation.pipeline(fill().sortBy(ascending(\"date\"))\n .partitionBy(document(\"restaurant\", \"$restaurant\")).field(\"score\", Method.LOCF)));\n }", + "legacyBodySha256" : "fa4fea2454abc367258354f32dae54ff9a791ee78b7ae47394e9d14d7494d7ee", + "legacyMethod" : "testFillDataForDistinctPartitions", + "legacyType" : "dev.morphia.test.aggregation.stages.TestFill", + "options" : [ { + "argument" : "true", + "name" : "removeIds" + } ], + "ordered" : true, + "override" : { + "blocks" : [ { + "role" : "ACTION", + "sha256" : "3fd4d0d6fd33db990e3e0049920fde5f773dadb388dba858855ac4433dbfe5eb", + "text" : "db.restaurantReviewsMultiple.aggregate( [\n {\n $fill:\n {\n sortBy: { date: 1 },\n partitionBy: { \"restaurant\": \"$restaurant\" },\n output:\n {\n \"score\": { method: \"locf\" }\n }\n }\n }\n] )" + }, { + "role" : "DATA", + "sha256" : "1fb862bb0dea7eb32123767adeba4569ebf59acc824cbdff35c6dcae3175b2d2", + "text" : "db.restaurantReviewsMultiple.insertMany( [ \n {\n date: ISODate(\"2021-03-08\"),\n restaurant: \"Joe's Pizza\",\n score: 90\n },\n {\n date: ISODate(\"2021-03-08\"),\n restaurant: \"Sally's Deli\",\n score: 75\n },\n {\n date: ISODate(\"2021-03-09\"),\n restaurant: \"Joe's Pizza\",\n score: 92\n },\n {\n date: ISODate(\"2021-03-09\"),\n restaurant: \"Sally's Deli\"\n },\n {\n date: ISODate(\"2021-03-10\"),\n restaurant: \"Joe's Pizza\"\n },\n { \n date: ISODate(\"2021-03-10\"),\n restaurant: \"Sally's Deli\",\n score: 68\n },\n {\n date: ISODate(\"2021-03-11\"),\n restaurant: \"Joe's Pizza\",\n score: 93\n },\n {\n date: ISODate(\"2021-03-11\"),\n restaurant: \"Sally's Deli\"\n }\n] )" + }, { + "role" : "EXPECTED", + "sha256" : "c54300603c93986c5749c3d685f8150129df07ebb238f003525b1054d0a3933a", + "text" : "[\n {\n _id: ObjectId(\"620559f4394d47411658b58f\"),\n date: ISODate(\"2021-03-08T00:00:00.000Z\"),\n restaurant: \"Joe's Pizza\",\n score: 90\n },\n {\n _id: ObjectId(\"620559f4394d47411658b591\"),\n date: ISODate(\"2021-03-09T00:00:00.000Z\"),\n restaurant: \"Joe's Pizza\",\n score: 92\n },\n {\n _id: ObjectId(\"620559f4394d47411658b593\"),\n date: ISODate(\"2021-03-10T00:00:00.000Z\"),\n restaurant: \"Joe's Pizza\",\n score: 92\n },\n {\n _id: ObjectId(\"620559f4394d47411658b595\"),\n date: ISODate(\"2021-03-11T00:00:00.000Z\"),\n restaurant: \"Joe's Pizza\",\n score: 93\n },\n {\n _id: ObjectId(\"620559f4394d47411658b590\"),\n date: ISODate(\"2021-03-08T00:00:00.000Z\"),\n restaurant: \"Sally's Deli\",\n score: 75\n },\n {\n _id: ObjectId(\"620559f4394d47411658b592\"),\n date: ISODate(\"2021-03-09T00:00:00.000Z\"),\n restaurant: \"Sally's Deli\",\n score: 75\n },\n {\n _id: ObjectId(\"620559f4394d47411658b594\"),\n date: ISODate(\"2021-03-10T00:00:00.000Z\"),\n restaurant: \"Sally's Deli\",\n score: 68\n },\n {\n _id: ObjectId(\"620559f4394d47411658b596\"),\n date: ISODate(\"2021-03-11T00:00:00.000Z\"),\n restaurant: \"Sally's Deli\",\n score: 68\n }\n]" + } ], + "collections" : { }, + "corrections" : [ ], + "example" : "Fill Data for Distinct Partitions", + "fixture" : "aggregation/stages/fill/fillDataForDistinctPartitions", + "fixtureFiles" : { + "action.json" : "ee73a850a4643122181630957b2ba73f245a9d136616c165e3a36cc701903890", + "data.json" : "d24e60395c66e510f55feac543096acb938384ef5d927d9720bb099b51aaed8f", + "expected.json" : "ac28ea2dd929c9e63cf9adbe43f17872cd1fdd67088342a18b42d4a62e5e9020", + "name" : "8a5be85ecdf30d55c6f9acb663f2166a858a03f27f3acff0f5eb749c38b448f8" + }, + "includes" : [ { + "blob" : "0173af6ff3a72a2ee52cbb8862869f66cb4056ed", + "path" : "source/includes/fact-fill-description.rst" + } ], + "origin" : "7ad9ac5e4d31c5035284090ab13521e17467015f", + "pageBlob" : "b0ee7dd39cf46de21e670976d3f6842a77c293ef", + "retiredLock" : { + "name" : "lock", + "sha256" : "3923f8ed2be2b71dc3d46090af57ed91fb0c7a5f0fbc420063fea7861a7e49ab", + "text" : "reorder pipeline" + }, + "retypes" : [ ], + "rules" : [ "NAMED_ARGUMENTS" ], + "shape" : "PIPELINE", + "source" : { + "commit" : "7861c1d4feb4d9f24c13e764f4e0e8f71fa01d5a", + "path" : "source/reference/operator/aggregation/fill.txt", + "relation" : "AT_ORIGIN" + }, + "unexpandedIncludes" : [ ] + }, + "scenario" : "core/src/test/resources/dev/morphia/test/aggregation/stages/fill/fillDataForDistinctPartitions/scenario.json", + "scenarioSha256" : "b2fb054467af88928f55a87d75e08ac45707cac830bbf652c37d2d0a502e652b", + "test" : "dev.morphia.test.aggregation.stages.TestFill#testFillDataForDistinctPartitions" }, { "bodyEdit" : null, "files" : { diff --git a/audits/catalog/form-migration.json b/audits/catalog/form-migration.json index dd562220490..7417b78ead1 100644 --- a/audits/catalog/form-migration.json +++ b/audits/catalog/form-migration.json @@ -1,46 +1,5 @@ { "overrides" : [ { - "blocks" : [ { - "role" : "ACTION", - "sha256" : "7171140049a90ee4e0c8972f0e405a0f36263ce1ff68bf3358f2f35290c8824d", - "text" : "db.gamescores.aggregate([\n {\n $group:\n {\n _id: {\"gameId\": \"$gameId\"},\n gamescores:\n {\n $bottomN:\n {\n output: \"$score\",\n n: { $cond: { if: {$eq: [\"$gameId\",\"G2\"] }, then: 1, else: 3 } },\n sortBy: { \"score\": -1 }\n }\n }\n }\n }\n] )" - }, { - "role" : "DATA", - "sha256" : "34336408cd7ae4866c15c9d272a29f47efce56dbdd4924d76d9e253d8b4486f0", - "text" : "db.gamescores.insertMany([\n { playerId: \"PlayerA\", gameId: \"G1\", score: 31 },\n { playerId: \"PlayerB\", gameId: \"G1\", score: 33 },\n { playerId: \"PlayerC\", gameId: \"G1\", score: 99 },\n { playerId: \"PlayerD\", gameId: \"G1\", score: 1 },\n { playerId: \"PlayerA\", gameId: \"G2\", score: 10 },\n { playerId: \"PlayerB\", gameId: \"G2\", score: 14 },\n { playerId: \"PlayerC\", gameId: \"G2\", score: 66 },\n { playerId: \"PlayerD\", gameId: \"G2\", score: 80 }\n])" - }, { - "role" : "EXPECTED", - "sha256" : "0a827a6f6f965d6a5e89edc8c43a42e4ee5cd1f85a7238221184e4b31550536d", - "text" : "[\n { _id: { gameId: \"G2\" }, gamescores: [ 10 ] },\n { _id: { gameId: \"G1\" }, gamescores: [ 33, 31, 1 ] }\n]" - } ], - "collections" : { }, - "corrections" : [ ], - "example" : "Computing ``n`` Based on the Group Key for ``$group``", - "fixture" : "aggregation/expressions/bottomN/computingNBasedOnTheGroupKeyForGroup", - "fixtureFiles" : { - "action.json" : "bf22217d83fd67b9c7e83b83fb378067f645980fa67f28ae7e1583502def9c24", - "data.json" : "6831b8684b7cb54ed19676649116bb3eb6152f1e077ee8aac64840a8ef132fae", - "expected.json" : "353b9ef5d5d94b8d4686820206be94359e42facbb298bf05e5518455368089eb", - "name" : "8c3e270deda46265063d5d4a54cdb7950436d97cb2c26bcbeee1e151851f7d76" - }, - "includes" : [ ], - "origin" : "c3601b919364eaa92e9a8fc8860d3c2db82055b2", - "pageBlob" : "6c13c2ef114628ba3582ee463c1a86b8b9edb9bf", - "retiredLock" : { - "name" : "lock", - "sha256" : "b9e436f27be163d32c9116ed94ab0911f93b85d9845118a787be5a408fa380bc", - "text" : "morphia generates the more succinct array version vs the document version from the docs\ndocument order differs" - }, - "retypes" : [ ], - "rules" : [ "COND_ARRAY", "NAMED_ARGUMENTS" ], - "shape" : "PIPELINE", - "source" : { - "commit" : "d497b13c81d4853dce0760e07390cf9d03c33c28", - "path" : "source/reference/operator/aggregation/bottomN.txt", - "relation" : "AT_ORIGIN" - }, - "unexpandedIncludes" : [ ] - }, { "blocks" : [ { "role" : "ACTION", "sha256" : "505edb1e4bde2908694f17718f020da56a9df0140f79eab66f2d9f3d76ee0318", @@ -90,47 +49,6 @@ "relation" : "AT_ORIGIN" }, "unexpandedIncludes" : [ ] - }, { - "blocks" : [ { - "role" : "ACTION", - "sha256" : "c3765d7f98342679fda818463c567e9f533b600fb5a43c8240da664499d8dbc8", - "text" : "db.gamescores.aggregate([\n {\n $group:\n {\n _id: {\"gameId\": \"$gameId\"},\n gamescores:\n {\n $topN:\n {\n output: \"$score\",\n n: { $cond: { if: {$eq: [\"$gameId\",\"G2\"] }, then: 1, else: 3 } },\n sortBy: { \"score\": -1 }\n }\n }\n }\n }\n] )" - }, { - "role" : "DATA", - "sha256" : "34336408cd7ae4866c15c9d272a29f47efce56dbdd4924d76d9e253d8b4486f0", - "text" : "db.gamescores.insertMany([\n { playerId: \"PlayerA\", gameId: \"G1\", score: 31 },\n { playerId: \"PlayerB\", gameId: \"G1\", score: 33 },\n { playerId: \"PlayerC\", gameId: \"G1\", score: 99 },\n { playerId: \"PlayerD\", gameId: \"G1\", score: 1 },\n { playerId: \"PlayerA\", gameId: \"G2\", score: 10 },\n { playerId: \"PlayerB\", gameId: \"G2\", score: 14 },\n { playerId: \"PlayerC\", gameId: \"G2\", score: 66 },\n { playerId: \"PlayerD\", gameId: \"G2\", score: 80 }\n])" - }, { - "role" : "EXPECTED", - "sha256" : "cbdb11eda34caac9874e65f962979646ef03541d6bf8a6d066eb1fd328da55d3", - "text" : "[\n { _id: { gameId: 'G1' }, gamescores: [ 99, 33, 31 ] },\n { _id: { gameId: 'G2' }, gamescores: [ 80 ] }\n]" - } ], - "collections" : { }, - "corrections" : [ ], - "example" : "Computing ``n`` Based on the Group Key for ``$group``", - "fixture" : "aggregation/expressions/topN/computingNBasedOnTheGroupKeyForGroup", - "fixtureFiles" : { - "action.json" : "f9c57111b63f78bc8ab906768edd3fbf9b7d4222e3b49f8432b05a73251fe136", - "data.json" : "6831b8684b7cb54ed19676649116bb3eb6152f1e077ee8aac64840a8ef132fae", - "expected.json" : "c85b080d12e933f27c59fa7b49d3baa2ca30bf110a6a00a782169accb23cb373", - "name" : "8c3e270deda46265063d5d4a54cdb7950436d97cb2c26bcbeee1e151851f7d76" - }, - "includes" : [ ], - "origin" : "c3601b919364eaa92e9a8fc8860d3c2db82055b2", - "pageBlob" : "5327b184fa5b8f1342bd6cfd26f8318c09d5709c", - "retiredLock" : { - "name" : "lock", - "sha256" : "b996f490e3f0fd383b2004f413117597fcf368482ddb5a397401dded8050e9dc", - "text" : "update the docs version to use the short version morphia generates\nfix the ordering of the doc" - }, - "retypes" : [ ], - "rules" : [ "COND_ARRAY", "NAMED_ARGUMENTS" ], - "shape" : "PIPELINE", - "source" : { - "commit" : "d497b13c81d4853dce0760e07390cf9d03c33c28", - "path" : "source/reference/operator/aggregation/topN.txt", - "relation" : "AT_ORIGIN" - }, - "unexpandedIncludes" : [ ] }, { "blocks" : [ { "role" : "ACTION", @@ -181,50 +99,6 @@ "relation" : "AT_ORIGIN" }, "unexpandedIncludes" : [ ] - }, { - "blocks" : [ { - "role" : "ACTION", - "sha256" : "3fd4d0d6fd33db990e3e0049920fde5f773dadb388dba858855ac4433dbfe5eb", - "text" : "db.restaurantReviewsMultiple.aggregate( [\n {\n $fill:\n {\n sortBy: { date: 1 },\n partitionBy: { \"restaurant\": \"$restaurant\" },\n output:\n {\n \"score\": { method: \"locf\" }\n }\n }\n }\n] )" - }, { - "role" : "DATA", - "sha256" : "1fb862bb0dea7eb32123767adeba4569ebf59acc824cbdff35c6dcae3175b2d2", - "text" : "db.restaurantReviewsMultiple.insertMany( [ \n {\n date: ISODate(\"2021-03-08\"),\n restaurant: \"Joe's Pizza\",\n score: 90\n },\n {\n date: ISODate(\"2021-03-08\"),\n restaurant: \"Sally's Deli\",\n score: 75\n },\n {\n date: ISODate(\"2021-03-09\"),\n restaurant: \"Joe's Pizza\",\n score: 92\n },\n {\n date: ISODate(\"2021-03-09\"),\n restaurant: \"Sally's Deli\"\n },\n {\n date: ISODate(\"2021-03-10\"),\n restaurant: \"Joe's Pizza\"\n },\n { \n date: ISODate(\"2021-03-10\"),\n restaurant: \"Sally's Deli\",\n score: 68\n },\n {\n date: ISODate(\"2021-03-11\"),\n restaurant: \"Joe's Pizza\",\n score: 93\n },\n {\n date: ISODate(\"2021-03-11\"),\n restaurant: \"Sally's Deli\"\n }\n] )" - }, { - "role" : "EXPECTED", - "sha256" : "c54300603c93986c5749c3d685f8150129df07ebb238f003525b1054d0a3933a", - "text" : "[\n {\n _id: ObjectId(\"620559f4394d47411658b58f\"),\n date: ISODate(\"2021-03-08T00:00:00.000Z\"),\n restaurant: \"Joe's Pizza\",\n score: 90\n },\n {\n _id: ObjectId(\"620559f4394d47411658b591\"),\n date: ISODate(\"2021-03-09T00:00:00.000Z\"),\n restaurant: \"Joe's Pizza\",\n score: 92\n },\n {\n _id: ObjectId(\"620559f4394d47411658b593\"),\n date: ISODate(\"2021-03-10T00:00:00.000Z\"),\n restaurant: \"Joe's Pizza\",\n score: 92\n },\n {\n _id: ObjectId(\"620559f4394d47411658b595\"),\n date: ISODate(\"2021-03-11T00:00:00.000Z\"),\n restaurant: \"Joe's Pizza\",\n score: 93\n },\n {\n _id: ObjectId(\"620559f4394d47411658b590\"),\n date: ISODate(\"2021-03-08T00:00:00.000Z\"),\n restaurant: \"Sally's Deli\",\n score: 75\n },\n {\n _id: ObjectId(\"620559f4394d47411658b592\"),\n date: ISODate(\"2021-03-09T00:00:00.000Z\"),\n restaurant: \"Sally's Deli\",\n score: 75\n },\n {\n _id: ObjectId(\"620559f4394d47411658b594\"),\n date: ISODate(\"2021-03-10T00:00:00.000Z\"),\n restaurant: \"Sally's Deli\",\n score: 68\n },\n {\n _id: ObjectId(\"620559f4394d47411658b596\"),\n date: ISODate(\"2021-03-11T00:00:00.000Z\"),\n restaurant: \"Sally's Deli\",\n score: 68\n }\n]" - } ], - "collections" : { }, - "corrections" : [ ], - "example" : "Fill Data for Distinct Partitions", - "fixture" : "aggregation/stages/fill/fillDataForDistinctPartitions", - "fixtureFiles" : { - "action.json" : "ee73a850a4643122181630957b2ba73f245a9d136616c165e3a36cc701903890", - "data.json" : "d24e60395c66e510f55feac543096acb938384ef5d927d9720bb099b51aaed8f", - "expected.json" : "ac28ea2dd929c9e63cf9adbe43f17872cd1fdd67088342a18b42d4a62e5e9020", - "name" : "8a5be85ecdf30d55c6f9acb663f2166a858a03f27f3acff0f5eb749c38b448f8" - }, - "includes" : [ { - "blob" : "0173af6ff3a72a2ee52cbb8862869f66cb4056ed", - "path" : "source/includes/fact-fill-description.rst" - } ], - "origin" : "7ad9ac5e4d31c5035284090ab13521e17467015f", - "pageBlob" : "b0ee7dd39cf46de21e670976d3f6842a77c293ef", - "retiredLock" : { - "name" : "lock", - "sha256" : "3923f8ed2be2b71dc3d46090af57ed91fb0c7a5f0fbc420063fea7861a7e49ab", - "text" : "reorder pipeline" - }, - "retypes" : [ ], - "rules" : [ "NAMED_ARGUMENTS" ], - "shape" : "PIPELINE", - "source" : { - "commit" : "7861c1d4feb4d9f24c13e764f4e0e8f71fa01d5a", - "path" : "source/reference/operator/aggregation/fill.txt", - "relation" : "AT_ORIGIN" - }, - "unexpandedIncludes" : [ ] }, { "blocks" : [ { "role" : "ACTION", @@ -495,15 +369,15 @@ "gap.REJECTED" : 1, "gap.RESIDUAL_DIFFERENCE" : 48, "gap.SOURCE_UNSUPPORTED" : 34, - "overrides" : 9, + "overrides" : 6, "overrides.corrected" : 2, "overrides.exact" : 1, "overrides.retyped" : 0, "rule.ALTERNATIVE_COMMANDS" : 1, - "rule.COND_ARRAY" : 2, + "rule.COND_ARRAY" : 0, "rule.EQ_SHORTHAND" : 0, "rule.FIELD_OPERATORS_AND" : 0, - "rule.NAMED_ARGUMENTS" : 4, + "rule.NAMED_ARGUMENTS" : 1, "rule.PROJECTION_FLAGS" : 0, "rule.PROJECT_ID_FIRST" : 1, "rule.REGEX_FORM" : 0, diff --git a/audits/catalog/form-review.json b/audits/catalog/form-review.json index e3570543661..e80eec7f3d8 100644 --- a/audits/catalog/form-review.json +++ b/audits/catalog/form-review.json @@ -1,21 +1,5 @@ { "declarations" : [ { - "corrections" : [ ], - "fixture" : "aggregation/expressions/bottomN/computingNBasedOnTheGroupKeyForGroup", - "includes" : [ ], - "justification" : null, - "lock" : "morphia generates the more succinct array version vs the document version from the docs\ndocument order differs", - "marker" : "lock", - "origin" : "c3601b919364eaa92e9a8fc8860d3c2db82055b2", - "pageBlob" : "6c13c2ef114628ba3582ee463c1a86b8b9edb9bf", - "retypes" : [ ], - "rules" : [ "COND_ARRAY", "NAMED_ARGUMENTS" ], - "source" : { - "commit" : "d497b13c81d4853dce0760e07390cf9d03c33c28", - "path" : "source/reference/operator/aggregation/bottomN.txt", - "relation" : "AT_ORIGIN" - } - }, { "corrections" : [ ], "fixture" : "aggregation/expressions/setUnion/setUnionAccumulatorOperator", "includes" : [ { @@ -40,22 +24,6 @@ "path" : "source/reference/operator/aggregation/setUnion.txt", "relation" : "AT_ORIGIN" } - }, { - "corrections" : [ ], - "fixture" : "aggregation/expressions/topN/computingNBasedOnTheGroupKeyForGroup", - "includes" : [ ], - "justification" : null, - "lock" : "update the docs version to use the short version morphia generates\nfix the ordering of the doc", - "marker" : "lock", - "origin" : "c3601b919364eaa92e9a8fc8860d3c2db82055b2", - "pageBlob" : "5327b184fa5b8f1342bd6cfd26f8318c09d5709c", - "retypes" : [ ], - "rules" : [ "COND_ARRAY", "NAMED_ARGUMENTS" ], - "source" : { - "commit" : "d497b13c81d4853dce0760e07390cf9d03c33c28", - "path" : "source/reference/operator/aggregation/topN.txt", - "relation" : "AT_ORIGIN" - } }, { "corrections" : [ ], "fixture" : "aggregation/stages/densify/densifyTimeSeriesData", @@ -81,25 +49,6 @@ "path" : "source/reference/operator/aggregation/densify.txt", "relation" : "AT_ORIGIN" } - }, { - "corrections" : [ ], - "fixture" : "aggregation/stages/fill/fillDataForDistinctPartitions", - "includes" : [ { - "blob" : "0173af6ff3a72a2ee52cbb8862869f66cb4056ed", - "path" : "source/includes/fact-fill-description.rst" - } ], - "justification" : null, - "lock" : "reorder pipeline", - "marker" : "lock", - "origin" : "7ad9ac5e4d31c5035284090ab13521e17467015f", - "pageBlob" : "b0ee7dd39cf46de21e670976d3f6842a77c293ef", - "retypes" : [ ], - "rules" : [ "NAMED_ARGUMENTS" ], - "source" : { - "commit" : "7861c1d4feb4d9f24c13e764f4e0e8f71fa01d5a", - "path" : "source/reference/operator/aggregation/fill.txt", - "relation" : "AT_ORIGIN" - } }, { "corrections" : [ ], "fixture" : "aggregation/stages/graphLookup/acrossMultipleCollections", @@ -333,6 +282,22 @@ "path" : "source/reference/operator/aggregation/bottom.txt", "relation" : "AT_ORIGIN" } + }, { + "corrections" : [ ], + "fixture" : "aggregation/expressions/bottomN/computingNBasedOnTheGroupKeyForGroup", + "includes" : [ ], + "justification" : null, + "lock" : "morphia generates the more succinct array version vs the document version from the docs\ndocument order differs", + "marker" : "lock", + "origin" : "c3601b919364eaa92e9a8fc8860d3c2db82055b2", + "pageBlob" : "6c13c2ef114628ba3582ee463c1a86b8b9edb9bf", + "retypes" : [ ], + "rules" : [ "COND_ARRAY", "NAMED_ARGUMENTS" ], + "source" : { + "commit" : "d497b13c81d4853dce0760e07390cf9d03c33c28", + "path" : "source/reference/operator/aggregation/bottomN.txt", + "relation" : "AT_ORIGIN" + } }, { "corrections" : [ { "curated" : "{\"v\": {\"$numberInt\": \"733\"}}", @@ -1973,6 +1938,22 @@ "path" : "source/reference/operator/aggregation/top.txt", "relation" : "AT_ORIGIN" } + }, { + "corrections" : [ ], + "fixture" : "aggregation/expressions/topN/computingNBasedOnTheGroupKeyForGroup", + "includes" : [ ], + "justification" : null, + "lock" : "update the docs version to use the short version morphia generates\nfix the ordering of the doc", + "marker" : "lock", + "origin" : "c3601b919364eaa92e9a8fc8860d3c2db82055b2", + "pageBlob" : "5327b184fa5b8f1342bd6cfd26f8318c09d5709c", + "retypes" : [ ], + "rules" : [ "COND_ARRAY", "NAMED_ARGUMENTS" ], + "source" : { + "commit" : "d497b13c81d4853dce0760e07390cf9d03c33c28", + "path" : "source/reference/operator/aggregation/topN.txt", + "relation" : "AT_ORIGIN" + } }, { "corrections" : [ ], "fixture" : "aggregation/expressions/trunc/truncExpressionOperator", @@ -2108,6 +2089,25 @@ "path" : "source/reference/operator/aggregation/bucketAuto.txt", "relation" : "AT_ORIGIN" } + }, { + "corrections" : [ ], + "fixture" : "aggregation/stages/fill/fillDataForDistinctPartitions", + "includes" : [ { + "blob" : "0173af6ff3a72a2ee52cbb8862869f66cb4056ed", + "path" : "source/includes/fact-fill-description.rst" + } ], + "justification" : null, + "lock" : "reorder pipeline", + "marker" : "lock", + "origin" : "7ad9ac5e4d31c5035284090ab13521e17467015f", + "pageBlob" : "b0ee7dd39cf46de21e670976d3f6842a77c293ef", + "retypes" : [ ], + "rules" : [ "NAMED_ARGUMENTS" ], + "source" : { + "commit" : "7861c1d4feb4d9f24c13e764f4e0e8f71fa01d5a", + "path" : "source/reference/operator/aggregation/fill.txt", + "relation" : "AT_ORIGIN" + } }, { "corrections" : [ ], "fixture" : "aggregation/stages/group/pivotData", diff --git a/audits/src/test/kotlin/dev/morphia/audits/offline/FormMigrationTest.kt b/audits/src/test/kotlin/dev/morphia/audits/offline/FormMigrationTest.kt index ac0bdb50e8c..b53f4e267d4 100644 --- a/audits/src/test/kotlin/dev/morphia/audits/offline/FormMigrationTest.kt +++ b/audits/src/test/kotlin/dev/morphia/audits/offline/FormMigrationTest.kt @@ -957,7 +957,7 @@ class FormMigrationTest { .map { it.fixture } .toSet(), ) - assertEquals(9, report.overrides.size) + assertEquals(6, report.overrides.size) assertEquals(96, report.unresolved.size) } diff --git a/core/src/test/resources/dev/morphia/test/aggregation/expressions/bottomN/computingNBasedOnTheGroupKeyForGroup/action.json b/core/src/test/resources/dev/morphia/test/aggregation/expressions/bottomN/computingNBasedOnTheGroupKeyForGroup/action.json deleted file mode 100644 index f768095236c..00000000000 --- a/core/src/test/resources/dev/morphia/test/aggregation/expressions/bottomN/computingNBasedOnTheGroupKeyForGroup/action.json +++ /dev/null @@ -1,17 +0,0 @@ -[ - { - $group: - { - _id: {"gameId": "$gameId"}, - gamescores: - { - $bottomN: - { - output: "$score", - sortBy: { "score": -1 }, - n: { $cond: [ {$eq: ["$gameId","G2"] }, 1, 3 ] }, - } - } - } - } -] \ No newline at end of file diff --git a/core/src/test/resources/dev/morphia/test/aggregation/expressions/bottomN/computingNBasedOnTheGroupKeyForGroup/data.json b/core/src/test/resources/dev/morphia/test/aggregation/expressions/bottomN/computingNBasedOnTheGroupKeyForGroup/data.json deleted file mode 100644 index 99a196bd4d2..00000000000 --- a/core/src/test/resources/dev/morphia/test/aggregation/expressions/bottomN/computingNBasedOnTheGroupKeyForGroup/data.json +++ /dev/null @@ -1,8 +0,0 @@ -{ playerId: "PlayerA", gameId: "G1", score: 31 }, -{ playerId: "PlayerB", gameId: "G1", score: 33 }, -{ playerId: "PlayerC", gameId: "G1", score: 99 }, -{ playerId: "PlayerD", gameId: "G1", score: 1 }, -{ playerId: "PlayerA", gameId: "G2", score: 10 }, -{ playerId: "PlayerB", gameId: "G2", score: 14 }, -{ playerId: "PlayerC", gameId: "G2", score: 66 }, -{ playerId: "PlayerD", gameId: "G2", score: 80 } \ No newline at end of file diff --git a/core/src/test/resources/dev/morphia/test/aggregation/expressions/bottomN/computingNBasedOnTheGroupKeyForGroup/expected.json b/core/src/test/resources/dev/morphia/test/aggregation/expressions/bottomN/computingNBasedOnTheGroupKeyForGroup/expected.json deleted file mode 100644 index c38b45e1f45..00000000000 --- a/core/src/test/resources/dev/morphia/test/aggregation/expressions/bottomN/computingNBasedOnTheGroupKeyForGroup/expected.json +++ /dev/null @@ -1,2 +0,0 @@ -{ _id: { gameId: "G2" }, gamescores: [ 10 ] }, -{ _id: { gameId: "G1" }, gamescores: [ 33, 31, 1 ] } \ No newline at end of file diff --git a/core/src/test/resources/dev/morphia/test/aggregation/expressions/bottomN/computingNBasedOnTheGroupKeyForGroup/name b/core/src/test/resources/dev/morphia/test/aggregation/expressions/bottomN/computingNBasedOnTheGroupKeyForGroup/name deleted file mode 100644 index 5f679ac83a9..00000000000 --- a/core/src/test/resources/dev/morphia/test/aggregation/expressions/bottomN/computingNBasedOnTheGroupKeyForGroup/name +++ /dev/null @@ -1 +0,0 @@ -Computing ``n`` Based on the Group Key for ``$group`` \ No newline at end of file diff --git a/core/src/test/resources/dev/morphia/test/aggregation/expressions/bottomN/computingNBasedOnTheGroupKeyForGroup/scenario.json b/core/src/test/resources/dev/morphia/test/aggregation/expressions/bottomN/computingNBasedOnTheGroupKeyForGroup/scenario.json new file mode 100644 index 00000000000..61ad92475ee --- /dev/null +++ b/core/src/test/resources/dev/morphia/test/aggregation/expressions/bottomN/computingNBasedOnTheGroupKeyForGroup/scenario.json @@ -0,0 +1,200 @@ +{ + "schemaVersion": { + "$numberInt": "1" + }, + "name": "aggregation/expressions/bottomN/computingNBasedOnTheGroupKeyForGroup", + "title": "Computing ``n`` Based on the Group Key for ``$group``", + "context": "EXPRESSION", + "source": { + "repository": "mongodb/docs", + "commit": "d497b13c81d4853dce0760e07390cf9d03c33c28", + "path": "source/reference/operator/aggregation/bottomN.txt", + "blob": "6c13c2ef114628ba3582ee463c1a86b8b9edb9bf" + }, + "dataset": null, + "collections": { + "gamescores": [ + { + "playerId": "PlayerA", + "gameId": "G1", + "score": { + "$numberInt": "31" + } + }, + { + "playerId": "PlayerB", + "gameId": "G1", + "score": { + "$numberInt": "33" + } + }, + { + "playerId": "PlayerC", + "gameId": "G1", + "score": { + "$numberInt": "99" + } + }, + { + "playerId": "PlayerD", + "gameId": "G1", + "score": { + "$numberInt": "1" + } + }, + { + "playerId": "PlayerA", + "gameId": "G2", + "score": { + "$numberInt": "10" + } + }, + { + "playerId": "PlayerB", + "gameId": "G2", + "score": { + "$numberInt": "14" + } + }, + { + "playerId": "PlayerC", + "gameId": "G2", + "score": { + "$numberInt": "66" + } + }, + { + "playerId": "PlayerD", + "gameId": "G2", + "score": { + "$numberInt": "80" + } + } + ] + }, + "indexes": [], + "action": { + "kind": "aggregate", + "collection": "gamescores", + "pipeline": [ + { + "$group": { + "_id": { + "gameId": "$gameId" + }, + "gamescores": { + "$bottomN": { + "output": "$score", + "n": { + "$cond": { + "if": { + "$eq": [ + "$gameId", + "G2" + ] + }, + "then": { + "$numberInt": "1" + }, + "else": { + "$numberInt": "3" + } + } + }, + "sortBy": { + "score": { + "$numberInt": "-1" + } + } + } + } + } + } + ] + }, + "expected": { + "printed": [ + { + "document": [ + { + "name": "_id", + "value": { + "document": [ + { + "name": "gameId", + "value": { + "text": "G2" + } + } + ] + } + }, + { + "name": "gamescores", + "value": { + "array": [ + { + "whole": { + "$numberInt": "10" + } + } + ] + } + } + ] + }, + { + "document": [ + { + "name": "_id", + "value": { + "document": [ + { + "name": "gameId", + "value": { + "text": "G1" + } + } + ] + } + }, + { + "name": "gamescores", + "value": { + "array": [ + { + "whole": { + "$numberInt": "33" + } + }, + { + "whole": { + "$numberInt": "31" + } + }, + { + "whole": { + "$numberInt": "1" + } + } + ] + } + } + ] + } + ] + }, + "comparison": { + "order": "UNORDERED", + "rules": [ + "COND_ARRAY", + "NAMED_ARGUMENTS" + ], + "ignore": [], + "tolerance": null + }, + "requirements": { + "minimumServer": null, + "topology": "STANDALONE" + } +} diff --git a/core/src/test/resources/dev/morphia/test/aggregation/expressions/topN/computingNBasedOnTheGroupKeyForGroup/action.json b/core/src/test/resources/dev/morphia/test/aggregation/expressions/topN/computingNBasedOnTheGroupKeyForGroup/action.json deleted file mode 100644 index 21e3797a8f3..00000000000 --- a/core/src/test/resources/dev/morphia/test/aggregation/expressions/topN/computingNBasedOnTheGroupKeyForGroup/action.json +++ /dev/null @@ -1,17 +0,0 @@ -[ - { - $group: - { - _id: {"gameId": "$gameId"}, - gamescores: - { - $topN: - { - output: "$score", - sortBy: { "score": -1 }, - n: { $cond: [ {$eq: ["$gameId","G2"] }, 1, 3 ] } - } - } - } - } -] \ No newline at end of file diff --git a/core/src/test/resources/dev/morphia/test/aggregation/expressions/topN/computingNBasedOnTheGroupKeyForGroup/data.json b/core/src/test/resources/dev/morphia/test/aggregation/expressions/topN/computingNBasedOnTheGroupKeyForGroup/data.json deleted file mode 100644 index 99a196bd4d2..00000000000 --- a/core/src/test/resources/dev/morphia/test/aggregation/expressions/topN/computingNBasedOnTheGroupKeyForGroup/data.json +++ /dev/null @@ -1,8 +0,0 @@ -{ playerId: "PlayerA", gameId: "G1", score: 31 }, -{ playerId: "PlayerB", gameId: "G1", score: 33 }, -{ playerId: "PlayerC", gameId: "G1", score: 99 }, -{ playerId: "PlayerD", gameId: "G1", score: 1 }, -{ playerId: "PlayerA", gameId: "G2", score: 10 }, -{ playerId: "PlayerB", gameId: "G2", score: 14 }, -{ playerId: "PlayerC", gameId: "G2", score: 66 }, -{ playerId: "PlayerD", gameId: "G2", score: 80 } \ No newline at end of file diff --git a/core/src/test/resources/dev/morphia/test/aggregation/expressions/topN/computingNBasedOnTheGroupKeyForGroup/expected.json b/core/src/test/resources/dev/morphia/test/aggregation/expressions/topN/computingNBasedOnTheGroupKeyForGroup/expected.json deleted file mode 100644 index ab061042ebe..00000000000 --- a/core/src/test/resources/dev/morphia/test/aggregation/expressions/topN/computingNBasedOnTheGroupKeyForGroup/expected.json +++ /dev/null @@ -1,2 +0,0 @@ -{ _id: { gameId: 'G1' }, gamescores: [ 99, 33, 31 ] }, -{ _id: { gameId: 'G2' }, gamescores: [ 80 ] } \ No newline at end of file diff --git a/core/src/test/resources/dev/morphia/test/aggregation/expressions/topN/computingNBasedOnTheGroupKeyForGroup/name b/core/src/test/resources/dev/morphia/test/aggregation/expressions/topN/computingNBasedOnTheGroupKeyForGroup/name deleted file mode 100644 index 5f679ac83a9..00000000000 --- a/core/src/test/resources/dev/morphia/test/aggregation/expressions/topN/computingNBasedOnTheGroupKeyForGroup/name +++ /dev/null @@ -1 +0,0 @@ -Computing ``n`` Based on the Group Key for ``$group`` \ No newline at end of file diff --git a/core/src/test/resources/dev/morphia/test/aggregation/expressions/topN/computingNBasedOnTheGroupKeyForGroup/scenario.json b/core/src/test/resources/dev/morphia/test/aggregation/expressions/topN/computingNBasedOnTheGroupKeyForGroup/scenario.json new file mode 100644 index 00000000000..7b4ed5c762e --- /dev/null +++ b/core/src/test/resources/dev/morphia/test/aggregation/expressions/topN/computingNBasedOnTheGroupKeyForGroup/scenario.json @@ -0,0 +1,200 @@ +{ + "schemaVersion": { + "$numberInt": "1" + }, + "name": "aggregation/expressions/topN/computingNBasedOnTheGroupKeyForGroup", + "title": "Computing ``n`` Based on the Group Key for ``$group``", + "context": "EXPRESSION", + "source": { + "repository": "mongodb/docs", + "commit": "d497b13c81d4853dce0760e07390cf9d03c33c28", + "path": "source/reference/operator/aggregation/topN.txt", + "blob": "5327b184fa5b8f1342bd6cfd26f8318c09d5709c" + }, + "dataset": null, + "collections": { + "gamescores": [ + { + "playerId": "PlayerA", + "gameId": "G1", + "score": { + "$numberInt": "31" + } + }, + { + "playerId": "PlayerB", + "gameId": "G1", + "score": { + "$numberInt": "33" + } + }, + { + "playerId": "PlayerC", + "gameId": "G1", + "score": { + "$numberInt": "99" + } + }, + { + "playerId": "PlayerD", + "gameId": "G1", + "score": { + "$numberInt": "1" + } + }, + { + "playerId": "PlayerA", + "gameId": "G2", + "score": { + "$numberInt": "10" + } + }, + { + "playerId": "PlayerB", + "gameId": "G2", + "score": { + "$numberInt": "14" + } + }, + { + "playerId": "PlayerC", + "gameId": "G2", + "score": { + "$numberInt": "66" + } + }, + { + "playerId": "PlayerD", + "gameId": "G2", + "score": { + "$numberInt": "80" + } + } + ] + }, + "indexes": [], + "action": { + "kind": "aggregate", + "collection": "gamescores", + "pipeline": [ + { + "$group": { + "_id": { + "gameId": "$gameId" + }, + "gamescores": { + "$topN": { + "output": "$score", + "n": { + "$cond": { + "if": { + "$eq": [ + "$gameId", + "G2" + ] + }, + "then": { + "$numberInt": "1" + }, + "else": { + "$numberInt": "3" + } + } + }, + "sortBy": { + "score": { + "$numberInt": "-1" + } + } + } + } + } + } + ] + }, + "expected": { + "printed": [ + { + "document": [ + { + "name": "_id", + "value": { + "document": [ + { + "name": "gameId", + "value": { + "text": "G1" + } + } + ] + } + }, + { + "name": "gamescores", + "value": { + "array": [ + { + "whole": { + "$numberInt": "99" + } + }, + { + "whole": { + "$numberInt": "33" + } + }, + { + "whole": { + "$numberInt": "31" + } + } + ] + } + } + ] + }, + { + "document": [ + { + "name": "_id", + "value": { + "document": [ + { + "name": "gameId", + "value": { + "text": "G2" + } + } + ] + } + }, + { + "name": "gamescores", + "value": { + "array": [ + { + "whole": { + "$numberInt": "80" + } + } + ] + } + } + ] + } + ] + }, + "comparison": { + "order": "UNORDERED", + "rules": [ + "COND_ARRAY", + "NAMED_ARGUMENTS" + ], + "ignore": [], + "tolerance": null + }, + "requirements": { + "minimumServer": null, + "topology": "STANDALONE" + } +} diff --git a/core/src/test/resources/dev/morphia/test/aggregation/stages/fill/fillDataForDistinctPartitions/action.json b/core/src/test/resources/dev/morphia/test/aggregation/stages/fill/fillDataForDistinctPartitions/action.json deleted file mode 100644 index ca7d241c952..00000000000 --- a/core/src/test/resources/dev/morphia/test/aggregation/stages/fill/fillDataForDistinctPartitions/action.json +++ /dev/null @@ -1,13 +0,0 @@ - [ - { - $fill: - { - partitionBy: { "restaurant": "$restaurant" }, - sortBy: { date: 1 }, - output: - { - "score": { method: "locf" } - } - } - } -] \ No newline at end of file diff --git a/core/src/test/resources/dev/morphia/test/aggregation/stages/fill/fillDataForDistinctPartitions/data.json b/core/src/test/resources/dev/morphia/test/aggregation/stages/fill/fillDataForDistinctPartitions/data.json deleted file mode 100644 index 10b134d8e54..00000000000 --- a/core/src/test/resources/dev/morphia/test/aggregation/stages/fill/fillDataForDistinctPartitions/data.json +++ /dev/null @@ -1,8 +0,0 @@ -{ date: ISODate("2021-03-08"), restaurant: "Joe's Pizza", score: 90 }, -{ date: ISODate("2021-03-08"), restaurant: "Sally's Deli", score: 75 }, -{ date: ISODate("2021-03-09"), restaurant: "Joe's Pizza", score: 92 }, -{ date: ISODate("2021-03-09"), restaurant: "Sally's Deli" }, -{ date: ISODate("2021-03-10"), restaurant: "Joe's Pizza" }, -{ date: ISODate("2021-03-10"), restaurant: "Sally's Deli", score: 68 }, -{ date: ISODate("2021-03-11"), restaurant: "Joe's Pizza", score: 93 }, -{ date: ISODate("2021-03-11"), restaurant: "Sally's Deli" } \ No newline at end of file diff --git a/core/src/test/resources/dev/morphia/test/aggregation/stages/fill/fillDataForDistinctPartitions/expected.json b/core/src/test/resources/dev/morphia/test/aggregation/stages/fill/fillDataForDistinctPartitions/expected.json deleted file mode 100644 index 4d13a5ae674..00000000000 --- a/core/src/test/resources/dev/morphia/test/aggregation/stages/fill/fillDataForDistinctPartitions/expected.json +++ /dev/null @@ -1,8 +0,0 @@ -{ _id: ObjectId("620559f4394d47411658b58f"), date: ISODate("2021-03-08T00:00:00.000Z"), restaurant: "Joe's Pizza", score: 90 }, -{ _id: ObjectId("620559f4394d47411658b591"), date: ISODate("2021-03-09T00:00:00.000Z"), restaurant: "Joe's Pizza", score: 92 }, -{ _id: ObjectId("620559f4394d47411658b593"), date: ISODate("2021-03-10T00:00:00.000Z"), restaurant: "Joe's Pizza", score: 92 }, -{ _id: ObjectId("620559f4394d47411658b595"), date: ISODate("2021-03-11T00:00:00.000Z"), restaurant: "Joe's Pizza", score: 93 }, -{ _id: ObjectId("620559f4394d47411658b590"), date: ISODate("2021-03-08T00:00:00.000Z"), restaurant: "Sally's Deli", score: 75 }, -{ _id: ObjectId("620559f4394d47411658b592"), date: ISODate("2021-03-09T00:00:00.000Z"), restaurant: "Sally's Deli", score: 75 }, -{ _id: ObjectId("620559f4394d47411658b594"), date: ISODate("2021-03-10T00:00:00.000Z"), restaurant: "Sally's Deli", score: 68 }, -{ _id: ObjectId("620559f4394d47411658b596"), date: ISODate("2021-03-11T00:00:00.000Z"), restaurant: "Sally's Deli", score: 68 } \ No newline at end of file diff --git a/core/src/test/resources/dev/morphia/test/aggregation/stages/fill/fillDataForDistinctPartitions/name b/core/src/test/resources/dev/morphia/test/aggregation/stages/fill/fillDataForDistinctPartitions/name deleted file mode 100644 index e57b5680ba6..00000000000 --- a/core/src/test/resources/dev/morphia/test/aggregation/stages/fill/fillDataForDistinctPartitions/name +++ /dev/null @@ -1 +0,0 @@ -Fill Data for Distinct Partitions \ No newline at end of file diff --git a/core/src/test/resources/dev/morphia/test/aggregation/stages/fill/fillDataForDistinctPartitions/scenario.json b/core/src/test/resources/dev/morphia/test/aggregation/stages/fill/fillDataForDistinctPartitions/scenario.json new file mode 100644 index 00000000000..9c38b3ba49e --- /dev/null +++ b/core/src/test/resources/dev/morphia/test/aggregation/stages/fill/fillDataForDistinctPartitions/scenario.json @@ -0,0 +1,428 @@ +{ + "schemaVersion": { + "$numberInt": "1" + }, + "name": "aggregation/stages/fill/fillDataForDistinctPartitions", + "title": "Fill Data for Distinct Partitions", + "context": "STAGE", + "source": { + "repository": "mongodb/docs", + "commit": "7861c1d4feb4d9f24c13e764f4e0e8f71fa01d5a", + "path": "source/reference/operator/aggregation/fill.txt", + "blob": "b0ee7dd39cf46de21e670976d3f6842a77c293ef" + }, + "dataset": null, + "collections": { + "restaurantReviewsMultiple": [ + { + "date": { + "$date": { + "$numberLong": "1615161600000" + } + }, + "restaurant": "Joe's Pizza", + "score": { + "$numberInt": "90" + } + }, + { + "date": { + "$date": { + "$numberLong": "1615161600000" + } + }, + "restaurant": "Sally's Deli", + "score": { + "$numberInt": "75" + } + }, + { + "date": { + "$date": { + "$numberLong": "1615248000000" + } + }, + "restaurant": "Joe's Pizza", + "score": { + "$numberInt": "92" + } + }, + { + "date": { + "$date": { + "$numberLong": "1615248000000" + } + }, + "restaurant": "Sally's Deli" + }, + { + "date": { + "$date": { + "$numberLong": "1615334400000" + } + }, + "restaurant": "Joe's Pizza" + }, + { + "date": { + "$date": { + "$numberLong": "1615334400000" + } + }, + "restaurant": "Sally's Deli", + "score": { + "$numberInt": "68" + } + }, + { + "date": { + "$date": { + "$numberLong": "1615420800000" + } + }, + "restaurant": "Joe's Pizza", + "score": { + "$numberInt": "93" + } + }, + { + "date": { + "$date": { + "$numberLong": "1615420800000" + } + }, + "restaurant": "Sally's Deli" + } + ] + }, + "indexes": [], + "action": { + "kind": "aggregate", + "collection": "restaurantReviewsMultiple", + "pipeline": [ + { + "$fill": { + "sortBy": { + "date": { + "$numberInt": "1" + } + }, + "partitionBy": { + "restaurant": "$restaurant" + }, + "output": { + "score": { + "method": "locf" + } + } + } + } + ] + }, + "expected": { + "printed": [ + { + "document": [ + { + "name": "_id", + "value": { + "exact": { + "$oid": "620559f4394d47411658b58f" + } + } + }, + { + "name": "date", + "value": { + "exact": { + "$date": { + "$numberLong": "1615161600000" + } + } + } + }, + { + "name": "restaurant", + "value": { + "text": "Joe's Pizza" + } + }, + { + "name": "score", + "value": { + "whole": { + "$numberInt": "90" + } + } + } + ] + }, + { + "document": [ + { + "name": "_id", + "value": { + "exact": { + "$oid": "620559f4394d47411658b591" + } + } + }, + { + "name": "date", + "value": { + "exact": { + "$date": { + "$numberLong": "1615248000000" + } + } + } + }, + { + "name": "restaurant", + "value": { + "text": "Joe's Pizza" + } + }, + { + "name": "score", + "value": { + "whole": { + "$numberInt": "92" + } + } + } + ] + }, + { + "document": [ + { + "name": "_id", + "value": { + "exact": { + "$oid": "620559f4394d47411658b593" + } + } + }, + { + "name": "date", + "value": { + "exact": { + "$date": { + "$numberLong": "1615334400000" + } + } + } + }, + { + "name": "restaurant", + "value": { + "text": "Joe's Pizza" + } + }, + { + "name": "score", + "value": { + "whole": { + "$numberInt": "92" + } + } + } + ] + }, + { + "document": [ + { + "name": "_id", + "value": { + "exact": { + "$oid": "620559f4394d47411658b595" + } + } + }, + { + "name": "date", + "value": { + "exact": { + "$date": { + "$numberLong": "1615420800000" + } + } + } + }, + { + "name": "restaurant", + "value": { + "text": "Joe's Pizza" + } + }, + { + "name": "score", + "value": { + "whole": { + "$numberInt": "93" + } + } + } + ] + }, + { + "document": [ + { + "name": "_id", + "value": { + "exact": { + "$oid": "620559f4394d47411658b590" + } + } + }, + { + "name": "date", + "value": { + "exact": { + "$date": { + "$numberLong": "1615161600000" + } + } + } + }, + { + "name": "restaurant", + "value": { + "text": "Sally's Deli" + } + }, + { + "name": "score", + "value": { + "whole": { + "$numberInt": "75" + } + } + } + ] + }, + { + "document": [ + { + "name": "_id", + "value": { + "exact": { + "$oid": "620559f4394d47411658b592" + } + } + }, + { + "name": "date", + "value": { + "exact": { + "$date": { + "$numberLong": "1615248000000" + } + } + } + }, + { + "name": "restaurant", + "value": { + "text": "Sally's Deli" + } + }, + { + "name": "score", + "value": { + "whole": { + "$numberInt": "75" + } + } + } + ] + }, + { + "document": [ + { + "name": "_id", + "value": { + "exact": { + "$oid": "620559f4394d47411658b594" + } + } + }, + { + "name": "date", + "value": { + "exact": { + "$date": { + "$numberLong": "1615334400000" + } + } + } + }, + { + "name": "restaurant", + "value": { + "text": "Sally's Deli" + } + }, + { + "name": "score", + "value": { + "whole": { + "$numberInt": "68" + } + } + } + ] + }, + { + "document": [ + { + "name": "_id", + "value": { + "exact": { + "$oid": "620559f4394d47411658b596" + } + } + }, + { + "name": "date", + "value": { + "exact": { + "$date": { + "$numberLong": "1615420800000" + } + } + } + }, + { + "name": "restaurant", + "value": { + "text": "Sally's Deli" + } + }, + { + "name": "score", + "value": { + "whole": { + "$numberInt": "68" + } + } + } + ] + } + ] + }, + "comparison": { + "order": "ORDERED", + "rules": [ + "NAMED_ARGUMENTS" + ], + "ignore": [ + "_id" + ], + "tolerance": null + }, + "requirements": { + "minimumServer": null, + "topology": "STANDALONE" + } +} diff --git a/core/src/test/resources/dev/morphia/test/generated/manifest.json b/core/src/test/resources/dev/morphia/test/generated/manifest.json index 745ee3dfe9a..f89001ec63e 100644 --- a/core/src/test/resources/dev/morphia/test/generated/manifest.json +++ b/core/src/test/resources/dev/morphia/test/generated/manifest.json @@ -139,6 +139,11 @@ "name" : "aggregation/expressions/bottom/findingTheBottomScoreAcrossMultipleGames", "scenario" : "/dev/morphia/test/aggregation/expressions/bottom/findingTheBottomScoreAcrossMultipleGames/scenario.json", "test" : "dev.morphia.test.aggregation.expressions.TestBottom#testFindingTheBottomScoreAcrossMultipleGames" + }, { + "kind" : "CONVERTED", + "name" : "aggregation/expressions/bottomN/computingNBasedOnTheGroupKeyForGroup", + "scenario" : "/dev/morphia/test/aggregation/expressions/bottomN/computingNBasedOnTheGroupKeyForGroup/scenario.json", + "test" : "dev.morphia.test.aggregation.expressions.TestBottomN#testComputingNBasedOnTheGroupKeyForGroup" }, { "kind" : "CONVERTED", "name" : "aggregation/expressions/bottomN/findTheThreeLowestScores", @@ -1039,6 +1044,11 @@ "name" : "aggregation/expressions/top/findTheTopScoreAcrossMultipleGames", "scenario" : "/dev/morphia/test/aggregation/expressions/top/findTheTopScoreAcrossMultipleGames/scenario.json", "test" : "dev.morphia.test.aggregation.expressions.TestTop#testFindTheTopScoreAcrossMultipleGames" + }, { + "kind" : "CONVERTED", + "name" : "aggregation/expressions/topN/computingNBasedOnTheGroupKeyForGroup", + "scenario" : "/dev/morphia/test/aggregation/expressions/topN/computingNBasedOnTheGroupKeyForGroup/scenario.json", + "test" : "dev.morphia.test.aggregation.expressions.TestTopN#testComputingNBasedOnTheGroupKeyForGroup" }, { "kind" : "CONVERTED", "name" : "aggregation/expressions/topN/findTheThreeHighestScores", @@ -1134,6 +1144,11 @@ "name" : "aggregation/stages/documents/useADocumentsStageInALookupStage", "scenario" : "/dev/morphia/test/aggregation/stages/documents/useADocumentsStageInALookupStage/scenario.json", "test" : "dev.morphia.test.aggregation.stages.TestDocuments#testUseADocumentsStageInALookupStage" + }, { + "kind" : "CONVERTED", + "name" : "aggregation/stages/fill/fillDataForDistinctPartitions", + "scenario" : "/dev/morphia/test/aggregation/stages/fill/fillDataForDistinctPartitions/scenario.json", + "test" : "dev.morphia.test.aggregation.stages.TestFill#testFillDataForDistinctPartitions" }, { "kind" : "CONVERTED", "name" : "aggregation/stages/fill/fillMissingFieldValuesBasedOnTheLastObservedValue", @@ -1851,6 +1866,10 @@ "owner" : "GENERATED", "path" : "src/test/resources/dev/morphia/test/aggregation/expressions/bottom/findingTheBottomScoreAcrossMultipleGames/scenario.json", "sha256" : "cca76fae04096bf4a4fcaa7a6802b8545b0abe970c3676fbf0f6aeb7db65c4cb" + }, { + "owner" : "GENERATED", + "path" : "src/test/resources/dev/morphia/test/aggregation/expressions/bottomN/computingNBasedOnTheGroupKeyForGroup/scenario.json", + "sha256" : "063314d34265b88246c266f43032cd89ed353365cd635154f4f61f128db14d9e" }, { "owner" : "GENERATED", "path" : "src/test/resources/dev/morphia/test/aggregation/expressions/bottomN/findTheThreeLowestScores/scenario.json", @@ -2567,6 +2586,10 @@ "owner" : "GENERATED", "path" : "src/test/resources/dev/morphia/test/aggregation/expressions/top/findTheTopScoreAcrossMultipleGames/scenario.json", "sha256" : "46621c13739291528010a1b86c592690e6f8349e3818452beb5909421b430cab" + }, { + "owner" : "GENERATED", + "path" : "src/test/resources/dev/morphia/test/aggregation/expressions/topN/computingNBasedOnTheGroupKeyForGroup/scenario.json", + "sha256" : "6312a806297990f0e1e227b93da0dcbfd3d15acc16aef67a4d3d9c183a619513" }, { "owner" : "GENERATED", "path" : "src/test/resources/dev/morphia/test/aggregation/expressions/topN/findTheThreeHighestScores/scenario.json", @@ -2643,6 +2666,10 @@ "owner" : "GENERATED", "path" : "src/test/resources/dev/morphia/test/aggregation/stages/documents/useADocumentsStageInALookupStage/scenario.json", "sha256" : "41f547604b64f2d32549bb7fc1b1734b28f0dcc5484ef33b6be66b4cc9b7b094" + }, { + "owner" : "GENERATED", + "path" : "src/test/resources/dev/morphia/test/aggregation/stages/fill/fillDataForDistinctPartitions/scenario.json", + "sha256" : "b2fb054467af88928f55a87d75e08ac45707cac830bbf652c37d2d0a502e652b" }, { "owner" : "GENERATED", "path" : "src/test/resources/dev/morphia/test/aggregation/stages/fill/fillMissingFieldValuesBasedOnTheLastObservedValue/scenario.json", diff --git a/design/operator-audits-progress.md b/design/operator-audits-progress.md index 1b8fadbc203..f55c8f5a30c 100644 --- a/design/operator-audits-progress.md +++ b/design/operator-audits-progress.md @@ -18,8 +18,8 @@ how the audits work updates it too; this file records what each PR delivered. Every step of the plan (0–7) has been started. What stands: -- **On the runner:** 346 legacy cases (345 converted, 1 migrated), plus 1 generated case. - Core gate: 662 tests under each mapper; audits: 448. +- **On the runner:** 349 legacy cases (348 converted, 1 migrated), plus 1 generated case. + Core gate: 662 tests under each mapper; audits: 452. - **Generation:** inventory of mongodb/docs `e4b0c153` (197 pages read; 300 examples owned, 32 unowned, 11 unnamed), reviewed DSL bindings checked against core's API, and the candidate → integrate → promote path. One expressions case is generated, and three are @@ -47,13 +47,13 @@ Step 5, generation and cutover: `$deserializeEJSON`, `$toObject`, `$reduce` `valueAs`). - **Find and update generation.** Only aggregation pipelines are generated. - **Reviewed names** for the 11 examples with generic titles. -- **The remaining legacy fixtures:** 210 directories. +- **The remaining legacy fixtures:** 207 directories. - 98 are locked; 96 are unresolved in `form-review.json`. - - 28 are legacy-only in `cutover.json`, the `$graphLookup` pair among them (#4562, an + - 25 are legacy-only in `cutover.json`, the `$graphLookup` pair among them (#4562, an unordered-array comparison). - 81 never-locked fixtures have no pinned reference. - **Deferred cutover features:** documented projections (`findOptions`), indexes, alternative - commands, and `$topN`/`$bottomN`/`$fill` key order. + commands. Step 6, monitoring: - **An accepted production baseline for capability discovery.** It is needed before @@ -2545,3 +2545,14 @@ no product-documentation changes. Legacy operator AsciiDoc tables are intentiona missing and there is something to publish; a closed one stops publication. `PublishMainKt` takes the pom as an argument, and the policy no longer names a milestone. - The gateway may now also POST `repos/O/R/milestones`; the job's `issues: write` covers it. + +## Cutover retry: named-argument key order (2026-11-23) + +- Branch audits-named-arguments, from the #4548 finding. `$topN`, `$bottomN` (computing `n` from + the group key) and `$fill` (distinct partitions) were legacy-only with a key-order difference. + The pages order these named arguments inconsistently (two `$topN` examples print + `output, sortBy, n`, this one `output, n, sortBy`), so reordering Morphia's output would break + the passing cases. All three already declare `NAMED_ARGUMENTS`, and on retry they convert and + pass under both mappers; removing the rule from the `$topN` scenario makes it fail with + "serialization differs", so the check is live. +- Totals: ledger 349 cases; 25 legacy-only; form report 6 overrides; 207 legacy directories.