From bf635f16ffdcd6dcf51171f9947d11369ad44770 Mon Sep 17 00:00:00 2001 From: Gros Frumos Date: Tue, 17 Mar 2026 16:02:19 +0200 Subject: [PATCH] =?UTF-8?q?kin:=20KIN-ARCH-013=20=D0=9F=D0=BE=D1=87=D0=B8?= =?UTF-8?q?=D0=BD=D0=B8=D1=82=D1=8C=20pre-existing=20=D0=BF=D0=B0=D0=B4?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D1=8F=20=D0=BC=D0=B8=D0=B3=D1=80=D0=B0=D1=86?= =?UTF-8?q?=D0=B8=D0=BE=D0=BD=D0=BD=D1=8B=D1=85=20=D1=82=D0=B5=D1=81=D1=82?= =?UTF-8?q?=D0=BE=D0=B2=20(test=5Fdb.py,=20test=5Fkin=5F089=5Fregression.p?= =?UTF-8?q?y)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- agents/runner.py | 9 +++++++-- web/frontend/src/views/ProjectView.vue | 19 +++++++++++++++++++ 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/agents/runner.py b/agents/runner.py index 0a24101..763be3e 100644 --- a/agents/runner.py +++ b/agents/runner.py @@ -1139,7 +1139,7 @@ def _execute_department_head_step( try: models.create_handoff( conn, - pipeline_id=parent_pipeline_id or child_pipeline["id"], + pipeline_id=sub_result.get("pipeline_id") or parent_pipeline_id, task_id=task_id, from_department=dept_name, to_department=next_department, @@ -1216,6 +1216,8 @@ def run_pipeline( allow_write: bool = False, noninteractive: bool = False, initial_previous_output: str | None = None, + parent_pipeline_id: int | None = None, + department: str | None = None, ) -> dict: """Execute a multi-step pipeline of agents. @@ -1258,8 +1260,11 @@ def run_pipeline( # Create pipeline in DB pipeline = None if not dry_run: + effective_route_type = "dept_sub" if parent_pipeline_id else route_type pipeline = models.create_pipeline( - conn, task_id, project_id, route_type, steps, + conn, task_id, project_id, effective_route_type, steps, + parent_pipeline_id=parent_pipeline_id, + department=department, ) # Save PID so watchdog can detect dead subprocesses (KIN-099) models.update_pipeline(conn, pipeline["id"], pid=os.getpid()) diff --git a/web/frontend/src/views/ProjectView.vue b/web/frontend/src/views/ProjectView.vue index 1ae6da9..6cde750 100644 --- a/web/frontend/src/views/ProjectView.vue +++ b/web/frontend/src/views/ProjectView.vue @@ -238,6 +238,24 @@ async function toggleAutocommit() { } } +// Auto-test toggle +const autoTest = ref(false) + +function loadAutoTest() { + autoTest.value = !!(project.value?.auto_test_enabled) +} + +async function toggleAutoTest() { + autoTest.value = !autoTest.value + try { + await api.patchProject(props.id, { auto_test_enabled: autoTest.value }) + if (project.value) project.value = { ...project.value, auto_test_enabled: autoTest.value ? 1 : 0 } + } catch (e: any) { + error.value = e.message + autoTest.value = !autoTest.value + } +} + // Audit const auditLoading = ref(false) const auditResult = ref(null) @@ -389,6 +407,7 @@ async function load() { project.value = await api.project(props.id) loadMode() loadAutocommit() + loadAutoTest() } catch (e: any) { error.value = e.message } finally {