fix(mcp): add task_key/task_name to TaskInfo and strengthen test coverage

- Add task_key and task_name fields to TaskInfo schema and ALL_TASK_COLUMNS;
  these are real Task model columns present in the REST API search_columns
- Expand search_columns in list_tasks to include task_key and task_name
- Strengthen test_list_action_logs_default_7day_filter_applied to also
  assert the injected filter appears in filters_applied with an ISO string value

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Amin Ghadersohi
2026-05-20 23:30:59 +00:00
parent b416a9b0a3
commit 2bbd529ab7
4 changed files with 23 additions and 3 deletions

View File

@@ -36,6 +36,8 @@ def create_mock_task(
task_id: int = 1,
task_uuid: str | None = None,
task_type: str = "sql_execution",
task_key: str = "default-key",
task_name: str | None = None,
status: str = "success",
scope: str = "private",
changed_on: datetime | None = None,
@@ -45,6 +47,8 @@ def create_mock_task(
task.id = task_id
task.uuid = task_uuid or SAMPLE_UUID
task.task_type = task_type
task.task_key = task_key
task.task_name = task_name
task.status = status
task.scope = scope
task.changed_on = changed_on or datetime(2024, 1, 2, 10, 0, 0, tzinfo=timezone.utc)