Merge dev to main: Security improvements and comprehensive test infrastructure #39

Merged
jimmy merged 195 commits from dev into main 2026-04-08 01:42:27 +08:00
Showing only changes of commit 9fcbeca264 - Show all commits
+6 -1
View File
@@ -211,6 +211,7 @@ async def move_task(
# Handle automatic time tracking
if old_status != "in_progress" and move.status == "in_progress":
print(f"[Move] Task {task_id} moving to in_progress, old_status={old_status}")
await opc_db.start_time_entry(
task_id=task_id,
project_id=current_task.get("project_id"),
@@ -219,14 +220,18 @@ async def move_task(
# Auto-assign to default agent (PM) if not already assigned
if not current_task.get("assigned_to"):
print(f"[Move] Task {task_id} not assigned, auto-assigning to PM agent")
updates["assigned_to"] = "pm"
updates["assigned_type"] = "agent"
# Create agent execution record
await opc_db.create_agent_execution(
execution_id = await opc_db.create_agent_execution(
task_id=task_id,
agent_id="pm",
actor=user.username
)
print(f"[Move] Created agent execution {execution_id} for task {task_id}")
else:
print(f"[Move] Task {task_id} already assigned to {current_task.get('assigned_to')}")
if old_status == "in_progress" and move.status != "in_progress":
await opc_db.stop_time_entry(task_id=task_id)