kin: auto-commit after pipeline

This commit is contained in:
Gros Frumos 2026-03-17 21:25:12 +02:00
parent fe344c2a4f
commit d53c4096fd
9 changed files with 343 additions and 22 deletions

View file

@ -11,6 +11,7 @@ import re
import shlex
import shutil
import sqlite3
import sys
import subprocess
import time
from pathlib import Path
@ -810,7 +811,7 @@ def _detect_test_command(project_path: str) -> str | None:
# 3. pytest
if (path / "pyproject.toml").is_file() or (path / "setup.py").is_file():
return "pytest"
return f"{sys.executable} -m pytest"
# 4. npx tsc --noEmit
if (path / "tsconfig.json").is_file():
@ -1313,6 +1314,10 @@ def run_pipeline(
Returns {success, steps_completed, total_cost, total_tokens, total_duration, results}
"""
# Guard: empty pipeline — return immediately without touching DB or task state
if not steps:
return {"success": False, "error": "empty_pipeline"}
# Auth check — skip for dry_run (dry_run never calls claude CLI)
if not dry_run:
try: