forked from cleveragents/cleveragents-core
a808c395f9
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
55 lines
2.8 KiB
Gherkin
55 lines
2.8 KiB
Gherkin
Feature: System CLI coverage boost — uncovered branches in system.py
|
|
As a developer
|
|
I want to exercise the remaining uncovered code paths in system.py
|
|
So that all diagnostic checks have thorough test coverage
|
|
|
|
# ── _check_file_permissions: writable but not readable (line 344) ──
|
|
|
|
Scenario: File permissions check with writable but not readable data dir
|
|
Given the system coverage boost module is loaded
|
|
When I call check_file_permissions with writable-only data dir
|
|
Then the coverage boost result status should be "warn"
|
|
And the coverage boost result details should be "data dir w"
|
|
|
|
# ── _check_stale_locks: locks table exists, zero stale locks (lines 367-376) ──
|
|
|
|
Scenario: Stale locks check finds zero stale locks
|
|
Given the system coverage boost module is loaded
|
|
When I call check_stale_locks with locks table present and zero stale locks
|
|
Then the coverage boost result status should be "ok"
|
|
And the coverage boost result details should be "0 stale locks"
|
|
|
|
# ── _check_stale_locks: locks table exists, nonzero stale locks (lines 378-382) ──
|
|
|
|
Scenario: Stale locks check finds stale locks
|
|
Given the system coverage boost module is loaded
|
|
When I call check_stale_locks with locks table present and 3 stale locks
|
|
Then the coverage boost result status should be "warn"
|
|
And the coverage boost result details should contain "3 stale lock(s) found"
|
|
And the coverage boost result should have recommendation "Run lock cleanup or restart the service"
|
|
|
|
# ── _check_stale_locks: exception path (lines 384-388) ──
|
|
|
|
Scenario: Stale locks check handles unexpected exception
|
|
Given the system coverage boost module is loaded
|
|
When I call check_stale_locks and the database connection raises an exception
|
|
Then the coverage boost result status should be "warn"
|
|
And the coverage boost result details should be "unable to check"
|
|
|
|
# ── _check_async_worker_health: async enabled (lines 405-410) ──
|
|
|
|
Scenario: Async worker health check with async enabled
|
|
Given the system coverage boost module is loaded
|
|
When I call check_async_worker_health with async enabled and max_workers 4 and poll_interval 5
|
|
Then the coverage boost result status should be "ok"
|
|
And the coverage boost result details should contain "enabled, max_workers=4"
|
|
And the coverage boost result details should contain "poll_interval=5s"
|
|
|
|
# ── _check_async_worker_health: exception path (lines 413-417) ──
|
|
|
|
Scenario: Async worker health check handles unexpected exception
|
|
Given the system coverage boost module is loaded
|
|
When I call check_async_worker_health and get_settings raises an exception
|
|
Then the coverage boost result status should be "warn"
|
|
And the coverage boost result details should be "unable to check"
|