RunStepService Walkthrough

RunStepService is Hexi's orchestration use case.

Responsibilities

  1. ensure .hexi state exists,
  2. load model config and policy,
  3. emit start/progress events,
  4. gather bounded workspace context,
  5. request and parse ActionPlan,
  6. execute actions through ports,
  7. emit review and terminal done.

Failure behavior

  • plan parse errors emit error then terminal done.
  • action execution errors emit error, review, then terminal done.

Why this shape matters

  • orchestration remains in core,
  • side effects stay in adapters,
  • behavior is testable with fake ports.