Skip to content

Expose service state (including a service's statuses) in ServiceManager#106

Merged
CorinChappy merged 22 commits into
mainfrom
cc-service-manager-enhancements
May 20, 2026
Merged

Expose service state (including a service's statuses) in ServiceManager#106
CorinChappy merged 22 commits into
mainfrom
cc-service-manager-enhancements

Conversation

@CorinChappy
Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI review requested due to automatic review settings May 5, 2026 12:06
Copy link
Copy Markdown

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 expands the service-processing API so ServiceManager can expose registered services by name and surface per-service status, while also improving debug output for wrapped services. It fits into the processing layer by making service orchestration more inspectable at runtime.

Changes:

  • Added named service registration/state exposure in ServiceManager, including services, get_service_state, and ManagedServiceState.
  • Added ProcessStatus.UNKNOWN plus manager-side service status reporting for services without native process state.
  • Added __repr__ coverage and implementations for callable, polling, error-handling, and status-tracking service wrappers.

Reviewed changes

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

Show a summary per file
File Description
tests/unit/logicblocks/event/processing/services/test_status.py Adds repr tests for StatusTrackingService.
tests/unit/logicblocks/event/processing/services/test_polling.py Adds repr tests for PollingService.
tests/unit/logicblocks/event/processing/services/test_manager.py Updates manager tests for named mappings and adds service/state/status coverage.
tests/unit/logicblocks/event/processing/services/test_error.py Adds repr tests for ErrorHandlingService.
tests/unit/logicblocks/event/processing/services/test_callable.py Adds repr tests for CallableService.
src/logicblocks/event/processing/services/status.py Adds StatusTrackingService.__repr__.
src/logicblocks/event/processing/services/polling.py Adds PollingService.__repr__.
src/logicblocks/event/processing/services/manager.py Introduces named managed service state, status access, and mapping-based start/services APIs.
src/logicblocks/event/processing/services/error.py Adds ErrorHandlingService.__repr__.
src/logicblocks/event/processing/services/callable.py Adds callable-aware CallableService.__repr__.
src/logicblocks/event/processing/process/base.py Adds ProcessStatus.UNKNOWN.
changelog.d/20260427_110228_corin_cc_service_manager_enhancements.md Documents the new manager/state/status API changes.

Comment thread src/logicblocks/event/processing/process/base.py
Comment thread src/logicblocks/event/processing/services/manager.py
Comment thread src/logicblocks/event/processing/services/manager.py Outdated
Comment thread src/logicblocks/event/processing/services/manager.py Outdated
Comment thread src/logicblocks/event/processing/services/manager.py Outdated
Comment thread src/logicblocks/event/processing/services/manager.py Outdated
@CorinChappy CorinChappy force-pushed the cc-service-manager-enhancements branch 2 times, most recently from 69ff716 to 0fa66d7 Compare May 13, 2026 13:31
@CorinChappy CorinChappy changed the title Expose services and service statuses in ServiceManager Expose service state (including a service's statuses) in ServiceManager May 13, 2026
Copy link
Copy Markdown

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

Copilot reviewed 20 out of 21 changed files in this pull request and generated 2 comments.

Comment thread src/logicblocks/event/processing/services/manager.py Outdated
Comment thread tasks/version.py Outdated
Copy link
Copy Markdown

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

Copilot reviewed 20 out of 21 changed files in this pull request and generated 2 comments.

Comment on lines +11 to +17
def _ids(status: Sequence[ProcessStatus] | ProcessStatus) -> str:
if isinstance(status, ProcessStatus):
return status.value
else:
return "[" + "+".join(s.value for s in status) + "]"


Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Not sure if this is correct but if it is, it seems tests will fail.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

🤔
image

Comment thread src/logicblocks/event/processing/services/manager.py Outdated
Comment thread src/logicblocks/event/processing/services/manager.py Outdated
Comment on lines +11 to +17
def _ids(status: Sequence[ProcessStatus] | ProcessStatus) -> str:
if isinstance(status, ProcessStatus):
return status.value
else:
return "[" + "+".join(s.value for s in status) + "]"


Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Not sure if this is correct but if it is, it seems tests will fail.

Comment thread src/logicblocks/event/processing/services/manager.py
Comment thread src/logicblocks/event/processing/services/manager.py Outdated
Comment on lines +1038 to +1041
services = cast(dict, manager.services)
services["Intruder"] = services["Worker"]

assert "Intruder" not in manager.services
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

😂

Comment thread tasks/version.py
@CorinChappy CorinChappy merged commit f3be29b into main May 20, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants