forked from cleveragents/cleveragents-core
120274da99
Create DecisionService application-layer service that wraps DecisionRepository with structured logging and UnitOfWork transaction management. Wire DecisionService and PlanLifecycleService into the DI container as Factory providers. Inject DecisionService into PlanLifecycleService so that phase transitions automatically record decisions: start_strategize records a strategy_choice decision and start_execute records an implementation_choice decision. Decision recording is optional and never blocks lifecycle transitions. Add Behave feature (5 scenarios), Robot Framework smoke tests (2 test cases), ASV benchmarks (3 benchmark classes), and DI reference documentation. ISSUES CLOSED: #173
37 lines
1.6 KiB
Gherkin
37 lines
1.6 KiB
Gherkin
Feature: Decision DI Wiring
|
|
As a developer
|
|
I want DecisionService wired into the DI container
|
|
So that decision recording is automatic during plan lifecycle transitions
|
|
|
|
@phase1
|
|
Scenario: DI container resolves DecisionService
|
|
Given decdi- the application container is initialized
|
|
When decdi- I request a DecisionService from the container
|
|
Then decdi- the container should return a valid DecisionService instance
|
|
|
|
@phase1
|
|
Scenario: DecisionService records decision during plan strategize
|
|
Given decdi- a PlanLifecycleService with a DecisionService
|
|
And decdi- an action and plan exist in strategize phase
|
|
When decdi- I start the strategize phase
|
|
Then decdi- a strategy_choice decision should be recorded for the plan
|
|
|
|
@phase1
|
|
Scenario: DecisionService records decision during plan execute
|
|
Given decdi- a PlanLifecycleService with a DecisionService
|
|
And decdi- an action and plan exist in execute phase
|
|
When decdi- I start the execute phase
|
|
Then decdi- an implementation_choice decision should be recorded for the plan
|
|
|
|
@phase1
|
|
Scenario: DecisionRepository is accessible via DI
|
|
Given decdi- the application container is initialized
|
|
When decdi- I open a UnitOfWork transaction from the container
|
|
Then decdi- the transaction context should expose a DecisionRepository
|
|
|
|
@phase1
|
|
Scenario: DecisionService scoping is correct
|
|
Given decdi- the application container is initialized
|
|
When decdi- I request two DecisionService instances from the container
|
|
Then decdi- the instances should be different objects because it is a Factory
|