Repository navigation
Conversation
…-9661] resolve_entity_set fetches overwritten entities by their new name, so the SQL the agent writes uses that name. The routing context still keyed each entry by the original name with overrideEntityName set, which the query engine can only match through a fallback and resolves incorrectly when an overwritten name equals another entity's original name (A->B, B->C, swaps). Key each routing entry by the resolved name instead, without an override. Direct SDK usage and folders-map routing are unchanged. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
There are no active review issues requiring changes to the resolved entity-set routing update.
No open issues 🎉
What changed in this PR
This PR updates resolved entity-set routing in the UiPath Platform SDK to use resolved names directly, avoiding ambiguous lookups for chained or swapped entity overwrites. Direct SDK overwrite routing and folders_map routing remain unchanged.
Changes:
- Build resolved-set routing entries using resolved entity names, without
overrideEntityName. - Update sync and async routing expectations and add a chained-overwrite regression test.
- Bump
uipath-platformto0.3.1and align both lockfiles.
| File | Description |
|---|---|
packages/uipath/uv.lock |
Aligns the platform dependency version to 0.3.1. |
packages/uipath-platform/uv.lock |
Updates the local package version to 0.3.1. |
packages/uipath-platform/tests/services/test_entities_service.py |
Updates routing assertions and adds chained-overwrite coverage. |
packages/uipath-platform/src/uipath/platform/entities/_entity_resolution.py |
Keys resolved routing entries by effective entity names. |
packages/uipath-platform/pyproject.toml |
Bumps the platform package version to 0.3.1. |
Review effort: Balanced
|
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.



Summary
resolve_entity_set/resolve_entity_set_v3(used by the Data Fabric and ontology tools inuipath-langchain-python) fetch an overwritten entity by its new name, so the SQL the agent writes uses that name. The routing context, however, keyed each entry by the original name and setoverrideEntityNameto the new one:{ "entityName": "Customers", "overrideEntityName": "Overwritten Customers", "folderId": "…" }The query engine can only match that entry through
overrideEntityName. When an overwritten name equals another entity's original name, the lookup is ambiguous and can read the wrong entity, for exampleA → B, B → C. This was reproduced against the staging query API.Change: in
finalize_resolution_plan, key each routing entry by the resolved name, without an override:{ "entityName": "Overwritten Customers", "folderId": "…" }This is exactly the name the agent's SQL uses, so the query engine resolves it with a plain
entityNamematch. Swaps and chains become unambiguous.Scope
finalize_resolution_plan, sync and async) changes.ContextOverwriteRoutingStrategy) andfolders_maprouting (FoldersMapRoutingStrategy). Their callers write SQL with the original names, so{ entityName: original, overrideEntityName: new }remains correct there.entityNamematch first,overrideEntityNameas fallback).A, B → B, B) cannot be told apart in SQL.Testing
resolve_entity_setrouting tests to expect the resolved name.test_resolve_entity_set_chained_overwrites_route_by_resolved_names(A → B,B → C).uipath-platform: 2057 passed, 11 skipped (LLM integration tests needing credentials); ruff clean.Version bumped to
0.3.1.🤖 Generated with Claude Code