Conversation
Fix relation-as-role-player hydration when TypeDB fetch results include only the nested relation IID/type metadata. These relation references are now built as partial IID-backed instances instead of going through normal constructor validation, which avoids requiring the nested relation's own role players. Also prevent omitted optional roles from retaining class-level `RoleRef` defaults on relation instances. Closes: #126
Add a Docker-in-Docker integration runner pinned to the TypeDB 3.10.4 test environment, make the integration wrappers install dev extras, and repair the Rust proxy integration path so it runs against the pinned TypeDB image.
Pin CI and release workflows to Python 3.13.5. Align development documentation and integration references with TypeDB Server 3.10.4. Constrain the Python driver to typedb-driver 3.10.0, which is compatible with the TypeDB 3.10.x protocol.
Exclude unconstrained optional relation roles from the primary fetch match pattern so relations remain visible when those roles have no players. Fetch optional role players through TypeQL try blocks, but require them normally when filters, role expressions, or ordering reference that role. Closes #127.
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
Collapse the guarded role-player match arm so Rust CI passes with clippy -D warnings.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
9c21f91hydrates relation role-playerreferences by IID.
do not hide relation instances when those roles have no players.
environment used to reproduce and verify both relation-read fixes.
Bugfix of #126
Base commit
9c21f91(fix: hydrate relation role-player references by IID)normalizes omitted optional roles and lets nested relation role players hydrate
as partial IID-backed references.
That matters for this PR because #127 also works in the relation-read path, and
its regression coverage depends on relation hydration preserving missing
optional roles correctly.
Bugfix of #127
Card(0, ...)roles from the primary relation match.tryblocks when present.explicitly reference that role.
manager.all()returns relations both withand without an optional role player.
Driver/Runtime Update
TypeDB Server 3.10.4.
typedb-driver==3.10.0.Verification
uv run --extra dev ruff check --fix .uv run --extra dev ruff format .uv run --extra dev pyright type_bridge/uv run --extra dev pyright tests/uv run --extra dev pytest tests/unit/ -x./test-integration-dind.sh -v --tb=short./test-proxy-integration.sh -v --tb=shortcargo test --manifest-path type-bridge-core/Cargo.toml --all-targetsFocused #127 regression:
Fixes: #126
Fixes: #127