Files
cleveragents-core/features/decision_di_wiring.feature
freemo 120274da99
CI / benchmark-publish (pull_request) Has been skipped
CI / lint (pull_request) Successful in 14s
CI / build (pull_request) Successful in 20s
CI / quality (pull_request) Successful in 22s
CI / typecheck (pull_request) Successful in 33s
CI / security (pull_request) Successful in 35s
CI / integration_tests (pull_request) Successful in 4m26s
CI / unit_tests (pull_request) Successful in 20m49s
CI / benchmark-regression (pull_request) Successful in 20m19s
CI / docker (pull_request) Successful in 1m2s
CI / coverage (pull_request) Successful in 48m2s
CI / lint (push) Successful in 12s
CI / quality (push) Successful in 16s
CI / build (push) Successful in 24s
CI / typecheck (push) Successful in 29s
CI / security (push) Successful in 30s
CI / benchmark-regression (push) Has been skipped
CI / integration_tests (push) Successful in 2m44s
CI / unit_tests (push) Successful in 11m56s
CI / benchmark-publish (push) Successful in 12m13s
CI / docker (push) Successful in 39s
CI / coverage (push) Successful in 37m29s
feat(di): wire decision services
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
2026-02-27 02:33:42 +00:00

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