Skip to content

[WIP] feat(platform): IXP designtime base service [ACTV-89364]#1812

Open
cezara98t wants to merge 4 commits into
mainfrom
feat/ixp-designtime-transport
Open

[WIP] feat(platform): IXP designtime base service [ACTV-89364]#1812
cezara98t wants to merge 4 commits into
mainfrom
feat/ixp-designtime-transport

Conversation

@cezara98t

@cezara98t cezara98t commented Jul 14, 2026

Copy link
Copy Markdown

Context

Part of building the Document Understanding design-time surface in the UiPath Python SDK.
This PR delivers ACTV-89364 — the shared design-time base service (first step).

It's the base service every IXP design-time service (projects, taxonomy, labellings, documents, models) will build on. No service surface yet — base only; an additive platform/document_projects/ subpackage nothing else imports.

What's here

platform/document_projects/IxpDesigntimeService(BaseService) — the du_/api/designtimeapi base service (_base_service.py):

  • Base path + api-version — every call → du_/api/designtimeapi, org/tenant-scoped, api-version=1.0 auto-appended.
  • Strict path encoding — dynamic segments percent-encoded with quote(safe="") (/%2F, space→%20).
  • No retry on writes — POST/PUT/PATCH/upload and DELETE are not retried, so a transient 5xx can't double-create/confirm a design-time mutation. Idempotent GETs keep the platform retry policy.
  • Empty write body → {}; multipart file upload; binary download (bytes, content_type).
  • Sync + async twins; errors via EnrichedException; no FolderContext (IXP is org/tenant-scoped only).

Why a new folder (not documents/)

This adds a new platform/document_projects/ subpackage rather than extending the existing platform/documents/. The two talk to different backend services and share no endpoints, so they're kept as separate service layers:

  • documents/ — DU runtime (du_/api/framework): extraction/classification at execution time.
  • document_projects/ — DU design-time (du_/api/designtimeapi): authoring projects, taxonomy, models.

The folder name mirrors that design-time ↔ runtime split and avoids conflating two unrelated services. The IxpDesigntimeService class name is unchanged — it names the API, not the folder.

Verification

13 pytest-httpx tests pass (url/api-version, encoding, no-retry-on-write, GET retry, multipart, binary, async); ruff + mypy clean.

🤖 Generated with Claude Code

First increment of the IXP design-time Python SDK (epic ACTV-89216, spike
ACTV-89217): the shared transport base every IXP service will build on.

Adds platform/ixp/IxpDesigntimeService(BaseService) encoding the
du_/api/designtimeapi conventions:
- du_/api/designtimeapi base path, org/tenant scoped, mandatory
  api-version=1.0 on every call
- strict path-segment percent-encoding (quote(safe="")) so reserved chars
  survive (/ -> %2F, space -> %20)
- NO retry on non-idempotent writes (POST/PUT/PATCH/upload) or DELETE, matching
  the CLI SDK's zero-retry contract to avoid double-create/confirm on transient
  5xx; idempotent GETs keep the platform retry policy
- empty write body sent as {}; multipart `file` upload; binary download
- sync + async twins; errors via EnrichedException; no FolderContext (IXP is
  org/tenant scoped only)

Additive only: a new platform/ixp/ subpackage nothing else imports yet.
13 pytest-httpx tests; ruff + mypy clean.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 14, 2026 10:39
@github-actions github-actions Bot added test:uipath-langchain Triggers tests in the uipath-langchain-python repository test:uipath-integrations labels Jul 14, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds the initial IXP design-time transport foundation (platform/ixp/) for the du_/api/designtimeapi gateway, intended to be the shared base used by future IXP design-time services.

Changes:

  • Introduces IxpDesigntimeService with endpoint construction (strict segment encoding), mandatory api-version=1.0 parameter handling, and sync/async request helpers.
  • Implements IXP-specific transport behavior: retry only for idempotent GETs, no retries for writes/deletes, plus upload/download helpers.
  • Adds pytest-httpx coverage for URL construction, encoding, retry policy, empty write bodies, multipart upload, binary download, and async parity.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
packages/uipath-platform/src/uipath/platform/ixp/_transport.py New IXP design-time transport base service (sync/async helpers, encoding, api-version, retry policy, upload/download).
packages/uipath-platform/src/uipath/platform/ixp/init.py Exposes the new transport base and constants as the uipath.platform.ixp public surface.
packages/uipath-platform/tests/services/test_ixp_transport.py Adds transport-level tests validating URL/query conventions, encoding, retry behavior, and upload/download helpers.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@staticmethod
def _params(params: Optional[dict[str, Any]]) -> dict[str, Any]:
"""Merge the mandatory ``api-version`` into a request's query params."""
return {"api-version": DESIGNTIME_API_VERSION, **(params or {})}
Comment on lines +122 to +131
scoped_url = self._url.scope_url(str(endpoint), "tenant")
response = self._client.request(
method,
scoped_url,
params=self._params(params),
json=json,
files=files,
headers=self._headers(),
)
return self._raise_for_status(response)
Comment on lines +142 to +152
scoped_url = self._url.scope_url(str(endpoint), "tenant")
response = await self._client_async.request(
method,
scoped_url,
params=self._params(params),
json=json,
files=files,
headers=self._headers(),
)
return self._raise_for_status(response)

Name the design-time service folder after its domain entity rather than
the product acronym, matching the entity-based convention used elsewhere
in platform/ (connections, entities, documents, ...). Pairs cleanly with
the runtime sibling: documents/ (du_/api/framework) is DU runtime,
document_projects/ (du_/api/designtimeapi) is DU design-time.

The IxpDesigntimeService class name is unchanged (it names the API, not
the folder). Only the directory, the import path, and doc references move.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@cezara98t cezara98t changed the title feat(platform): IXP designtime transport foundation [ACTV-89364] [WIP] feat(platform): IXP designtime transport foundation [ACTV-89364] Jul 15, 2026
cezara98t and others added 2 commits July 15, 2026 16:08
The IXP design-time SDK is an independent client of du_/api/designtimeapi;
its implementation should not reference the CLI. Reword the no-retry-on-writes
rationale to stand on its own (a transient 5xx must not double-create/confirm
a design-time mutation) and drop the "matching the CLI SDK" asides from the
transport docstrings and the test docstring. No behavior change.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Match the platform's file-naming convention: every service module is
`_<name>_service.py`, and the shared HTTP base is `common/_base_service.py`
(class BaseService). This module plays the same role one level down — the
base service every IXP design-time service extends — so name it
`_base_service.py` (class IxpDesigntimeService is unchanged). Renames the
matching test file and drops the "transport" framing from the docstrings.
No behavior change.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
88.5% Coverage on New Code (required ≥ 90%)

See analysis details on SonarQube Cloud

@cezara98t cezara98t changed the title [WIP] feat(platform): IXP designtime transport foundation [ACTV-89364] [WIP] feat(platform): IXP designtime base service [ACTV-89364] Jul 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test:uipath-integrations test:uipath-langchain Triggers tests in the uipath-langchain-python repository

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants