Files
cleveragents-core/features/resource_registry_service_coverage_boost.feature
freemo a808c395f9
CI / benchmark-publish (pull_request) Has been skipped
CI / lint (pull_request) Successful in 15s
CI / build (pull_request) Successful in 15s
CI / quality (pull_request) Successful in 17s
CI / typecheck (pull_request) Successful in 35s
CI / security (pull_request) Successful in 50s
CI / unit_tests (pull_request) Successful in 2m46s
CI / integration_tests (pull_request) Successful in 3m16s
CI / docker (pull_request) Successful in 40s
CI / coverage (pull_request) Successful in 5m6s
CI / lint (push) Successful in 13s
CI / quality (push) Successful in 16s
CI / build (push) Successful in 18s
CI / security (push) Successful in 32s
CI / typecheck (push) Successful in 35s
CI / benchmark-regression (push) Has been skipped
CI / unit_tests (push) Successful in 2m52s
CI / integration_tests (push) Successful in 3m8s
CI / docker (push) Successful in 39s
CI / coverage (push) Successful in 5m53s
CI / benchmark-publish (push) Successful in 16m55s
CI / benchmark-regression (pull_request) Successful in 33m0s
test(coverage): add Behave BDD tests to improve unit test coverage across 53 source modules
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
2026-03-09 13:01:58 -04:00

39 lines
2.3 KiB
Gherkin

Feature: Resource registry service coverage boost
Target uncovered lines in resource_registry_service.py:
- Lines 579, 581-582, 584-586: link_child type incompatibility ValidationError
- Lines 646-648: link_child generic exception rollback
- Lines 686-688: unlink_child generic exception rollback
- Line 785: _build_tree_node type_filter skips non-matching children
# link_child type incompatibility
Scenario: link_child rejects child type not in allowed_child_types
Given an in-memory resource registry with two resources of incompatible types
When I attempt to link the child to the parent with incompatible types
Then a ValidationError should be raised indicating the child type is not allowed
And the error details should contain the parent and child type names
# ── link_child generic exception rollback ────────────────────────
Scenario: link_child rolls back on unexpected generic exception
Given a resource registry service prepared for link_child with a faulty session
When I attempt link_child and a generic exception occurs
Then the link_child session should have been rolled back
And the generic exception from link_child should propagate
# ── unlink_child generic exception rollback ──────────────────────
Scenario: unlink_child rolls back on unexpected generic exception
Given a resource registry service prepared for unlink_child with a faulty session
When I attempt unlink_child and a generic exception occurs
Then the unlink_child session should have been rolled back
And the generic exception from unlink_child should propagate
# ── _build_tree_node type_filter filtering ───────────────────────
Scenario: get_resource_tree with type_filter excludes non-matching children
Given an in-memory resource registry with a parent and two children of different types
When I call get_resource_tree with a type_filter for only one child type
Then the tree should contain only the child matching the type filter
And the non-matching child should be excluded from the tree