Skip to content

fix(sdk): use source_entity/target_entity in Python and Swift entity merge - #490

Open
rudycelekli wants to merge 1 commit into
raphaelmansuy:edgequake-mainfrom
rudycelekli:fix/entity-merge-field-names-20261015
Open

rudycelekli wants to merge 1 commit into
raphaelmansuy:edgequake-mainfrom
rudycelekli:fix/entity-merge-field-names-20261015

Conversation

@rudycelekli

@rudycelekli rudycelekli commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Description

Entity merge requests use the wrong field names. MergeEntitiesRequest (entities_types.rs) requires source_entity and target_entity (optional merge_strategy). Python sent source/target, Swift sent source_name/target_name.

Evidence

  • Python, new tests/test_entity_merge_body.py: before 2 failed, after 2 passed; suite 627 passed, 33 skipped.
  • Swift, new testMergeEntitiesSendsServerFieldNames: before failure ["target_name": "B", "source_name": "A"] is not equal to ["source_entity": "A", "target_entity": "B"]; after swift test: Executed 241 tests, with 22 tests skipped and 0 failures.

Change

Python: MergeEntitiesRequest serializes with server aliases (source_entity, target_entity, merge_strategy), used by both sync and async merge. Swift: body keys renamed.

Verified / not verified

  • Verified: request bodies against mocked transports (Python 3.13, Swift on macOS).
  • Not verified: against a live server; other SDKs (TypeScript, Go, etc.) not audited for this endpoint.

Type of change

  • Bug fix

Checklist

The author checklist items from the template are left for the human submitter to tick.

CI note

Security Audit fails on edgequake-main itself (CI run 38326709329 at da1831c), and the Layer 1 — Static checksum guard job failed on the recently merged #446. Neither touches SDK code; I did not investigate them here.

…merge

POST /api/v1/graph/entities/merge (MergeEntitiesRequest) requires
`source_entity` and `target_entity` (plus optional `merge_strategy`). The Python
SDK sent `source`/`target` and Swift sent `source_name`/`target_name`, so the
server rejected every merge.

Python now serializes the request model with server aliases for both the sync
and async resources; Swift sends the server field names.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
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