refactor(actor): add return type to _get_services and remove bare except clauses #8670

Merged
HAL9000 merged 3 commits from refactor/add-return-type-get-services into master 2026-06-02 17:51:44 +00:00

3 Commits

Author SHA1 Message Date
HAL9000 0b0a581fdd style(actor): apply ruff format to except clauses and step decorator
CI / push-validation (pull_request) Successful in 22s
CI / lint (pull_request) Successful in 34s
CI / helm (pull_request) Successful in 30s
CI / build (pull_request) Successful in 31s
CI / quality (pull_request) Successful in 47s
CI / typecheck (pull_request) Successful in 1m1s
CI / security (pull_request) Successful in 1m28s
CI / unit_tests (pull_request) Successful in 4m31s
CI / docker (pull_request) Successful in 1m31s
CI / integration_tests (pull_request) Successful in 9m47s
CI / coverage (pull_request) Successful in 8m29s
CI / status-check (pull_request) Successful in 3s
Expand multi-exception tuples in _compute_actor_impact() to one
exception type per line, satisfying ruff format's layout rules.
Collapse single-argument @when() decorator to one line where it fits.

ISSUES CLOSED: #8567
2026-06-02 11:20:47 -04:00
HAL9000 5930bcabf7 fix(actor): inline exception tuples for ruff B030 + E501 compliance
CI / helm (pull_request) Successful in 35s
CI / lint (pull_request) Failing after 44s
CI / build (pull_request) Successful in 42s
CI / typecheck (pull_request) Successful in 1m1s
CI / quality (pull_request) Successful in 1m4s
CI / security (pull_request) Successful in 1m11s
CI / push-validation (pull_request) Successful in 19s
CI / unit_tests (pull_request) Successful in 4m37s
CI / coverage (pull_request) Has been skipped
CI / docker (pull_request) Has been skipped
CI / integration_tests (pull_request) Successful in 8m6s
CI / status-check (pull_request) Failing after 3s
Replace `except _defensive_exc:` with literal exception tuples in all three
except clauses of _compute_actor_impact(). Uses multi-line tuple formatting
to satisfy both ruff B030 (no variable in except clause) and E501 (line length).

ISSUES CLOSED: #8567
2026-06-02 08:44:47 -04:00
HAL9000 ab18e81e4a refactor(actor): add return type to _get_services and remove bare except clauses
- Add return type annotation tuple[Any, Any | None] to _get_services()
- Fix _load_config_text() to catch yaml.YAMLError and TypeError instead
  of ValueError/AttributeError around yaml.safe_load(), preserving the
  user-friendly typer.BadParameter message for malformed YAML input
- Fix _compute_actor_impact() defensive guards to also catch
  CleverAgentsError, OperationalError, and ValidationError in addition
  to AttributeError/RuntimeError, keeping actor removal resilient when
  the database layer is unavailable
- Update CHANGELOG.md with entry under Changed section for issue #8567
- Add features/actor_exception_handling.feature with four Behave scenarios
  covering the exception handling contract changes
- Add features/steps/actor_exception_handling_steps.py with step definitions

ISSUES CLOSED: #8567
2026-06-02 08:44:47 -04:00