Skip to content

Comments

feat: add phase lifecycle to UiPathRuntimeStateEvent#87

Merged
cristipufu merged 1 commit intomainfrom
feat/state-event-phase
Feb 16, 2026
Merged

feat: add phase lifecycle to UiPathRuntimeStateEvent#87
cristipufu merged 1 commit intomainfrom
feat/state-event-phase

Conversation

@cristipufu
Copy link
Member

@cristipufu cristipufu commented Feb 16, 2026

Summary

  • Add UiPathRuntimeStatePhase enum (started, updated, completed, faulted) to track node lifecycle stages in state events
  • Add phase field to UiPathRuntimeStateEvent, defaulting to updated for backward compatibility
  • Add tests for default phase, explicit phase setting, full runtime stream lifecycle, and faulted node scenario
  • Bump version to 0.8.6

Test plan

  • test_state_event_phase_defaults_to_updated — verifies backward compat default
  • test_state_event_phase_can_be_set_explicitly — verifies all enum values
  • test_runtime_stream_emits_phase_lifecycle — full runtime stream with started/updated/completed per node
  • test_runtime_stream_emits_faulted_phase_on_error — node faults mid-stream, verifies started→faulted and early termination
  • mypy, ruff check, ruff format all pass

🤖 Generated with Claude Code

Copilot AI review requested due to automatic review settings February 16, 2026 13:04
@cristipufu cristipufu requested a review from a team as a code owner February 16, 2026 13:04
Copy link

Copilot AI left a comment

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 adds lifecycle phase tracking to runtime state events, enabling consumers to distinguish between node start, update, and completion phases. The feature is backward compatible with a sensible default value.

Changes:

  • Added UiPathRuntimeStatePhase enum with three lifecycle phases: started, updated, completed
  • Added phase field to UiPathRuntimeStateEvent with default value UPDATED for backward compatibility
  • Comprehensive test coverage including default behavior, explicit phase setting, and full lifecycle simulation

Reviewed changes

Copilot reviewed 5 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/uipath/runtime/events/base.py Defines new UiPathRuntimeStatePhase enum and exports it
src/uipath/runtime/events/state.py Adds phase field to UiPathRuntimeStateEvent with backward-compatible default
src/uipath/runtime/events/init.py Exports new UiPathRuntimeStatePhase enum
tests/test_events.py Comprehensive test coverage for phase defaults, explicit setting, and lifecycle simulation
pyproject.toml Version bump to 0.8.6
uv.lock Lockfile update for version 0.8.6

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

Introduce UiPathRuntimeStatePhase enum (started, updated, completed,
faulted) to track node lifecycle in state events. Defaults to "updated"
for backward compatibility. Bump version to 0.8.6.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@cristipufu cristipufu force-pushed the feat/state-event-phase branch from 46220d1 to ebe845a Compare February 16, 2026 13:13
@cristipufu cristipufu merged commit 0b6df31 into main Feb 16, 2026
74 checks passed
@cristipufu cristipufu deleted the feat/state-event-phase branch February 16, 2026 13:18
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