Repository navigation
Classify section blocks by the shell grammar - #4586
Open
evanchooly wants to merge 1 commit into
Open
evanchooly wants to merge 1 commit into
evanchooly wants to merge 1 commit into
Conversation
Section assembly accepted one trailing command and one trailing result per section, required shared setup to be setup only, and never seeded from a displayed document. Most operator pages failed one of those rules, so few had a runnable scenario. Each block now takes its role from what the shell processor makes of it alongside the setup before it: setup, an action (its own scenario), the result printed right after a read, or a candidate seed. Seeds are settled per scenario against the setup it runs. Syntax templates, displayed expressions, unreadable results, mixed blocks and similar source are skipped and recorded with a reason. selected-content branches are owners and read like tabs; code-block options no longer stick to the language; JSON-labeled results are accepted.
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 1 of retiring the legacy RST extractor. Stacked on #4583.
Problem
The structured scenario extractor is meant to take over the example inventory from the line-based RST extractor, but its section-assembly rules rejected most operator pages:
db.collection.updateOne({ <query selector> }, ...)) or ran two queries was rejected.$acos: "Consider atrigonometrycollection that contains:{ ... }") never became runnable, since a displayed document was never inserted.javascript\n:copyable: true),json-labeled results were refused, andselected-contentbranches andextractcontainers made scenarios unresolved.Over all 297 operator pages, with a draft plan built from each page's own headings, only 250 scenarios normalized, against the 582 examples in the legacy inventory.
Change
SectionProgramsclassifies each block by what the shell processor makes of it, read with the setup accepted before it:Skipped source is kept on the scenario (
skipped) or the page (sharedSetupSkipped). The reasons areSYNTAX_TEMPLATE,OPERATOR_EXPRESSION,SAMPLE_DOCUMENT,UPDATE_RESULT,UNREADABLE_RESULT,SEVERAL_COMMANDS,MIXED_SECTION_ROLES,TRAILING_SETUPandUNSUPPORTED_SOURCE.Other changes:
Decimal128(...). Those are read through the shell-literal grammar when the extended-JSON reader refuses them.selected-contentbranches are owners, and their selections count toward scenario identity.unlabeledLanguage.design/operator-audits-section-assembly.mdand the design overview are updated.Result
The same 297 pages at docs e4b0c153 now give 598 runnable scenarios, 451 of them with a published result. 508 of the 582 inventory examples match a scenario by title. Of the rest, 14 are examples the generated tests use, and several of those are matcher artifacts, such as titles of "main".
Decisions for review
UPDATE_RESULT. A read after an update in the same section reportsAFTER_EARLIER_WRITEand isn't run alone. Both wait for step 4, where an update's case runs the page's own read.insertOne(...); find(...), is skipped rather than split.Verification
ScenarioExtractionTestcases. New cases cover each role, seeding, skipping, selections and the budgets.Self-reviewed only: the independent reviewers are out of quota until 2026-11-26.