The `agents actor run` and `actor_run` Typer commands wrapped their main
try/except around `_resolve_config_files` with a bare `except
click.exceptions.Exit: raise` clause to let resolver-raised exits
propagate cleanly. Modern Typer re-exports `typer.Exit` from its vendored
click (`typer._click.exceptions.Exit`), which is NOT a subclass of
`click.exceptions.Exit`. So `_resolve_config_files`'s
`raise typer.Exit(code=2)` for unknown-actor / no-config-data / bad-blob
cases fell through to the generic `except Exception` clause, which
re-raised as `typer.Exit(code=3)` and replaced the targeted stderr
("not found in registry") with a generic "Unexpected error" message.
Behave scenarios at `actor_run_signature.feature:38` and `:56` and three
Robot integration scenarios verified the original exit-code/message
contract and failed. Catch `(typer.Exit, click.exceptions.Exit)` instead.
The five errored scenarios in `actor_run_signature_resolve_steps.py` and
`actor_run_signature_security_steps.py` had the same root cause from the
test side: `except (SystemExit, click.exceptions.Exit)` could not catch
the raised `typer.Exit`. Widen the tuple to include `typer.Exit`.
memory_service.py's `SQLChatMessageHistory(connection_string=...)` call
broke against langchain-community 0.4.2: the keyword was renamed
`connection` (which now accepts a URL string OR an Engine). Update the
call site and refresh the local `typings/langchain_community/...`
pyright stub to match the upstream signature so typecheck stays clean.
ISSUES CLOSED: #10921
Three step patterns in pyyaml_security_steps.py clashed with existing
step files, causing all Behave features to error at load time:
- "I call load_yaml_text with YAML text" clashed with actor_config_coverage_boost_steps.py:103
- "the load_yaml_text result should have key" clashed with actor_config_coverage_boost_steps.py:90
- "a ValueError should be raised" clashed with lsp_registry_steps.py:475
Rename all three to unique patterns and update pyyaml_security.feature
to match. Also fix typings/behave/runner.pyi ruff format (.pyi convention:
single blank line before class, no blank lines between stub methods) and
add missing fastapi>=0.100.0 to pyproject.toml (asgi_app.py imports
fastapi but it was absent from declared dependencies, causing typecheck
and integration test failures).
Refs: #9055
Remove ``# type: ignore[import-untyped]`` comments from features/steps/pyyaml_security_steps.py, replacing them with proper .pyi stubs for behave.runner.Context in typings/behave/runner.pyi.
Refs: #9055
Remove duplicate except ImportError blocks in cloud_resources_steps.py
(B025 violations in step_sandbox_create, step_sandbox_commit,
step_sandbox_rollback). Apply ruff format to 5 files flagged by the
format check.
- Extract AWS-specific logic into cloud_aws.py and cloud_providers.py to keep all files under the 500-line limit (cloud.py: 490 lines, cloud_aws.py: 498 lines, cloud_providers.py: 181 lines)
- Fix sandbox test regression: change cloud_resources.feature sandbox create scenario from "aws" to "gcp" provider (AWS no longer raises NotImplementedError)
- Add ImportError handling to step_sandbox_create/commit/rollback in cloud_resources_steps.py
- Remove all 9 type: ignore comments from production code using proper type narrowing and boto3/botocore type stubs in typings/
- Move plan_id validation before logger.info() in all three sandbox methods (fail-fast principle)
- Fix exception suppression: discover_aws_resources() now propagates exceptions instead of catching bare Exception
- Move deferred imports (PhysVirt, ResourceCapabilities, _derive_child_id) to module level in cloud_aws.py
- Split cloud_aws_sdk_steps.py (755 lines) into focused modules: cloud_aws_helpers.py, cloud_aws_session_steps.py, cloud_aws_discover_steps.py, cloud_aws_sandbox_steps.py
- Add CHANGELOG.md entry for AWS SDK integration feature
- Update robot/helper_cloud_resources.py to handle ImportError/ NotImplementedError for AWS sandbox operations
ISSUES CLOSED: #1021