RunStepService Walkthrough
RunStepService is Hexi's orchestration use case.
Responsibilities
- ensure
.hexistate exists, - load model config and policy,
- emit start/progress events,
- gather bounded workspace context,
- request and parse ActionPlan,
- execute actions through ports,
- emit
reviewand terminaldone.
Failure behavior
- plan parse errors emit
errorthen terminaldone. - action execution errors emit
error,review, then terminaldone.
Why this shape matters
- orchestration remains in core,
- side effects stay in adapters,
- behavior is testable with fake ports.