forked from HAL9000/cleveragents-core
051ee7c290
Added 52 new .feature files and corresponding _steps.py files targeting previously uncovered code paths in the following areas: - TUI layer: app, commands, persona (state/schema/registry), widgets, input (shell_exec, reference_parser) - Application services: plan lifecycle/service/executor, session, project, repo indexing, correction, checkpoint, actor, llm_actors, strategy coordinator, resource file watcher, service retry wiring - CLI commands: session, resource, repl, plan, db, automation_profile - Domain models: retry_policy, resource_type, cost_budget, docker_compose_analyzer, detail_level, _sql_string_aware, _postgresql_helpers - Core: circuit_breaker, retry_service_patterns - Infrastructure: repositories, transaction_sandbox, strategy_registry, plugins/loader, container - Config: settings - Agents: plan_generation, context_analysis, auto_debug - A2A: facade All new tests follow the Behave/Gherkin BDD standard. Resolved step definition collisions with unique prefixes. Fixed Alembic fileConfig logger disabling issue (disable_existing_loggers=False). ISSUES CLOSED: #1068
48 lines
2.3 KiB
Gherkin
48 lines
2.3 KiB
Gherkin
Feature: Plan Service Coverage Boost Round 2
|
|
Additional scenarios targeting uncovered lines in plan_service.py:
|
|
auto_debug_build exception path with contexts (851, 853),
|
|
auto_debug_build successful fix branch (922-935),
|
|
apply_changes generic exception handler (1036),
|
|
and _coerce_change_list defensive guard (1413-1416).
|
|
|
|
Background:
|
|
Given I have a plan service configured for r2 coverage testing
|
|
|
|
Scenario: auto_debug_build formats code context from contexts with content
|
|
Given the current plan has contexts with file content
|
|
And build_plan raises an exception on every attempt
|
|
And the auto debug agent returns an unsuccessful fix
|
|
When I call auto_debug_build
|
|
Then the auto_debug_build should return failure with the build error
|
|
|
|
Scenario: auto_debug_build applies a successful fix and retries the build
|
|
Given the current plan has contexts with file content
|
|
And build_plan fails on the first attempt then succeeds
|
|
And the auto debug agent returns a successful fix
|
|
When I call auto_debug_build
|
|
Then the auto_debug_build should return success
|
|
And the plan prompt should contain the auto-debug fix description
|
|
|
|
Scenario: auto_debug_build applies a successful fix when plan has no prompt
|
|
Given the current plan has no prompt set
|
|
And build_plan fails on the first attempt then succeeds
|
|
And the auto debug agent returns a successful fix
|
|
When I call auto_debug_build
|
|
Then the auto_debug_build should return success
|
|
|
|
Scenario: apply_changes raises PlanError on generic filesystem exception
|
|
Given the current plan has a pending CREATE change with a poison path
|
|
When I call apply_changes and expect an error
|
|
Then the apply error should be a PlanError with operation value in details
|
|
|
|
Scenario: _coerce_change_list raises PlanError for an invalid dict entry
|
|
When I call _coerce_change_list with a dict that fails Change validation
|
|
Then a PlanError should be raised about unable to parse streamed change entry
|
|
|
|
Scenario: auto_debug_build with contexts that have no content are filtered
|
|
Given the current plan has contexts where some lack content
|
|
And build_plan raises an exception on every attempt
|
|
And the auto debug agent returns an unsuccessful fix
|
|
When I call auto_debug_build
|
|
Then the auto_debug_build should return failure with the build error
|