Repository navigation
fix(python): match server contract for relationship create and decode - #491
Open
rudycelekli wants to merge 1 commit into
Open
rudycelekli wants to merge 1 commit into
rudycelekli wants to merge 1 commit into
Conversation
POST /graph/relationships (CreateRelationshipRequest) requires `src_id`,
`tgt_id`, `keywords`, `description` and `source_id`, and answers with
`{status, message, relationship: {...}}` whose item uses `src_id`, `tgt_id` and
`relation_type`. The Python SDK sent `source`/`target`/`relationship_type`,
could omit `description` and `source_id`, and failed to validate the wrapped
response.
RelationshipCreate now serializes with server aliases (defaults: description "",
source_id "manual_entry"), Relationship accepts the server field names, and the
sync and async create unwrap the `relationship` envelope.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
rudycelekli
force-pushed
the
fix/python-relationship-create-contract-20261015
branch
from
October 15, 2026 06:37
522e685 to
dca9234
Compare
This branch has not been deployed
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.
Description
Python relationship create does not match the server.
CreateRelationshipRequestrequiressrc_id,tgt_id,keywords,description,source_id(optionalweight,metadata) and answers{status, message, relationship: {...}}with items usingsrc_id,tgt_id,relation_type(relationships_types.rs). The SDK sentsource/target/relationship_type, could omitdescription/source_id, and could not validate the wrapped response.Evidence
New
tests/test_relationship_create_contract.py(3 tests): before3 failed(pydanticmissingvalidation errors), after3 passed. Suite:628 passed, 33 skipped(main: 625 passed).Change
RelationshipCreatekeeps the SDK names but serializes with server aliases (defaultsdescription="",source_id="manual_entry",properties->metadata);Relationshipalso acceptssrc_id/tgt_id/relation_type; sync and asynccreateunwrap therelationshipenvelope.Verified / not verified
636 passed, 33 skipped.RelationshipCreate.descriptionis now a required-by-server string defaulting to""instead ofNone.Type of change
Checklist
The author checklist items from the template are left for the human submitter to tick.
CI note
Security Auditfails onedgequake-mainitself (CI run 38326709329 at da1831c), and theLayer 1 — Static checksum guardjob failed on the recently merged #446. Neither touches SDK code; I did not investigate them here.