kernels.harness.run_retro()

Run every task through the staged escalation, in parallel.

Usage

Source

kernels.harness.run_retro(
    tasks,
    *,
    stages=(SamplerSettings(),),
    gates=None,
    max_workers=None,
    executor="process",
    runner=run_task,
    progress=None
)

Stage 1 fits all tasks at stages[0]; each later stage re-fits only the tasks whose latest row fails gates. A task’s final row is its LAST attempt (stamped row["stage"]), so escalation replaces, never duplicates. Rows come back in task order regardless of completion order.

executor="serial" runs everything inline in this process - for tests, debugging (real tracebacks), and platforms where spawning is unwanted. runner is injectable for the same reason. progress (if given) is called as progress(row, stage, done_in_stage, total_in_stage) from the parent as each fit lands.