Repository navigation
Backlog
0 / 20 of 2 issues completedBacklog
0 / 20 of 2 issues completed
Copy link
Labels
priority:P0Blocks the first emitter: an IR or plan contract hole, or a valid spec it fails ontype:choreRefactor or cleanup, no behavior change
Description
Goal
One conjunction lowers to one result. A schema's allOf, oneOf and anyOf, and the keywords written beside them, give the same IR wherever each keyword is written, and a spelling that lowers apart is found by a generated case, not by hand.
Problem
Measured at morphic @9be567bdb:
- The cases do not write the spellings the open defects are in. The schema cases move what a case writes as one unit beside a named target. Written by hand, one body in four spellings with no target lowers apart for 15 of 46 keyword units at 3.1.0 (harness: the schema cases move a case's keywords as one unit, so none splits a body across allOf entries #2209).
- A keyword is read off another conjunct only where a list names it. Each keyword read from an
allOfentry was added to a list by hand, and any other is kept verbatim, so the next keyword defaults to kept (openapi: an allOf entry's keyword is read for the position only where a list names it, and any other is kept #2210, with openapi: an items on an allOf entry beside a declared array is kept, where beside the allOf it types the list #2039, openapi: a discriminator on an inline allOf entry is kept verbatim where beside the allOf it is typed #2052 and openapi: a format a conjunct writes beside an allOf principal is kept, not read #2107 as its filed sites). - The rules leave questions open, each filed and settled apart. Twelve
decide whetherissues ask what a conjunction lowers to in a case the rules do not state, and a spelling cannot lower alike while its rule is undecided.
Weighed and set aside
- Reading every keyword as a conjunct of its own, so that no later step could tell two spellings apart. It is not sound. JSON Schema defines
additionalPropertiesby thepropertiesandpatternPropertiesof its own schema object,itemsbyprefixItems,minContainsandmaxContainsbycontains,thenandelsebyif, and the unevaluated keywords by every applicator beside them, so parting one from its object changes what the schema admits. One conjunct per schema object, whichstatement.Statementalready holds, is the form that is sound. - Replacing
mergewith a judge of the source.mergecompares built nodes, where the spellings of each dialect are already one; the source-side admission holds kinds and value sets alone.
Plan
In order. A step waits only on the steps it names.
- What the golden spec reaches: openapi: the info notes of a member fold are reported once per position that composes the same declarations #2067 and openapi: a format a conjunct writes beside an allOf principal is kept, not read #2107 (P0), then openapi: decide whether a union beside a scalar body is the union or the scalar keeping it #2108 and openapi: decide which borrowed detail a folded member keeps where no declaration writes one #2184 (P1). No step below waits on these, and none of these waits on a step below.
- harness: the schema cases move a case's keywords as one unit, so none splits a body across allOf entries #2209, the cases for a body split across entries and for two constructs written apart.
- The open decisions, settled together and written into
docs/compilers/openapi.mdas the ruleconjunction-decisions: openapi: decide whether a null-typed branch listing other enum values is the union's null #1906, openapi: decide whether a node a fold mints takes an ID no branch order moves #1992, openapi: decide whether an allOf naming only the schema itself is a reference loop #2042, openapi: decide whether a 3.0 array's missing items is judged per allOf entry or per conjunction #2048, openapi: decide whether allOf entries that agree on a bound fold it when they disagree on another keyword #2049, pass: decide whether a discriminator mapping to a schema that does not compose its model is refused #2051, openapi: decide whether an allOf whose read is cut short lowers to the top type keeping the allOf rather than to a model #2070, openapi: decide whether the finding for an allOf entry's unread keywords names all of them in one report #2072, openapi: decide whether a union beside a scalar body is the union or the scalar keeping it #2108, openapi: decide whether one union admitting no null takes the null out of the reference a type list beside it gives #2120, openapi: decide which borrowed detail a folded member keeps where no declaration writes one #2184, openapi: decide whether a model's own default or XML hint outranks one a composed model brings #2202. - openapi: an allOf entry's keyword is read for the position only where a list names it, and any other is kept #2210, one table classing every schema keyword, after harness: the schema cases move a case's keywords as one unit, so none splits a body across allOf entries #2209 and before openapi: decide whether a 3.0 array's missing items is judged per allOf entry or per conjunction #2048 and openapi: decide whether allOf entries that agree on a bound fold it when they disagree on another keyword #2049 (which read the table). openapi: an items on an allOf entry beside a declared array is kept, where beside the allOf it types the list #2039 and openapi: a discriminator on an inline allOf entry is kept verbatim where beside the allOf it is typed #2052 follow alongside it.
- openapi: a oneOf beside an allOf whose entry writes an anyOf lowers apart from the two on one schema #2110, after harness: the schema cases move a case's keywords as one unit, so none splits a body across allOf entries #2209: the new cases size the union spellings before one implementation replaces the three.
- Discriminators and the member fold's costs, judgment and details (ir: a discriminator has no home for a route a consumer reads and never writes #1863, openapi: discriminator inference reads nothing of a mapping naming some variants #1798, openapi: a discriminator beside a kept union routing to its own base moves to Unmodeled #1806, openapi: discriminator settlements each walk a shared hierarchy, so the compile goes superlinear #1008, openapi: a hierarchy composing a redeclaring model at every level costs time quadratic in its depth #1993, openapi: a type read through more than 64 alias scalars is decided as though the chain ended there #1994, openapi: two models composing each other can settle one member to two types #1995, openapi: decide which borrowed detail a folded member keeps where no declaration writes one #2184): detail selection (openapi: decide which borrowed detail a folded member keeps where no declaration writes one #2184 and siblings) lands on a
maincarrying fix(compilers/openapi): keep a written detail over a lent one #2185, or moves to a follow-up PR built on fix(compilers/openapi): keep a written detail over a lent one #2185 if fix(compilers/openapi): keep a written detail over a lent one #2185 is not yet onmain.
Out of scope
Each is ranked and scheduled on its own:
- Notes, deprecation and redaction placement on a carrier vs hoisted node (
#2150,#2071,#2195, tracked innotes). - Pass checks and reporting (
#2069,#2178,#2192, pass: default-outside-type is reported once per member carrying one declaration's default #2329), naming hints (#2156), and non-composition follow-up questions (ir: a bound of a value's wire text has no typed home #2330, openapi: statement.Schema.find answers -1 for none #2331, ir: decide whether a patternProperties entry matching a declared member's name also constrains that member #2333, openapi: discriminator inference reads the first variant's layout order, so reordering a schema's properties changes the inferred property #2334, ir: decide how a discriminator routes to a schema that composes its model only as a mixin #2335, openapi: seven walks read a source $ref chain only to a fixed hop count, so a longer valid chain is decided as cut #2336, ir: decide whether a closure over members its own schema object does not declare has an exact spelling #2338, ir: decide whether a format or a content keyword beside a referenced scalar keeps the reference typed where it selects another primitive or names a second encoding #2339, harness: the sequence-order oracle reads a tie over a bound and one over a type at one place alike #2340, ir: decide what a count bound means for a model with a catch-all, Implements or a discriminator #2341, openapi: decide whether enum: [] at 3.0 is refused #2342, harness: decide whether the sequence-order oracle tries orders of three or more declarations beyond the reversal #2343, openapi: decide whether union-null-variant lifts a $ref branch to a null-alone schema #2344, openapi: decide whether a const, an enum, a dynamic or recursive reference, a keyword beside a $ref, or an entry landing on nothing or on false reads as stating a type #2345).
Priority: P0, the tier of its highest open step (#2067, #2107).
Sub-issues
Collapse Sub-issuesSub-issues
Loading 2 sub-issues
Metadata
Metadata
Assignees
Labels
priority:P0Blocks the first emitter: an IR or plan contract hole, or a valid spec it fails ontype:choreRefactor or cleanup, no behavior change
Activity