6c684d920f
CI / lint (pull_request) Successful in 42s
CI / typecheck (pull_request) Successful in 54s
CI / security (pull_request) Successful in 1m7s
CI / push-validation (pull_request) Successful in 38s
CI / helm (pull_request) Successful in 39s
CI / build (pull_request) Successful in 46s
CI / quality (pull_request) Successful in 1m13s
CI / integration_tests (pull_request) Successful in 5m0s
CI / unit_tests (pull_request) Successful in 6m13s
CI / docker (pull_request) Successful in 1m25s
CI / coverage (pull_request) Successful in 11m16s
CI / status-check (pull_request) Successful in 3s
Add 5 BDD scenarios to features/a2a_facade_coverage_boost.feature that exercise previously uncovered paths in src/cleveragents/a2a/facade.py: - _handle_message_send raises ValueError on empty session_id (line 469) - _handle_message_send raises ValueError on empty message (line 471) - _build_actor_resolver_for_session_workflow exception fallback (411-425) - _build_actor_options_resolver_for_session_workflow exception fallback (434-452) - _provider_registry property read (line 160) Pushes overall coverage past the 96.5% slipcover --fail-under threshold that the CI / coverage gate enforces; the prior run was 96.4%.
124 lines
7.1 KiB
Gherkin
124 lines
7.1 KiB
Gherkin
Feature: A2A local facade coverage boost — uncovered validation paths
|
|
As a developer maintaining the A2A local facade
|
|
I want all error-handling and validation paths exercised
|
|
So that edge-case regressions are caught early
|
|
|
|
# ---------------------------------------------------------------
|
|
# Constructor validation (line 82)
|
|
# ---------------------------------------------------------------
|
|
|
|
Scenario: Constructing A2aLocalFacade with a non-dict raises TypeError
|
|
When I try to create an A2aLocalFacade with a non-dict services argument
|
|
Then a TypeError should be raised with message "services must be a dict or None"
|
|
|
|
# ---------------------------------------------------------------
|
|
# plan.execute — empty plan_id with service wired (line 256)
|
|
# ---------------------------------------------------------------
|
|
|
|
Scenario: plan.execute with empty plan_id and wired service returns error
|
|
Given a coverage-boost facade with a mock PlanLifecycleService
|
|
When I dispatch coverage-boost operation "plan.execute" with params {"plan_id": ""}
|
|
Then the coverage-boost response status should be "error"
|
|
And the coverage-boost response error code should be "INTERNAL_ERROR"
|
|
And the coverage-boost response error message should contain "plan_id is required"
|
|
|
|
Scenario: plan.execute with missing plan_id param and wired service returns error
|
|
Given a coverage-boost facade with a mock PlanLifecycleService
|
|
When I dispatch coverage-boost operation "plan.execute" with params {}
|
|
Then the coverage-boost response status should be "error"
|
|
And the coverage-boost response error code should be "INTERNAL_ERROR"
|
|
And the coverage-boost response error message should contain "plan_id is required"
|
|
|
|
# ---------------------------------------------------------------
|
|
# plan.status — empty plan_id with service wired (line 266)
|
|
# ---------------------------------------------------------------
|
|
|
|
Scenario: plan.status with empty plan_id and wired service returns error
|
|
Given a coverage-boost facade with a mock PlanLifecycleService
|
|
When I dispatch coverage-boost operation "plan.status" with params {"plan_id": ""}
|
|
Then the coverage-boost response status should be "error"
|
|
And the coverage-boost response error code should be "INTERNAL_ERROR"
|
|
And the coverage-boost response error message should contain "plan_id is required"
|
|
|
|
Scenario: plan.status with missing plan_id param and wired service returns error
|
|
Given a coverage-boost facade with a mock PlanLifecycleService
|
|
When I dispatch coverage-boost operation "plan.status" with params {}
|
|
Then the coverage-boost response status should be "error"
|
|
And the coverage-boost response error code should be "INTERNAL_ERROR"
|
|
And the coverage-boost response error message should contain "plan_id is required"
|
|
|
|
# ---------------------------------------------------------------
|
|
# plan.diff — empty plan_id with service wired (line 281)
|
|
# ---------------------------------------------------------------
|
|
|
|
Scenario: plan.diff with empty plan_id and wired service returns error
|
|
Given a coverage-boost facade with a mock PlanLifecycleService
|
|
When I dispatch coverage-boost operation "plan.diff" with params {"plan_id": ""}
|
|
Then the coverage-boost response status should be "error"
|
|
And the coverage-boost response error code should be "INTERNAL_ERROR"
|
|
And the coverage-boost response error message should contain "plan_id is required"
|
|
|
|
Scenario: plan.diff with missing plan_id param and wired service returns error
|
|
Given a coverage-boost facade with a mock PlanLifecycleService
|
|
When I dispatch coverage-boost operation "plan.diff" with params {}
|
|
Then the coverage-boost response status should be "error"
|
|
And the coverage-boost response error code should be "INTERNAL_ERROR"
|
|
And the coverage-boost response error message should contain "plan_id is required"
|
|
|
|
# ---------------------------------------------------------------
|
|
# plan.apply — empty plan_id with service wired (line 295)
|
|
# ---------------------------------------------------------------
|
|
|
|
Scenario: plan.apply with empty plan_id and wired service returns error
|
|
Given a coverage-boost facade with a mock PlanLifecycleService
|
|
When I dispatch coverage-boost operation "plan.apply" with params {"plan_id": ""}
|
|
Then the coverage-boost response status should be "error"
|
|
And the coverage-boost response error code should be "INTERNAL_ERROR"
|
|
And the coverage-boost response error message should contain "plan_id is required"
|
|
|
|
Scenario: plan.apply with missing plan_id param and wired service returns error
|
|
Given a coverage-boost facade with a mock PlanLifecycleService
|
|
When I dispatch coverage-boost operation "plan.apply" with params {}
|
|
Then the coverage-boost response status should be "error"
|
|
And the coverage-boost response error code should be "INTERNAL_ERROR"
|
|
And the coverage-boost response error message should contain "plan_id is required"
|
|
|
|
# ---------------------------------------------------------------
|
|
# message/send validation (lines 468-471)
|
|
# ---------------------------------------------------------------
|
|
|
|
Scenario: message/send with empty session_id returns validation error
|
|
Given a coverage-boost facade with a mock PlanLifecycleService
|
|
When I dispatch coverage-boost operation "message/send" with params {"session_id": "", "message": "hi"}
|
|
Then the coverage-boost response status should be "error"
|
|
And the coverage-boost response error code should be "INTERNAL_ERROR"
|
|
And the coverage-boost response error message should contain "session_id is required"
|
|
|
|
Scenario: message/send with empty message returns validation error
|
|
Given a coverage-boost facade with a mock PlanLifecycleService
|
|
When I dispatch coverage-boost operation "message/send" with params {"session_id": "s1", "message": ""}
|
|
Then the coverage-boost response status should be "error"
|
|
And the coverage-boost response error code should be "INTERNAL_ERROR"
|
|
And the coverage-boost response error message should contain "message is required"
|
|
|
|
# ---------------------------------------------------------------
|
|
# Static DI-fallback resolvers (lines 411-425, 434-452)
|
|
# ---------------------------------------------------------------
|
|
|
|
Scenario: _build_actor_resolver_for_session_workflow falls back when DI container raises
|
|
When I call the static resolver builder with a failing DI container
|
|
Then the static resolver result should be None
|
|
|
|
Scenario: _build_actor_options_resolver_for_session_workflow falls back when DI container raises
|
|
When I call the static options-resolver builder with a failing DI container
|
|
Then the static options-resolver result should be None
|
|
|
|
# ---------------------------------------------------------------
|
|
# Service accessor: _provider_registry property (line 160)
|
|
# ---------------------------------------------------------------
|
|
|
|
Scenario: _provider_registry property reads from services dict
|
|
Given a coverage-boost facade wired with a mock ProviderRegistry
|
|
When I access the _provider_registry property
|
|
Then the provider registry accessor should return the mock
|