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
[lifecycle-RSK] RSK-06: Route latch and phase writes through events #1796
Design doc: docs/architecture/task-lifecycle-target-architecture.md (not yet on main)
Ticket plan: docs/architecture/task-lifecycle-run-state-kernel-tickets.md (not yet on main)
Context
The abort path carries the highest bug value. Every writer of a latch field must go through a helper before any latch read flips. This includes the external writers, so #1797 and #1798 do not break their compile.
Developer Notes
Route each source in the design doc "Abort sources and reasons" table through its helper.
Route the four isInitialized writes through the initialized helper (Task.ts:2266, 2391, 2412, 2892). Each instance takes one of these paths. [lifecycle-RSK] RSK-11: Flip isInitialized reads #1799 flips the reads after these writes have soaked on nightly.
Confirm the comparison shows zero untagged divergence and zero untagged rejections on these paths.
Exit criteria: every latch write, and every isInitialized write, goes through a helper in Task, ClineProvider, and checkpointRestoreHandler. The fields stay authoritative. Tests pass.
Reversibility: reads are unchanged, so behavior is unchanged.
changed the title [-][lifecycle-RSK] RSK-06: Route latch writes through events[/-][+][lifecycle-RSK] RSK-06: Route latch and phase writes through events[/+]on Sep 26, 2026
Tracking
docs/architecture/task-lifecycle-target-architecture.md(not yet onmain)docs/architecture/task-lifecycle-run-state-kernel-tickets.md(not yet onmain)Context
The abort path carries the highest bug value. Every writer of a latch field must go through a helper before any latch read flips. This includes the external writers, so #1797 and #1798 do not break their compile.
Developer Notes
cancelTask:reasonSetatClineProvider.ts:3572,abortRequested(false)throughabortTask(), thenabandonRequestedat:3588. Keep this order for issue fix(task-lifecycle): preserve parent-child link when delegated subtask is interrupted #560.abortTask(isAbandoned)(Task.ts:2680-2687):abortRequested(isAbandoned). This coversremoveClineFromStack(ClineProvider.ts:631),createTaskWithHistoryItem(ClineProvider.ts:1389), and the checkpoint-restore delete (checkpointRestoreHandler.ts:34, abandoned false).disposeOnce(Task.ts:2770):disposeRequested. It must not changereason.Task.ts:3718):reasonSet(cancelReason), thenabortRequested(false). Retry backoff (Task.ts:3738):reasonSet("user_cancelled"), thenabortRequested(false).resumeAfterDelegationresets (Task.ts:2881-2883): confirm the instance is always new, then delete the three latch resets. A reset has no event. [lifecycle-RSK] RSK-10: Route stream, ask, and turn-field writes through events #1804 owns the resets at:2884-2886.isInitializedwrites through theinitializedhelper (Task.ts:2266, 2391, 2412, 2892). Each instance takes one of these paths. [lifecycle-RSK] RSK-11: Flip isInitialized reads #1799 flips the reads after these writes have soaked on nightly.Exit criteria: every latch write, and every
isInitializedwrite, goes through a helper inTask,ClineProvider, andcheckpointRestoreHandler. The fields stay authoritative. Tests pass.Reversibility: reads are unchanged, so behavior is unchanged.