Skip to content

Canonicalize relation endpoint types when parsing Schema - #215

Merged
arrry-hydraDB merged 1 commit into
hydra-db:mainfrom
kruschdev:fix/schema-canonical-endpoint-types
Nov 16, 2026
Merged

arrry-hydraDB merged 1 commit into
hydra-db:mainfrom
kruschdev:fix/schema-canonical-endpoint-types

Conversation

@kruschdev

@kruschdev kruschdev commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Canonicalize and deduplicate relation.from.types and relation.to.types through canonical_entity_type / canonicalEntityType when schema.entities is non-empty in src/selfgraph/schema.py and typescript/src/schema.ts, matching EntityType.parent while leaving open schemas (entities == []) unchanged.
  • Ensure to_ossie, to_neo4j_ontology, render_schema_catalog, and schema warnings emit declared entity type names without touching _export.py or export.ts (clean alongside Preserve custom targets in Ossie export #116).
  • Add regression tests in tests/test_schema.py, typescript/test/schema.test.ts, and cross-language conformance (typescript/test/conformance/py_side.py and typescript/test/conformance/ts_side.ts).

Linked issue

Closes #214

AI Assistance

Model Effort
Gemini 4 Carbon / Hydrogen High

Checklist

  • Implements an issue a maintainer has /approved.
  • Small and scoped to that issue.
  • Breaking changes described below, or none.

Breaking changes

None.


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

@arrry-hydraDB arrry-hydraDB left a comment •

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@arrry-hydraDB
arrry-hydraDB merged commit a4643d2 into hydra-db:main Nov 16, 2026
16 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.

Schema leaves relation endpoint types un-canonicalized, emitting phantom concepts in Ossie and invalid labels in Neo4j export

2 participants