freemo
|
3a2b134f3c
|
test(coverage): add Behave scenarios for remaining under-tested modules
Added Behave BDD feature files and step definitions targeting coverage
gaps in six modules:
- container.py: exercise get_database_url env-var fallback, AI provider
None path, cached container singleton, override_providers edge cases
(lines 66-69, 125-130; branches at 51, 57, 82, 87, 256, 284-288)
- correction_service.py: exercise exception-handling paths in
execute_revert and execute_append via monkeypatched analyze_impact
and ULID failures (lines 254-262, 320-328)
- plan_lifecycle_service.py: exercise _persisted UoW commit paths,
InvalidPhaseTransitionError custom message branch, non-reusable
action archive, and error_details merge logic (branches at 100,
216, 237, 327, 461, 570, 576, 607)
- plan.py (CLI): exercise spec-dict optional field branches,
_print_lifecycle_plan conditional rendering, use_action argument
parsing, auto-resolve paths, legacy wrappers, and validation
error branches across 66 scenarios
- skill.py (CLI): exercise singleton cache, timestamp-absent show,
no-tools MCP, add/remove/list/show format and error branches
across 26 scenarios
- models.py (DB): exercise to_domain/from_domain None-field branches
in SkillModel, SessionModel, ToolModel, LifecycleActionModel,
LifecyclePlanModel, NamespacedProjectModel, and SessionMessageModel
across 41 scenarios
All 302 features, 6503 scenarios, 28271 steps pass (nox -e unit_tests).
ISSUES CLOSED: #446
|
2026-02-25 19:38:43 -05:00 |
|