Files
cleveragents-core/features/retry_patterns_coverage_boost.feature
T
freemo 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
test(coverage): add Behave BDD tests to improve unit test coverage across 53 source modules
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
2026-03-09 13:01:58 -04:00

54 lines
2.8 KiB
Gherkin

Feature: Retry Patterns Coverage Boost
Additional scenarios that exercise previously uncovered code paths
in the retry_patterns module.
Background:
Given the retry patterns coverage module is imported
Scenario: get_retry_decorator returns configured decorator for known category
When I request the retry decorator for known category "network"
Then the returned decorator should use the network category configuration
And calling the decorated function should succeed
Scenario: get_retry_decorator returns configured decorator for database category
When I request the retry decorator for known category "database"
Then the returned decorator should use the database category configuration
Scenario: RetryContext.execute raises RuntimeError when function returns None
Given I have a retry context named "none-returning"
And I have a function that always returns None
When I execute the None-returning function with the retry context
Then a RuntimeError should be raised with message "Retrying must execute at least once"
Scenario: RetryContext.async_execute raises RuntimeError when async function returns None
Given I have a retry context named "async-none-returning"
And I have an async function that always returns None
When I execute the async None-returning function with the retry context
Then a RuntimeError should be raised with message "AsyncRetrying must execute at least once"
Scenario: Auto-debug retry returns result dict without error key
Given I have an async function that returns a dict without an error key
When I apply auto-debug retry for dict success
Then the auto-debug result should be the success dict
Scenario: Auto-debug retry returns non-dict result
Given I have an async function that returns a non-dict result
When I apply auto-debug retry for non-dict success
Then the auto-debug result should be the non-dict value
Scenario: Auto-debug retry returns None when all attempts pass without error
Given I have an async function that returns None from every attempt
When I apply auto-debug retry for None result exhaustion
Then the auto-debug result should be None
Scenario: log_after_retry success path falls back when logger rejects keywords
Given a logger that rejects keyword arguments is installed for coverage boost
When I call log_after_retry with a successful outcome
Then the fallback success message should be logged
Scenario: log_after_retry failed path covers else-None branch in exception ternary
Given a logger that accepts all arguments is installed for coverage boost
And I have a retry state where outcome.failed toggles between checks
When I call log_after_retry with the toggling outcome
Then the exception keyword should resolve to None