kin: KIN-128-backend_dev
This commit is contained in:
parent
d3bb5ef6a9
commit
11314a8c37
9 changed files with 348 additions and 4 deletions
|
|
@ -69,6 +69,7 @@ CREATE TABLE IF NOT EXISTS tasks (
|
|||
category TEXT DEFAULT NULL,
|
||||
telegram_sent BOOLEAN DEFAULT 0,
|
||||
acceptance_criteria TEXT,
|
||||
smoke_test_result JSON DEFAULT NULL,
|
||||
created_at DATETIME DEFAULT CURRENT_TIMESTAMP,
|
||||
updated_at DATETIME DEFAULT CURRENT_TIMESTAMP
|
||||
);
|
||||
|
|
@ -779,6 +780,12 @@ def _migrate(conn: sqlite3.Connection):
|
|||
conn.execute("ALTER TABLE tasks ADD COLUMN completed_at DATETIME DEFAULT NULL")
|
||||
conn.commit()
|
||||
|
||||
# KIN-128: Add smoke_test_result to tasks — stores smoke_tester agent output
|
||||
task_cols_final2 = {r[1] for r in conn.execute("PRAGMA table_info(tasks)").fetchall()}
|
||||
if "smoke_test_result" not in task_cols_final2:
|
||||
conn.execute("ALTER TABLE tasks ADD COLUMN smoke_test_result JSON DEFAULT NULL")
|
||||
conn.commit()
|
||||
|
||||
|
||||
def _seed_default_hooks(conn: sqlite3.Connection):
|
||||
"""Seed default hooks for the kin project (idempotent).
|
||||
|
|
|
|||
|
|
@ -36,6 +36,7 @@ def validate_completion_mode(value: str) -> str:
|
|||
_JSON_COLUMNS: frozenset[str] = frozenset({
|
||||
"tech_stack",
|
||||
"brief", "spec", "review", "test_result", "security_result", "labels",
|
||||
"smoke_test_result",
|
||||
"tags",
|
||||
"dependencies",
|
||||
"steps",
|
||||
|
|
@ -379,7 +380,7 @@ def update_task(conn: sqlite3.Connection, id: str, **fields) -> dict:
|
|||
"""
|
||||
if not fields:
|
||||
return get_task(conn, id)
|
||||
json_cols = ("brief", "spec", "review", "test_result", "security_result", "labels")
|
||||
json_cols = ("brief", "spec", "review", "test_result", "security_result", "labels", "smoke_test_result")
|
||||
for key in json_cols:
|
||||
if key in fields:
|
||||
fields[key] = _json_encode(fields[key])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue