summaryrefslogtreecommitdiff
path: root/internal/cli
diff options
context:
space:
mode:
Diffstat (limited to 'internal/cli')
-rw-r--r--internal/cli/serve.go14
1 files changed, 14 insertions, 0 deletions
diff --git a/internal/cli/serve.go b/internal/cli/serve.go
index 656ee66..7ee8d49 100644
--- a/internal/cli/serve.go
+++ b/internal/cli/serve.go
@@ -265,6 +265,20 @@ func serve(addr, basePath string) error {
}
go sch.Run(ctx, cfg.Scheduler.PollInterval())
+ // Story orchestrator (internal/scheduler.StoryOrchestrator, Phase 7b):
+ // drives stories through Builder -> Evaluators -> Arbitration ->
+ // REVIEW_READY as their root/evaluator/arbitration tasks reach COMPLETED
+ // (always via human/chatbot accept, since these are all top-level
+ // tasks — see that type's doc comment for why this is poll-based rather
+ // than hooked into executor.Pool.handleRunResult). Also `serve`-only,
+ // same reasoning as the scheduler above.
+ storyOrch := &scheduler.StoryOrchestrator{
+ Store: store,
+ Pool: pool,
+ Logger: logger,
+ }
+ go storyOrch.Run(ctx, scheduler.DefaultStoryPollInterval)
+
httpSrv := &http.Server{
Addr: addr,
Handler: srv.Handler(),