Skip to content

pass: compute a key for matching entities across spec revisions #679

Open

Description

@OmarAlJarrah

Problem

docs/ir/open-questions.md question 5 proposes keeping pointer IDs as structural identity and adding "a derived, name-based correlation key computed by a pass". Nothing computes one, and several consumers need it: IR diffing (#418), stable names across generations (#583), and anything that must detect #678.

The keys that survive the edits where pointers fail are the ones documents already treat as identity:

Entity Key
Operation operationId (unique since #548), else method plus path with variable names erased
Parameter location plus wire name (case-insensitive for headers)
Property wire name, regardless of which allOf branch declares it
Union variant discriminator value, else the target's key, else title
Enum member its value
Component type component name

Proposal

A pass that computes these keys (not stored in the IR unless a consumer needs them there; see #430), with a documented fallback when a key is missing, plus the structural third tier docs/ir/open-questions.md describes for renames. #419 records that such work is blocked on this question.

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority:P3Later emitters, M4 and up, 3.2-only, streaming, webhooks, rare constructstype:featureNew capability or enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions