feat: persist workflow controls and settle stopped branches

This commit is contained in:
2026-09-18 04:32:02 +08:00
parent 7d5ebfcb09
commit 7eac8c365a
35 changed files with 1539 additions and 36 deletions

View File

@@ -35,6 +35,10 @@ type Instance struct {
DeadlineAt time.Time `db:"deadline_at"`
// CancelRequestedAt 取消意图的持久化时间;不等于取消已完成;可为空,表示尚未设置该关联或值。
CancelRequestedAt *time.Time `db:"cancel_requested_at"`
// StopKind 首次停止原因,CANCEL为用户取消、FAILURE为固定失败策略;进入核查后仍保留,为空表示未要求结清。
StopKind *string `db:"stop_kind"`
// StopRequestedAt 首次停止意图的数据库时间,重报或后续取消不覆盖;与StopKind同时为空。
StopRequestedAt *time.Time `db:"stop_requested_at"`
// CompletedAt 终结时间;非终态为空,进入终态时必须写入。
CompletedAt *time.Time `db:"completed_at"`
// RetryOf 来源记录标识,人工重新发起时用于保留历史关联;可为空,表示尚未设置该关联或值。