Skip to content

feat: add workspace hydration primitives#131

Open
radu-mocanu wants to merge 1 commit into
mainfrom
feat/runtime-workspace-hydration
Open

feat: add workspace hydration primitives#131
radu-mocanu wants to merge 1 commit into
mainfrom
feat/runtime-workspace-hydration

Conversation

@radu-mocanu

@radu-mocanu radu-mocanu commented Jun 23, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • add uipath.runtime.workspace: Workspace, WorkspaceRegistryStore, WorkspaceHydrator, and HydrationRuntime/HydrationPolicy for persisting an agent's working directory across executions via job attachments
  • workspace files are stored as Orchestrator attachments and restored on the next run, so they survive suspend/resume
  • attachment names are kept slash-free (reversibly encoded) so files in subdirectories round-trip correctly
  • deletes propagate: a file removed locally is dropped from the registry and not restored (for harnesses that will support file deletion)

depends on UiPath/uipath-python#1744

@radu-mocanu radu-mocanu requested a review from a team as a code owner June 23, 2026 16:27
Copilot AI review requested due to automatic review settings June 23, 2026 16:27

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR introduces workspace hydration primitives to persist a runtime’s working directory across executions by storing workspace files as Orchestrator job attachments and restoring them on subsequent runs (supporting suspend/resume scenarios).

Changes:

  • Added a new uipath.runtime.workspace package containing Workspace, WorkspaceRegistryStore, WorkspaceHydrator, and the HydrationRuntime wrapper with HydrationPolicy.
  • Implemented reversible slash-free attachment naming to round-trip nested workspace paths, plus registry merging to propagate local deletions.
  • Added a new test suite covering hydrate/dehydrate behavior, registry reconstruction from parent jobs, attachment name encoding, and persistence policies.

Reviewed changes

Copilot reviewed 8 out of 9 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
uv.lock Updates locked dependency versions (notably uipath-core) and lock options.
pyproject.toml Bumps project version and updates the uipath-core dependency constraint.
src/uipath/runtime/__init__.py Re-exports workspace hydration primitives as part of the public runtime API.
src/uipath/runtime/workspace/__init__.py Defines the public surface of the new workspace subpackage (__all__).
src/uipath/runtime/workspace/workspace.py Adds workspace lifecycle management (create, dispose).
src/uipath/runtime/workspace/registry_store.py Adds storage-backed registry persistence for attachment metadata.
src/uipath/runtime/workspace/hydrator.py Implements attachment-backed hydrate/dehydrate, registry discovery from jobs, and path encoding/validation.
src/uipath/runtime/workspace/hydration.py Adds the runtime wrapper (HydrationRuntime) and policy-based persistence behavior.
tests/workspace/test_workspace_hydration.py Adds tests for the new workspace hydration and persistence behavior.

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

Comment thread src/uipath/runtime/workspace/hydrator.py
Comment thread src/uipath/runtime/workspace/hydration.py
@radu-mocanu radu-mocanu force-pushed the feat/runtime-workspace-hydration branch from ee09cb7 to 81234fe Compare June 23, 2026 16:34
@radu-mocanu radu-mocanu force-pushed the feat/runtime-workspace-hydration branch from 81234fe to e853dbf Compare June 23, 2026 16:38
@sonarqubecloud

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants