You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 593ff6e
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: docs/architecture/task-lifecycle-persisted-ownership-model.md
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,7 +23,7 @@ All blocks use one vocabulary, established here so that dependent workstreams (P
23
23
-**Lock-time ownership check.** A required new check on the parent record, specified under LIFE-BLK-P1-001. It runs in the parent file's merge. The gap report's dependency column for `LIFE-GAP-001` calls it the disk-authoritative ownership guard.
24
24
-**Lock-time generation check.** A required new check on the child record, specified under LIFE-BLK-P1-012. It runs in the child file's merge. It is a separate check because the generation lives in the child file, and each file has its own lock. `mergeHistoryDelta` sees only one disk record per call, so one check cannot compare both files under their locks.
25
25
-**Cached updater input.** Both `TaskHistoryStore.atomicReadAndUpdate` and `atomicUpdatePair` pass the updater the cached item, not the disk record. The updater result becomes a delta against the cache, and `mergeHistoryDelta` merges that delta into disk. So a reducer check inside an updater validates the cache, not disk.
26
-
-**Lifecycle-owned fields.** The fields whose authoritative writer is the lifecycle layer: `status`, `rootTaskId`, `parentTaskId`, `delegatedToId`, `childIds`, `awaitingChildId`, `completedByChildId`, `completionResultSummary`, and `pendingAction`. The block-level ownership table is under LIFE-BLK-P1-002 below.
26
+
-**Lifecycle-owned fields.** The fields whose authoritative writer is the lifecycle layer: `status`, `rootTaskId`, `parentTaskId`, `delegatedToId`, `childIds`, `awaitingChildId`, `completedByChildId`, `completionResultSummary`, `explicitResume`, and `pendingAction`. The block-level ownership table is under LIFE-BLK-P1-002 below.
27
27
-**Attempt generation.** A monotonically increasing per-task token distinguishing one execution attempt of the same task ID from the next after interruption and resume. No such persisted token exists today; `PendingTaskAction.actionId` is pending-approval identity, not attempt identity (see LIFE-BLK-P1-012).
@@ -71,6 +71,7 @@ Inside each write, `writeTaskFile` runs `mergeHistoryDelta` under that file's ad
71
71
|`delegatedToId`, `awaitingChildId`|`delegateTaskToChild`, `completeDelegatedChild`, `abandonDelegatedChild`, and the repair paths | No |
72
72
|`childIds`| The same reducers. The merge unions concurrent additions. | No |
73
73
|`completedByChildId`, `completionResultSummary`|`completeDelegatedChild` and reconciliation repair. Standalone completion writes `status` only. | No |
74
+
|`explicitResume`|`resumeInterruptedTask` sets it on the explicit resume and no writer clears it. Startup reconciliation reads it in `reconcileDelegationStateCore`; the reducer model strips it because reconciliation sits outside the persisted reducer graph. | No |
74
75
|`pendingAction`|`setPendingTaskAction` (`ClineProvider.ts:740`), the compare-and-clear settlement (`:752-757`), and the delegation and completion paths | No |
75
76
|`id`, `number`, `task`| Creation | Creation only |
76
77
|`ts`| Metadata. `taskMetadata` sets it from the last relevant message on every save (`taskMetadata.ts:69-73`). | Yes |
awaitingChildId: z.string().optional(),// Child currently awaited (set when delegated)
49
49
completedByChildId: z.string().optional(),// Child that completed and resumed this parent
50
50
completionResultSummary: z.string().optional(),// Summary from completed child
51
+
explicitResume: z.boolean().optional(),// Set when the explicit user-resume path reactivated this task; startup recovery keeps the parent's awaiting link
0 commit comments