test(coverage): add Behave BDD tests to improve coverage across 52 source files #1069

Merged
freemo merged 1 commits from task/coverage-boost-52-files into master 2026-03-20 21:30:36 +00:00
Owner

Summary

Adds 52 new Behave BDD feature files and corresponding step definition files targeting
previously uncovered code paths across the codebase. This addresses coverage gaps in:

  • TUI layer: app, commands, persona (state/schema/registry), widgets (slash_command_overlay),
    input (shell_exec, reference_parser)
  • Application services: plan lifecycle/service/executor, session, project, repo indexing
    (service/persistence/utils), 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,
    application container
  • Config: settings
  • Agents: plan_generation, context_analysis, auto_debug
  • A2A: facade

Key changes

  • 52 new .feature files with descriptive Gherkin scenarios
  • 52 new _steps.py files with step implementations that exercise real source code
  • Resolved all step definition collisions using unique prefixes
  • Fixed Alembic fileConfig() logger disabling issue (disable_existing_loggers=False)
  • All 11,763 scenarios pass (0 new failures; 2 pre-existing errors in unrelated features)

Coverage highlights

  • llm_actors.py: 24.9% -> ~100%
  • tui/commands.py: 31.6% -> ~100%
  • tui/app.py: 34.1% -> ~99%
  • tui/widgets/slash_command_overlay.py: 61.5% -> ~100%
  • cli/commands/db.py: 73.6% -> ~100%
  • domain/models/acms/_sql_string_aware.py: 75.6% -> ~100%
  • Plus significant improvements across all other 46 files

Closes #1068

## Summary Adds 52 new Behave BDD feature files and corresponding step definition files targeting previously uncovered code paths across the codebase. This addresses coverage gaps in: - **TUI layer**: app, commands, persona (state/schema/registry), widgets (slash_command_overlay), input (shell_exec, reference_parser) - **Application services**: plan lifecycle/service/executor, session, project, repo indexing (service/persistence/utils), 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, application container - **Config**: settings - **Agents**: plan_generation, context_analysis, auto_debug - **A2A**: facade ### Key changes - 52 new `.feature` files with descriptive Gherkin scenarios - 52 new `_steps.py` files with step implementations that exercise real source code - Resolved all step definition collisions using unique prefixes - Fixed Alembic `fileConfig()` logger disabling issue (`disable_existing_loggers=False`) - All 11,763 scenarios pass (0 new failures; 2 pre-existing errors in unrelated features) ### Coverage highlights - `llm_actors.py`: 24.9% -> ~100% - `tui/commands.py`: 31.6% -> ~100% - `tui/app.py`: 34.1% -> ~99% - `tui/widgets/slash_command_overlay.py`: 61.5% -> ~100% - `cli/commands/db.py`: 73.6% -> ~100% - `domain/models/acms/_sql_string_aware.py`: 75.6% -> ~100% - Plus significant improvements across all other 46 files Closes #1068
freemo force-pushed task/coverage-boost-52-files from 182e191829 to 7843c54a25 2026-03-19 16:01:08 +00:00 Compare
freemo scheduled this pull request to auto merge when all checks succeed 2026-03-19 16:01:25 +00:00
freemo force-pushed task/coverage-boost-52-files from 7843c54a25 to b135d7a8ab 2026-03-19 16:15:22 +00:00 Compare
freemo force-pushed task/coverage-boost-52-files from b135d7a8ab to aea7ccbedc 2026-03-19 21:25:07 +00:00 Compare
freemo force-pushed task/coverage-boost-52-files from aea7ccbedc to 5694b56a0a 2026-03-20 18:20:26 +00:00 Compare
freemo force-pushed task/coverage-boost-52-files from 5694b56a0a to 9ce750bc6e 2026-03-20 19:14:06 +00:00 Compare
freemo force-pushed task/coverage-boost-52-files from 9ce750bc6e to 374b8fdbc0 2026-03-20 19:28:34 +00:00 Compare
freemo force-pushed task/coverage-boost-52-files from 374b8fdbc0 to 1384b4d9d6 2026-03-20 20:02:53 +00:00 Compare
freemo force-pushed task/coverage-boost-52-files from 1384b4d9d6 to 02c1cd0b88 2026-03-20 20:08:35 +00:00 Compare
freemo force-pushed task/coverage-boost-52-files from 02c1cd0b88 to cd0ecd8a39 2026-03-20 21:11:45 +00:00 Compare
freemo force-pushed task/coverage-boost-52-files from cd0ecd8a39 to 051ee7c290 2026-03-20 21:22:11 +00:00 Compare
freemo merged commit 051ee7c290 into master 2026-03-20 21:30:36 +00:00
freemo deleted branch task/coverage-boost-52-files 2026-03-20 21:30:36 +00:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: cleveragents/cleveragents-core#1069