Skip to content

Conversation

@reiase
Copy link
Contributor

@reiase reiase commented Jan 25, 2026

  • Removed deprecated methods from ActorSystemCoreExt and ActorSystemAdvancedExt to simplify the API.
  • Consolidated actor spawning logic into a single internal method, enhancing clarity and reducing redundancy.
  • Updated usage of actor spawning in tests and examples to utilize the new builder pattern for improved readability and maintainability.
  • Adjusted imports and module structure for better organization and consistency across the codebase.

Overview:

Details:

Where should the reviewer start?

Related Issues: (use one of the action keywords Closes / Fixes / Resolves / Relates to)

  • closes GitHub issue: #xxx

- Removed deprecated methods from `ActorSystemCoreExt` and `ActorSystemAdvancedExt` to simplify the API.
- Consolidated actor spawning logic into a single internal method, enhancing clarity and reducing redundancy.
- Updated usage of actor spawning in tests and examples to utilize the new builder pattern for improved readability and maintainability.
- Adjusted imports and module structure for better organization and consistency across the codebase.
@codecov-commenter
Copy link

codecov-commenter commented Jan 25, 2026

Codecov Report

❌ Patch coverage is 80.44597% with 114 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
python/pulsing/actor/remote.py 63.49% 23 Missing ⚠️
python/pulsing/queue/manager.py 70.00% 21 Missing ⚠️
crates/pulsing-actor/src/actor/traits.rs 68.57% 11 Missing ⚠️
crates/pulsing-actor/src/system/traits.rs 72.50% 11 Missing ⚠️
python/pulsing/topic/broker.py 71.05% 11 Missing ⚠️
crates/pulsing-actor/src/actor/address.rs 88.52% 7 Missing ⚠️
crates/pulsing-actor/src/system/resolve.rs 57.14% 6 Missing ⚠️
crates/pulsing-actor/src/system/mod.rs 54.54% 5 Missing ⚠️
crates/pulsing-actor/src/actor/reference.rs 33.33% 4 Missing ⚠️
crates/pulsing-actor/src/system/handler.rs 57.14% 3 Missing ⚠️
... and 8 more
Files with missing lines Coverage Δ
crates/pulsing-actor/src/behavior/core.rs 71.79% <ø> (+0.90%) ⬆️
crates/pulsing-actor/src/metrics/mod.rs 74.07% <ø> (ø)
crates/pulsing-actor/src/system/config.rs 57.41% <100.00%> (-0.72%) ⬇️
crates/pulsing-actor/src/system_actor/messages.rs 78.57% <100.00%> (+78.57%) ⬆️
crates/pulsing-actor/src/system_actor/mod.rs 73.29% <100.00%> (ø)
crates/pulsing-actor/src/test_helper.rs 86.66% <ø> (ø)
crates/pulsing-actor/src/transport/http2/mod.rs 85.56% <100.00%> (+0.04%) ⬆️
python/pulsing/actor/__init__.py 85.71% <ø> (ø)
python/pulsing/actors/load_stream.py 0.00% <ø> (ø)
python/pulsing/topic/__init__.py 100.00% <ø> (ø)
... and 18 more

... and 2 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

…ptions

- Simplified the handling of lazy actor references by delegating message sending to resolved references, reducing complexity and avoiding recursion.
- Introduced a new `Format` enum for message serialization, supporting binary and JSON formats, with auto-detection capabilities for improved flexibility.
- Updated the `SpawnOptions` and `ResolveOptions` structures to utilize default constructors, enhancing code clarity and consistency.
- Improved error handling in the `SpawnBuilder` for actor name validation, ensuring clearer feedback on invalid paths.
- Adjusted documentation and examples to reflect the new default options and serialization methods.
- Updated the ActorLifecycle struct to replace string-based identifiers with ActorId for both watchers and targets, enhancing type safety and consistency.
- Modified watch and unwatch methods to accept ActorId parameters, streamlining the registration and removal of watchers.
- Adjusted related methods and tests to reflect the new ActorId usage, ensuring proper functionality and improved clarity in actor relationships.
- Enhanced logging to utilize ActorId for better traceability during watch operations.
- Introduced UUID-based ActorId and NodeId, replacing previous numeric identifiers for improved uniqueness and traceability.
- Updated ActorAddress to support new UUID format, ensuring backward compatibility with legacy formats.
- Refactored tests and system components to utilize the new ActorId structure, enhancing clarity and consistency across the codebase.
- Added `uuid` dependency to the project for UUID generation and handling.
- Modified Justfile to include necessary build dependencies for Python and C++ integration.
- Introduced SystemActorProxy and PythonActorServiceProxy for direct method calls, improving interaction with system and service actors.
- Refactored BucketStorage and TopicBroker to utilize remote method support, streamlining actor communication.
- Updated tests to validate new proxy methods and ensure proper functionality across various scenarios.
- Enhanced message serialization and error handling for improved robustness and clarity in actor interactions.
… handling

- Converted StorageManager from an Actor to a remote class, enabling direct method calls.
- Replaced message-based communication with explicit method calls for bucket and topic management.
- Updated related methods to enhance clarity and maintainability, including get_bucket, get_topic, list_buckets, and get_stats.
- Adjusted tests to validate the new proxy method interactions, ensuring proper functionality across scenarios.
import hashlib
import logging
from typing import Any
from typing import TYPE_CHECKING, Any

Check notice

Code scanning / CodeQL

Unused import Note

Import of 'Any' is not used.

Copilot Autofix

AI 2 days ago

To fix the problem, we should remove the unused Any symbol from the import statement while retaining TYPE_CHECKING, which is used later in the file. This avoids an unnecessary dependency and clarifies that only TYPE_CHECKING is required from typing.

Specifically, in python/pulsing/queue/manager.py, update line 6 from from typing import TYPE_CHECKING, Any to from typing import TYPE_CHECKING. No other code changes are needed, since nothing depends on Any in the shown snippet. This preserves all existing functionality and only cleans up the unused import.

Suggested changeset 1
python/pulsing/queue/manager.py

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/python/pulsing/queue/manager.py b/python/pulsing/queue/manager.py
--- a/python/pulsing/queue/manager.py
+++ b/python/pulsing/queue/manager.py
@@ -3,7 +3,7 @@
 import asyncio
 import hashlib
 import logging
-from typing import TYPE_CHECKING, Any
+from typing import TYPE_CHECKING
 
 from pulsing.actor import ActorId, ActorRef, ActorSystem, remote
 
EOF
@@ -3,7 +3,7 @@
import asyncio
import hashlib
import logging
from typing import TYPE_CHECKING, Any
from typing import TYPE_CHECKING

from pulsing.actor import ActorId, ActorRef, ActorSystem, remote

Copilot is powered by AI and may make mistakes. Always verify output.
from typing import Any, AsyncIterator

from pulsing.actor import Actor, ActorId, Message, StreamMessage
from pulsing.actor import ActorId, StreamMessage, remote

Check notice

Code scanning / CodeQL

Unused import Note

Import of 'StreamMessage' is not used.

Copilot Autofix

AI 2 days ago

To fix an unused-import issue, remove the specific unused symbol from the import statement while keeping the used ones. This eliminates the unnecessary dependency and makes the code clearer, without impacting behavior.

In this file, ActorId and remote are used, but StreamMessage is not. The fix is to update the import on line 7 of python/pulsing/queue/storage.py to drop StreamMessage from the imported names. No other code changes are needed: there are no references to StreamMessage in the provided methods, so removing it will not break anything.

Concretely, in python/pulsing/queue/storage.py, find the line:

from pulsing.actor import ActorId, StreamMessage, remote

and change it to:

from pulsing.actor import ActorId, remote

No additional imports, methods, or definitions are required.

Suggested changeset 1
python/pulsing/queue/storage.py

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/python/pulsing/queue/storage.py b/python/pulsing/queue/storage.py
--- a/python/pulsing/queue/storage.py
+++ b/python/pulsing/queue/storage.py
@@ -4,7 +4,7 @@
 import logging
 from typing import Any, AsyncIterator
 
-from pulsing.actor import ActorId, StreamMessage, remote
+from pulsing.actor import ActorId, remote
 
 from .backend import StorageBackend, get_backend_class
 
EOF
@@ -4,7 +4,7 @@
import logging
from typing import Any, AsyncIterator

from pulsing.actor import ActorId, StreamMessage, remote
from pulsing.actor import ActorId, remote

from .backend import StorageBackend, get_backend_class

Copilot is powered by AI and may make mistakes. Always verify output.
@reiase reiase merged commit ec63590 into main Jan 25, 2026
20 of 23 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