Syntropy.TaskScheduler.Runner (syntropy v0.3.0)

Copy Markdown

Executes one task run inside the coordinator's supervised task tree.

Collects agent attempts with bounded parallelism, records thought events and lattice contributions, synthesizes the final answer, and assembles the task result consumed by the scheduler's completion handler. Runs entirely outside the Syntropy.TaskScheduler GenServer process.

Summary

Functions

Runs the full task pipeline for the given execution context.

Functions

execute(context)

@spec execute(map()) :: {:ok, map()} | {:error, term()}

Runs the full task pipeline for the given execution context.

A code_review context executes the receipts pipeline — no agent panel, no synthesis, no provider calls — and returns a result whose quality fields are derived from the receipts (the completion path recomputes quality from synthesis otherwise, which would misread a receipts run). All other contexts run the agent pipeline.

Returns {:ok, result_with_recommendation_drafts} or {:error, {:no_successful_thoughts, attempts}} / {:error, receipts_error_map}.