Skip to content

Drop always-id match_field from ListPathSegment runtime metadata#1241

Open
ellisandrews-toast wants to merge 1 commit into
block:mainfrom
ellisandrews-toast:drop-match-field-from-list-path-segment
Open

Drop always-id match_field from ListPathSegment runtime metadata#1241
ellisandrews-toast wants to merge 1 commit into
block:mainfrom
ellisandrews-toast:drop-match-field-from-list-path-segment

Conversation

@ellisandrews-toast
Copy link
Copy Markdown
Contributor

What

Removes the match_field attribute from ListPathSegment in the runtime metadata, and switches the list-vs-object segment discriminator in SourcedFromNestedPathSegment.from_hash from match_field to source_field.

Why

match_field was always "id" — ElasticGraph relationships join on id via foreign keys, so the value carried no information. Serializing a constant into runtime metadata adds noise without value, and keeping it would have meant emitting match_field: "id" into runtime_metadata.yaml once nested sourced paths are actually populated.

This mirrors the equivalent cleanup already applied to the schema-definition PathSegment in #1238. The match is now implicit: list elements are matched on id against the value at source_field. If non-id primary keys are supported in the future, the field can be reintroduced then.

Scope / risk

Low. ListPathSegment is not yet constructed by any production code — only by the round-trip serialization unit test — so there is no schema-artifact churn and nothing downstream consumes the removed field. Specs and type checks pass.

@myronmarston myronmarston enabled auto-merge (squash) June 8, 2026 17:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants