Skip to content

skills: no step probes what names a position whose node kind a change alters #1696

Open

Description

@OmarAlJarrah

Problem

A lowering that changes the kind of node a position lowers to, such as a Model becoming a Union, changes it for everything that names the position: a discriminator mapping or an implicit route to it, an allOf composing it as a Base, a $ref from another position. No step in morphic-reviewing-prs' angles, and no lesson in morphic-openapi-compiler, asks a review to compile the changed spelling as each such consumer names it. references/robustness.md#new-route-open-bugs rewrites the open repros of the old route, which finds nothing when the old route's failure was never filed.

The case that showed it: #1688 distributed a union written on an allOf branch, and a union with inline branches beside a body, into a Union of composed models. Below a discriminated base whose mapping routes to the schema, pass.Validate refused the mapping. The same failure already stood on main for $ref branches beside the allOf, unfiled, so the PR's searches found nothing and its review rounds passed it.

openapi: 3.1.0
info: {title: t, version: "1"}
paths: {}
components:
  schemas:
    Pet:
      type: object
      properties: {kind: {type: string}}
      discriminator: {propertyName: kind, mapping: {dog: '#/components/schemas/Dog'}}
    Small: {type: object}
    Big: {type: object}
    Dog:
      allOf:
        - $ref: '#/components/schemas/Pet'
        - oneOf: [{$ref: '#/components/schemas/Small'}, {$ref: '#/components/schemas/Big'}]
morphic validate --verify dog.yaml
main @0610ee63f: exit 0
#1688 @5dea18eee: exit 1, error pass/discriminator-missing-variant t/openapi/components/schemas/Pet: discriminator mapping "dog" on t/openapi/components/schemas/Pet references "t/openapi/components/schemas/Dog", which is not a variant of it

Direction

A draft: a Correctness or Contract step. For each position whose node kind the change alters, compile it as each consumer the IR has for the old kind names it, a mapping and an implicit route, an allOf composing it as Base, a $ref, an encoding key, with --verify, on main and the head, and read every diagnostic.

Related: #1688, #1694

Priority: P4, rule 1 (housekeeping: a skills rule changes no lowering, validation, IR or emit-contract behaviour). The probe above (morphic @5dea18eee and @0610ee63f).

Activity

  1. added
    type:featureNew capability or enhancement
    priority:P4Refactors, tests, CI, hostile-input hardening, cosmetic diagnostics, other formats
    on Nov 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority:P4Refactors, tests, CI, hostile-input hardening, cosmetic diagnostics, other formatstype:featureNew capability or enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions