[lifecycle-RSK] RSK-15: Add the RunState to persisted-status consistency check #1808
Copy link
Copy link
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Tracking
- Epic: [lifecycle-RSK] Run-state kernel #1790
- Size: 1 SP
- Blocked by: [lifecycle-RSK] RSK-13: Wrap run state in a task actor with a serialized mailbox #1806, and P3-013 (tracked in [lifecycle-P3] Schema, path, and vocabulary #1691)
- Design doc:
docs/architecture/task-lifecycle-target-architecture.md(not yet onmain) - Ticket plan:
docs/architecture/task-lifecycle-run-state-kernel-tickets.md(not yet onmain)
Context
The store stays the source of persisted status. The webview reads it from the store (ClineProvider.ts:3021). Do not derive persisted status from RunState. The two can disagree on purpose: a parent abandoned in memory while the disk says delegated, a resumed child that runs while the disk says interrupted, and, until LIFE-BLK-P1-039 lands, a continued completed task that runs while the disk says completed (LIFE-GAP-039). LIFE-BLK-P6-029 forbids that inference. LIFE-BLK-P3-013 owns the persisted-status type. Both are in the remediation blocks.
Developer Notes
- Add a pure function that maps
RunStateto the set of persisted statuses it allows. - Use it as a consistency check against the store, not as the source.
- Log a mismatch that is not an expected disagreement.
- Keep
TaskStatusa separate projection of the ask markers. - Add unit tests for the map and for the three expected-disagreement cases.
Exit criteria: the check runs against the store. The store stays authoritative. Tests pass.
Reversibility: additive check.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request
Activity