Skip to content

Drop always-id match_field from ListPathSegment runtime metadata#1241

Merged
myronmarston merged 1 commit into
block:mainfrom
ellisandrews-toast:drop-match-field-from-list-path-segment
Jun 8, 2026
Merged

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

Conversation

@ellisandrews-toast

Copy link
Copy Markdown
Collaborator

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
@myronmarston myronmarston merged commit 33ad22e into block:main Jun 8, 2026
32 of 34 checks passed
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