Repository navigation
Review the generic and ambiguous example names - #4573
Open
evanchooly wants to merge 1 commit into
Open
evanchooly wants to merge 1 commit into
evanchooly wants to merge 1 commit into
Conversation
example-names.json gives 30 examples titled main a descriptive name and picks the owner of 4 examples that several legacy variants match. Each review is keyed by page, title and action digest, so an example that changes upstream comes back for review; stale reviews are counted. The generator uses a reviewed name as the case's title, turns hyphenated page names into valid class names, and declares NAMED_ARGUMENTS for the named-argument operators it emits, since Morphia picks their order. One more case is generated, integrated under both mappers and promoted.
This was referenced Nov 23, 2026
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.
Step 5 of the operator-audit plan: reviewed names. Stacked on #4572.
Problem
After #4570 the inventory had 30 unnamed and 4 ambiguous examples, and neither kind can be generated or tracked:
mainfrom the extractor, for example$median's "calculate the median rating by year" pipeline.bucketAuto's "Multi-Faceted Aggregation" matches bothmultiFacetedAggregationandmultiFacetedAggregationAsPipeline.Change
audits/catalog/example-names.jsonholds the reviews. Each is keyed by page, title and the action block's SHA-256, and holds either anameor anowner, never both, plus areason:median→ "Calculate the Median Rating by Year" andsum→ "Total the Votes by Rating";bucketAuto,currentOp(replica-set variant),planCacheStatsandproject. The variants keep their own tests.reviews.stale(summary and discovery report), and the example goes back to UNNAMED or AMBIGUOUS. Ambiguous examples now keep their source blocks, so they can be reviewed.@DisplayName;maxN-array-elementbecomesTestMaxNArrayElement, where it used to produce an invalid class name;NAMED_ARGUMENTSfor every named-argument operator it emits. Integration showed Morphia writes$maxNas{input, n}where the page writes{n, input}. The server ignores that order, and the generator can't know Morphia's, so the reviewed rule applies. This also adds the rule to the 10 cases from Generate $match, $group and $sort pipelines and sample-dataset cases #4572.Decisions for review
example-names.json. A name says what the pipeline does; an owner is the fixture whose name matches the example, with the variants noted in the reason.NAMED_ARGUMENTSis declared by operator, not by observed difference. The alternative, declaring it only when a generated case fails on key order, would need a second integration round for each case.Result
One more generated case:
maxN-array-element, "Find the Top Two Cast Members". It was integrated under both mappers and promoted, for 12 generated cases in all. The remaining gaps for named examples are bindings:$first,$push,$addToSet,$median,$limit,$setWindowFields,$similarity*, and others.Verification
GeneratorTest.reviewedNamesResolveGenericTitlescovers: a name applied, its stem and display name, a stale review counted, and a review with both a name and an owner rejected.Self-reviewed only: the independent reviewers are out of quota until 2026-11-26.