fix(kanban): expose task runtime limit in JSON

This commit is contained in:
fangliquanflq
2026-09-21 03:16:19 +08:00
committed by Teknium
parent 7ff57f0cb2
commit 1a4c68ce97
2 changed files with 12 additions and 1 deletions

View File

@@ -19,7 +19,7 @@ _TASK_DICT_FIELDS = (
"id", "title", "body", "assignee", "status", "priority", "tenant",
"workspace_kind", "workspace_path", "branch_name", "project_id",
"created_by", "created_at", "started_at", "completed_at", "result",
"skills", "max_retries", "model_override", "provider_override",
"skills", "max_runtime_seconds", "max_retries", "model_override", "provider_override",
"session_id", "workflow_template_id", "current_step_key", "completion_contract", "last_failure_error",
)
_SHOW_RUN_FIELDS = (

View File

@@ -59,6 +59,17 @@ def test_kanban_list_json_includes_session_id(kanban_home):
)
def test_kanban_show_json_includes_runtime_limit(kanban_home):
with kbc.connect() as conn:
task_id = kb.create_task(
conn, title="bounded task", max_runtime_seconds=2700
)
payload = json.loads(kc.run_slash(f"show {task_id} --json"))
assert payload["task"]["max_runtime_seconds"] == 2700
def test_kanban_show_text_renders_graph_with_open_connection(kanban_home):
with kbc.connect_closing() as conn:
parent_id = kb.create_task(conn, title="parent task")