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
42 lines
2.2 KiB
Gherkin
42 lines
2.2 KiB
Gherkin
Feature: Bridge coverage boost for uncovered lines in bridge.py
|
|
As a developer
|
|
I want thorough tests for remaining uncovered lines in bridge.py
|
|
So that code coverage reaches its maximum
|
|
|
|
# Targets uncovered lines:
|
|
# Line 64: early return from cleanup_tasks_async when no tasks exist
|
|
# Lines 79-83: pending tasks that do not complete within timeout
|
|
# Lines 89-93: late tasks added to _active_tasks during cleanup await
|
|
# Line 149: MESSAGE_ROUTER node with "rules" in create_graph_from_config
|
|
# Lines 282-290: execute_node inner coroutine in _create_node_operator
|
|
|
|
Scenario: cleanup_tasks_async returns immediately when no tasks are active
|
|
Given a bridge with an empty active tasks set
|
|
When I call cleanup_tasks_async on the idle bridge
|
|
Then the async cleanup should complete without error
|
|
And the bridge active task set should remain empty
|
|
|
|
Scenario: cleanup_tasks_async logs pending tasks that exceed timeout
|
|
Given a bridge with a task that ignores cancellation
|
|
When I call cleanup_tasks_async with a very short timeout
|
|
Then pending tasks should be re-cancelled after the timeout
|
|
And the bridge active task set should be cleared after timeout cleanup
|
|
|
|
Scenario: cleanup_tasks_async cancels late tasks added during await
|
|
Given a bridge with a task whose done-callback spawns a late task
|
|
When I call cleanup_tasks_async allowing callback to fire
|
|
Then the late task should be cancelled during cleanup
|
|
And the bridge active task set should be cleared after late-task cleanup
|
|
|
|
Scenario: create_graph_from_config sets rules metadata for MESSAGE_ROUTER nodes
|
|
Given a bridge ready to create graphs from config
|
|
When I create a graph with a MESSAGE_ROUTER node containing rules
|
|
Then the node config metadata should contain the routing rules
|
|
|
|
Scenario: Node operator executes the inner coroutine and updates state
|
|
Given a bridge with a graph containing a mock executable node
|
|
When I pipe a message through the node operator and await the result
|
|
Then the node execute method should have been called
|
|
And the state manager should have been updated with the node result
|
|
And the returned message metadata should contain the node and graph names
|