a808c395f9
CI / benchmark-publish (pull_request) Has been skipped
CI / lint (pull_request) Successful in 15s
CI / build (pull_request) Successful in 15s
CI / quality (pull_request) Successful in 17s
CI / typecheck (pull_request) Successful in 35s
CI / security (pull_request) Successful in 50s
CI / unit_tests (pull_request) Successful in 2m46s
CI / integration_tests (pull_request) Successful in 3m16s
CI / docker (pull_request) Successful in 40s
CI / coverage (pull_request) Successful in 5m6s
CI / lint (push) Successful in 13s
CI / quality (push) Successful in 16s
CI / build (push) Successful in 18s
CI / security (push) Successful in 32s
CI / typecheck (push) Successful in 35s
CI / benchmark-regression (push) Has been skipped
CI / unit_tests (push) Successful in 2m52s
CI / integration_tests (push) Successful in 3m8s
CI / docker (push) Successful in 39s
CI / coverage (push) Successful in 5m53s
CI / benchmark-publish (push) Successful in 16m55s
CI / benchmark-regression (pull_request) Successful in 33m0s
Add 53 new .feature files and corresponding step definition files targeting uncovered lines identified in build/coverage.xml. Fix AmbiguousStep conflicts in 7 pre-existing step files by disambiguating step text. New tests cover: ACP clients/facade, actor CLI/config, application container, ACMS service/strategies, async worker, automation profile CLI, autonomy guardrail, bridge, change model, config CLI/service, context service, cross-plan correction, database models, decision service, decomposition clustering/service, discovery handler, langchain chat provider, langgraph nodes, materializers, multi-project service, plan apply/CLI/lifecycle/model/ preflight/resume/service, PostgreSQL analyzer, project CLI/context CLI, provider registry, reactive application/route, repositories, resolver handler, resource registry service, resume model, retry patterns, sandbox protocol, server CLI, skill CLI/service, skills registry, subplan execution/service, system CLI, UKO loader, UoW, and YAML template engine. Closes #645
46 lines
2.2 KiB
Gherkin
46 lines
2.2 KiB
Gherkin
@resource_handlers @resolver_coverage
|
|
Feature: Handler resolver edge-case coverage
|
|
As a developer maintaining the handler resolution subsystem
|
|
I want to exercise the uncovered error paths in resolve_handler
|
|
So that every branch in resolver.py is tested
|
|
|
|
Background:
|
|
Given the handler cache is cleared
|
|
|
|
# --- Lines 72-73: empty module_path or class_name after split ---
|
|
|
|
Scenario: Reject handler reference with empty module path
|
|
When I try to resolve handler ref ":SomeClass"
|
|
Then a handler resolution error should be raised with message "both module path and class name are required"
|
|
|
|
Scenario: Reject handler reference with empty class name
|
|
When I try to resolve handler ref "some.module:"
|
|
Then a handler resolution error should be raised with message "both module path and class name are required"
|
|
|
|
# --- Lines 84-87: generic Exception (not ModuleNotFoundError) during import ---
|
|
|
|
Scenario: Generic exception during module import raises HandlerResolutionError
|
|
Given a module import that raises a generic RuntimeError
|
|
When I try to resolve the rigged handler reference
|
|
Then a handler resolution error should be raised with message "Error importing handler module"
|
|
|
|
# --- Lines 99-102: Exception during handler class instantiation ---
|
|
|
|
Scenario: Exception during handler instantiation raises HandlerResolutionError
|
|
Given a module whose handler class raises TypeError on init
|
|
When I try to resolve the rigged handler reference
|
|
Then a handler resolution error should be raised with message "Cannot instantiate handler"
|
|
|
|
# --- Lines 106-107: instantiated object does not satisfy ResourceHandler protocol ---
|
|
|
|
Scenario: Handler class not satisfying ResourceHandler protocol is rejected
|
|
Given a module whose handler class does not satisfy ResourceHandler
|
|
When I try to resolve the rigged handler reference
|
|
Then a handler resolution error should be raised with message "does not satisfy ResourceHandler protocol"
|
|
|
|
# --- Whitespace-only reference triggers line 53-54 ---
|
|
|
|
Scenario: Whitespace-only handler reference is treated as empty
|
|
When I try to resolve handler ref " "
|
|
Then a handler resolution error should be raised with message "must not be empty"
|