The gap
ir.Parameter appears to be the only lowered node without a Provenance. Two consequences, both observed:
x-sunset promotion is not wired at the parameter position. PromoteDeprecation is called at auth.go:143, content.go:639, operations.go:394, schema.go:1161 and schema.go:1248, but not for parameters (promotion.go:88). So a deprecated parameter has an empty Deprecation while its x-sunset sits unpromoted.
- Parameter origin is erased.
mergeParameters (operations.go:1058-1065) merges path-item parameters into every operation with (in, name) shadowing, which is correct — but nothing afterwards records that a given parameter was inherited rather than declared on the operation. Every other lowered node answers that question through its provenance pointer.
Why it matters
The merge is a genuine improvement over reading a path item's parameters key as an HTTP method, and a consumer wants to keep it. But a consumer that renders or diffs parameters cannot tell an inherited parameter from a declared one, and cannot cite where either came from — which is the one thing provenance exists for.
Suggested fix
Add Provenance to ir.Parameter and stamp it at the declaring position, then wire PromoteDeprecation there.
Found by a study of dexpace/spaceapi adopting morphic IR as its input format (spaceapi#56), 2026-09-05. Related: #418 (non-emitter consumer), #419 (cross-revision identity).
The gap
ir.Parameterappears to be the only lowered node without aProvenance. Two consequences, both observed:x-sunsetpromotion is not wired at the parameter position.PromoteDeprecationis called atauth.go:143,content.go:639,operations.go:394,schema.go:1161andschema.go:1248, but not for parameters (promotion.go:88). So a deprecated parameter has an emptyDeprecationwhile itsx-sunsetsits unpromoted.mergeParameters(operations.go:1058-1065) merges path-item parameters into every operation with(in, name)shadowing, which is correct — but nothing afterwards records that a given parameter was inherited rather than declared on the operation. Every other lowered node answers that question through its provenance pointer.Why it matters
The merge is a genuine improvement over reading a path item's
parameterskey as an HTTP method, and a consumer wants to keep it. But a consumer that renders or diffs parameters cannot tell an inherited parameter from a declared one, and cannot cite where either came from — which is the one thing provenance exists for.Suggested fix
Add
Provenancetoir.Parameterand stamp it at the declaring position, then wirePromoteDeprecationthere.Found by a study of
dexpace/spaceapiadopting morphic IR as its input format (spaceapi#56), 2026-09-05. Related: #418 (non-emitter consumer), #419 (cross-revision identity).