feat(entities): choice-set awareness for query engine - #1889
Conversation
b52d62b to
29b3966
Compare
🚨 Heads up:
|
8caae3f to
bbfd17f
Compare
🚨 Heads up:
|
bbfd17f to
0cde6eb
Compare
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
0cde6eb to
96fddec
Compare
|
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
There was a problem hiding this comment.
🟢 Approval recommended
The changes are cohesive, covered by targeted unit tests, and the updated API surface/error classification appears consistent and non-breaking.
Pull request overview
Adds choice-set awareness and richer client-side error classification to the Data Fabric entity query path in uipath-platform, improving both query result usability (labels for choice-set fields) and downstream error handling (stable, actionable categories/codes).
Changes:
- Fix
FieldMetadata.choiceset_idparsing/serialization by accepting multiple server casing variants viaAliasChoices. - Add
resolve_choice_setsoption to entity federated query methods and request-body construction (queryOptions.resolveChoiceSets). - Introduce
DataFabricSqlValidationError+UNSUPPORTED_CONSTRUCTclassification and a unifiedDataFabricError.from_exception()extractor for client/server failures.
File summaries
| File | Description |
|---|---|
| packages/uipath/uv.lock | Bumps editable uipath-platform version reference to 0.2.28. |
| packages/uipath-platform/uv.lock | Updates uipath-platform lock entry to 0.2.28. |
| packages/uipath-platform/pyproject.toml | Bumps package version to 0.2.28. |
| packages/uipath-platform/src/uipath/platform/entities/entities.py | Makes FieldMetadata.choiceset_id resilient to server casing/alias variants and standardizes dump alias. |
| packages/uipath-platform/src/uipath/platform/entities/_entity_data_service.py | Threads resolve_choice_sets through query methods/spec builder; raises structured validation errors with stable codes. |
| packages/uipath-platform/src/uipath/platform/entities/_entities_service.py | Exposes resolve_choice_sets as a public kwarg on sync/async query APIs and documents behavior. |
| packages/uipath-platform/src/uipath/platform/errors/_datafabric_error.py | Adds UNSUPPORTED_CONSTRUCT support, from_exception() unifier, and DataFabricSqlValidationError carrier type. |
| packages/uipath-platform/src/uipath/platform/errors/datafabric_error_codes.py | Introduces UNSUPPORTED_CONSTRUCT category + code set and updates classification table. |
| packages/uipath-platform/tests/services/test_entities_service.py | Adds coverage for resolveChoiceSets request option and FieldMetadata choice-set alias parsing/serialization. |
| packages/uipath-platform/tests/errors/test_datafabric_errors.py | Adds tests for new error codes/category behavior and DataFabricError.from_exception() extraction. |
Review details
- Files reviewed: 8/10 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.



Summary
choiceset_idalias mismatch onEntityFieldso the SDK populates the field correctlyresolve_choice_setsquery option tov1/query/executeso the server returns labels instead of NumberIdsUNSUPPORTED_CONSTRUCTerror category so retry loops stop on impossible query shapesChanges
entities.pychoiceset_idalias:"choicesetId"→AliasChoices("choiceSetId", "choicesetId", "ChoiceSetId")_entity_data_service.pyresolve_choice_setsparam through to_query_entity_records_spec._validate_sql_queryraisesDataFabricSqlValidationErrorwith stable codes_entities_service.pyresolve_choice_setskwarg_datafabric_error.pyDataFabricSqlValidationErrorclass,DataFabricError.from_exception()unified extractor,is_unsupported_constructpropertydatafabric_error_codes.pyUNSUPPORTED_CONSTRUCTcategory with 4 codesTest plan
Ref: DS-8647
🤖 Generated with Claude Code