From da8110b2ea91b681f8c13dff5cb2682ca63b265b Mon Sep 17 00:00:00 2001 From: Gros Frumos Date: Tue, 17 Mar 2026 16:37:09 +0200 Subject: [PATCH 1/2] =?UTF-8?q?kin:=20KIN-OBS-020=20Cleanup:=20import=20er?= =?UTF-8?q?rno=20+=20=D0=B4=D0=B2=D0=BE=D0=B9=D0=BD=D0=BE=D0=B9=20os.getpi?= =?UTF-8?q?d()=20=D0=B2=20agents/runner.py?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/db.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/core/db.py b/core/db.py index 74d01df..a54790d 100644 --- a/core/db.py +++ b/core/db.py @@ -663,10 +663,11 @@ def _migrate(conn: sqlite3.Connection): # Fix orphaned dept_sub pipelines left in 'running' state due to double-create bug # (KIN-ARCH-012): before the fix, _execute_department_head_step created a pipeline # that was never updated, leaving ghost 'running' records in prod DB. - conn.execute( - "UPDATE pipelines SET status = 'failed' WHERE route_type = 'dept_sub' AND status = 'running'" - ) - conn.commit() + if "pipelines" in existing_tables: + conn.execute( + "UPDATE pipelines SET status = 'failed' WHERE route_type = 'dept_sub' AND status = 'running'" + ) + conn.commit() def _seed_default_hooks(conn: sqlite3.Connection): From 9bd5c22cb5add0eee5f40a7491046d2c53647c78 Mon Sep 17 00:00:00 2001 From: Gros Frumos Date: Tue, 17 Mar 2026 16:37:22 +0200 Subject: [PATCH 2/2] kin: auto-commit after pipeline --- tests/test_watchdog.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/test_watchdog.py b/tests/test_watchdog.py index da5b2b9..cc7ec44 100644 --- a/tests/test_watchdog.py +++ b/tests/test_watchdog.py @@ -1,6 +1,7 @@ -"""Tests for pipeline watchdog (KIN-099, KIN-OBS-015).""" +"""Tests for pipeline watchdog (KIN-099, KIN-OBS-015, KIN-OBS-019).""" import errno +import inspect import json import os import threading