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
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
73 lines
3.2 KiB
Gherkin
73 lines
3.2 KiB
Gherkin
Feature: Multi-project service coverage boost
|
|
As a developer
|
|
I want to test edge cases and guard clauses in MultiProjectService
|
|
So that all code paths have test coverage
|
|
|
|
Background:
|
|
Given a fresh multi-project service
|
|
|
|
# --- constructor guard: None decision_service (line 59) ---
|
|
|
|
Scenario: Creating service with None decision_service raises ValueError
|
|
When I create a MultiProjectService with a None decision_service
|
|
Then a ValueError should have been raised with message "decision_service must not be None"
|
|
|
|
# --- decision_service property accessor (line 66) ---
|
|
|
|
Scenario: Accessing decision_service property returns injected service
|
|
Then the decision_service property should return the injected mock
|
|
|
|
# --- initialize_scopes: None plan guard (line 93) ---
|
|
|
|
Scenario: Initialize scopes with None plan raises ValueError
|
|
When I call initialize_scopes with a None plan
|
|
Then a ValueError should have been raised with message "plan must not be None"
|
|
|
|
# --- initialize_scopes: None available_resources guard (line 95) ---
|
|
|
|
Scenario: Initialize scopes with None available_resources raises ValueError
|
|
Given a simple two-project plan
|
|
When I call initialize_scopes with None available_resources
|
|
Then a ValueError should have been raised with message "available_resources must not be None"
|
|
|
|
# --- resolve_context_view: None plan guard (line 157) ---
|
|
|
|
Scenario: Resolve context view with None plan raises ValueError
|
|
When I call resolve_context_view with a None plan and project "any"
|
|
Then a ValueError should have been raised with message "plan must not be None"
|
|
|
|
# --- record_changeset: None plan guard (line 196) ---
|
|
|
|
Scenario: Record changeset with None plan raises ValueError
|
|
When I call record_changeset with a None plan
|
|
Then a ValueError should have been raised with message "plan must not be None"
|
|
|
|
# --- record_changeset: metadata not initialized (lines 198-199) ---
|
|
|
|
Scenario: Record changeset without initialized metadata raises ValueError
|
|
Given a simple two-project plan
|
|
When I call record_changeset on a plan without metadata
|
|
Then a ValueError should have been raised with message "Multi-project metadata not initialized"
|
|
|
|
# --- validate_cross_project: None plan (line 253) ---
|
|
|
|
Scenario: Validate cross-project with None plan returns error
|
|
When I call validate_cross_project with a None plan
|
|
Then the validation result should contain "plan must not be None"
|
|
|
|
# --- validate_cross_project: no metadata / single-project (line 255) ---
|
|
|
|
Scenario: Validate cross-project with no metadata returns empty list
|
|
Given a simple two-project plan
|
|
When I call validate_cross_project on a plan without metadata
|
|
Then the validation result should be an empty list
|
|
|
|
# --- validate_cross_project: unknown source project (lines 283-285) ---
|
|
|
|
Scenario: Validate cross-project with unknown source project in dependency
|
|
Given a simple two-project plan
|
|
And the plan has initialized scopes with resources
|
|
And the plan has a cross-project dependency from unknown source "phantom-src" to known target "proj-a"
|
|
When I call validate_cross_project on the prepared plan
|
|
Then the validation result should contain "unknown source project 'phantom-src'"
|