mirror of
https://github.com/multica-ai/multica.git
synced 2026-07-25 20:15:37 +02:00
- Expand chat-resume comment in ClaimTaskByRuntime to spell out *why* the task-row fallback exists (single failed turn must not drop chat memory) and that it covers more than just legacy NULL rows. - Replace the sessionRuntimeID := t.RuntimeID; sessionRuntimeID.Valid = ... pattern in CompleteTask/FailTask with a clearer var-then-assign that makes the "no session_id, leave runtime_id alone" coupling obvious. - Add TestClaimTask_ChatLegacyNullRuntimeFallsBackToTaskRow covering the case the prior PR's tests didn't reach: chat_session.runtime_id IS NULL (legacy / unbackfilled) plus a matching-runtime task row, fallback should resume. This is the dominant post-migration shape and was previously only covered transitively. No behavior change beyond the new test; runtime-guard semantics stay identical to PR #1905. Co-authored-by: multica-agent <github@multica.ai>