kin: auto-commit after pipeline

This commit is contained in:
Gros Frumos 2026-03-16 23:34:22 +02:00
parent 0ccd451b4b
commit 04cbbc563b
7 changed files with 324 additions and 7 deletions

View file

@ -649,10 +649,12 @@ def run_task(ctx, task_id, dry_run, allow_write):
pipeline_steps = output["pipeline"]
analysis = output.get("analysis", "")
# Save completion_mode from PM output to task (only if not already set by user)
# Save completion_mode from PM output to task (only if neither task nor project has explicit mode)
task_current = models.get_task(conn, task_id)
update_fields = {}
if not task_current.get("execution_mode"):
project = models.get_project(conn, project_id)
project_mode = project.get("execution_mode") if project else None
if not task_current.get("execution_mode") and not project_mode:
pm_completion_mode = models.validate_completion_mode(
output.get("completion_mode", "review")
)