fix(actor): move namespace filter inside lock in ActorLoader.list_actors #8660

Merged
HAL9000 merged 4 commits from fix/actor-loader-list-actors-race-condition into master 2026-06-02 09:12:04 +00:00

4 Commits

Author SHA1 Message Date
HAL9000 3426720b1e style: apply ruff format to actor_loading_steps.py
CI / build (pull_request) Successful in 34s
CI / helm (pull_request) Successful in 36s
CI / lint (pull_request) Successful in 39s
CI / push-validation (pull_request) Successful in 26s
CI / quality (pull_request) Successful in 47s
CI / typecheck (pull_request) Successful in 56s
CI / security (pull_request) Successful in 1m12s
CI / unit_tests (pull_request) Successful in 7m45s
CI / integration_tests (pull_request) Successful in 8m3s
CI / docker (pull_request) Successful in 1m42s
CI / coverage (pull_request) Successful in 8m26s
CI / status-check (pull_request) Successful in 3s
Wrap long cast() call on line 455 to satisfy ruff line-length=88.

ISSUES CLOSED: #8588
2026-06-02 04:52:51 -04:00
HAL9001 a93ad552b9 fix(lint): reorder imports per PEP 8 ruff/isort rule in actor_loading_steps.py
The typing.cast import was placed after third-party imports (behave),
violating ruff/isort PEP 8 ordering enforced by CI lint. Move it into
the stdlib block before the blank-line separator from third-party.

Fixes CI / lint failure on this branch. Closes #8588
2026-06-02 04:52:51 -04:00
pr-merge-worker 12d8e03708 fix(actor): move namespace filter inside lock in ActorLoader.list_actors
ISSUES CLOSED: #8588

Replace type: ignore suppressions with cast() + getattr() per review feedback.
2026-06-02 04:52:51 -04:00
HAL9000 f7901c404f fix(actor): move namespace filter inside lock in ActorLoader.list_actors
Fixes a race condition (TOCTOU) in ActorLoader.list_actors() where the namespace
filter was applied outside the threading lock, creating a window for concurrent
dictionary modifications. Moving the filter inside the with self._lock: block
ensures atomic reads and filtering.

- Move namespace filtering inside the RLock in list_actors()
- Add concurrency BDD test (threading.Barrier) for list_actors + clear race condition
- Update CHANGELOG.md with fix entry (closes #8588)
- Update CONTRIBUTORS.md with contribution details

ISSUES CLOSED: #8588
2026-06-02 04:52:51 -04:00