操作
AIタスク #11273
未完了[Spartan X][W8B-4] 旧DB stale running Run 起動時reconcile
ステータス:
新規
優先度:
通常
担当者:
-
開始日:
2026-09-11
期日:
進捗率:
0%
予定工数:
from_agent:
to_agent:
lock_required:
context_json:
session_id:
priority_custom:
start_time:
end_time:
execution_time:
acceptance_criteria:
assigned_role:
human_gate:
gate_type:
chain_root_id:
wave_id:
説明
親: #10321 / 依存: W8B master 5218573
目的: 旧Orchestrate DBに残る「taskはfailed/cancelled/done等terminalなのにruns.status='running'」の不整合を、新W8B起動時に決定論的・監査可能・冪等に整合させる。
現行live DBで4件確認: 1件 task=cancelled、3件 task=failed。いずれも2026-07の旧履歴でtask_eventsはterminal遷移済み。
方針:
- QueueDB初期化/migration後にterminal taskに属するrunning runのみ対象。
- task failed→run failed、task cancelled→run cancelled。task doneを扱う場合は既存terminal taskを正としてcompletedへ。ただし非terminal taskは触らない。
- completed_atをreconcile時刻、summaryに固定reason、task_event
stale_run_reconciledをrun_id付きで記録。 - exit_codeを推測しない。既存値は保持。
- 同じDBで再初期化しても二重event/変更なし。
受入条件: legacy schema fixture→migration→stale run terminal化、非terminal running保持、event監査、2回init冪等、既存W8B full regression維持。直接DB手修正は禁止。
Redmine Admin さんが12日前に更新
canonical master 4e958e3へfast-forwardしOrchestrate daemon再起動済み。live DB migration成功。旧stale running Run 4件をtask状態に合わせ cancelled/failedへ監査付きreconcile、stale terminal-running=0。stale_run_reconciled event 4件確認。task_ref/conversation_id/source_run_id等新schemaもlive DBへ反映。
操作