Skip to content

Follow the edge endpoint rename, and assert the wire names - #350

Merged
paul-paliychuk merged 1 commit into
v4from
paul/ontology-source-target
Aug 26, 2026
Merged

Follow the edge endpoint rename, and assert the wire names#350
paul-paliychuk merged 1 commit into
v4from
paul/ontology-source-target

Conversation

@paul-paliychuk

Copy link
Copy Markdown
Contributor

Rationale

The v4 contract publishes an edge type's endpoints as source and target — what v3's public API shipped, and what the spec has always specified. v4 had been publishing the internal persisted names. The ontology DSL and its tests are held out of regeneration by .fernignore, so they kept the old names while the generated model moved.

Changes

  • The DSL and its tests use source / target.
  • A second test pins the serialized form, not just attribute read-back.

Impact and risks

  • This must land before the next v4 SDK release. The 4.0.0-alpha.5 train was cancelled at the production gate because of it — nothing published.
  • The existing test could not have caught this. The generated model sets extra="allow", so EdgeSourceTarget(source=…) is accepted even when the declared field is source_entity_type, stored as an extra, and reads back fine. Only serializing shows the name that reaches the API. Of the three SDKs, only TypeScript asserted the wire form, which is why only TypeScript failed — Python and Go reported clean while carrying the same defect.

Invariants

None.

Required configs

None.

The v4 contract publishes an edge type's endpoints as source and target, which
is what v3's public API shipped and what the spec has always said. The DSL and
its tests are held out of regeneration, so they kept the old names while the
generated model moved.

The existing test could not catch that. The generated model allows extra keys,
so constructing it with a name the contract does not have is accepted and reads
back fine; only serializing shows the name that reaches the API. A second test
now pins the serialized form.
@paul-paliychuk
paul-paliychuk merged commit 304d2f1 into v4 Aug 26, 2026
4 checks passed
@paul-paliychuk
paul-paliychuk deleted the paul/ontology-source-target branch August 26, 2026 22:28
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.

1 participant