feat(runtime): cut over SessionTodo to Runtime Host authority - #4351
Conversation
jackwener
left a comment
There was a problem hiding this comment.
I found one blocking migration dependency at exact head 3a96801c9a0d1ca89e379bb8c2eec7a0543067e9.
[P1] The cutover makes blocked legacy Tasks disappear from every supported surface. The stacked foundation imports only pending and in_progress tasks. A normal legacy Task can be moved to blocked; reproducing that sequence on the stack leaves the Task in the legacy ledger but produces an initialized empty SessionTodo. This PR then removes the legacy Task tools, Host protocol, coordinator, and Desktop/TUI projections, while documenting in-place downgrade as unsupported. The result is that unfinished work waiting on an external dependency becomes invisible immediately after the first Todo read. Preserve blocked tasks through an explicit mapping before completing the cutover and add an end-to-end upgrade regression.
I did not find another P0-P2 issue in the direct cutover. The Host-owned whole-document write, settled-result-only display, branch/copy rules, retirement purge, strict protocol epoch 80, and Desktop stale-read fencing are coherent. The affected Core, Storage, Runtime, Runtime Host, UI, and CLI builds completed through the relevant surfaces, and 75 focused Todo/protocol/copy/retirement/display tests passed. The synthetic merge with current main is clean.
There is also no exact-head hosted test or windows_recovery result because this stacked PR currently targets feat/4338-session-todo-foundation rather than main; the available package/audit checks do not replace those gates. Please run the full required checks after the foundation and this migration finding are resolved and the PR is retargeted.
Automated review notice: This comment was posted by an automated review agent operated by WAWQAQ. It is not an independent human review and does not replace one.
3fc9cab to
563cdbc
Compare
3a96801 to
8fd2201
Compare
|
Confirmed and fixed in the stack at The cutover now inherits the tested Local full workspace builds completed. Storage passed 1061/1061 with 10 skips; Runtime passed 3076/3076 with 7 skips using an external TMPDIR after the default |
jackwener
left a comment
There was a problem hiding this comment.
The previous P1 is closed at exact head 8fd2201ec47da2f8a50befd6731b28da26475b80, and I found no remaining P0-P2 issue in the cutover.
The fixed foundation now maps a valid legacy Task that reached blocked to a pending Todo while preserving its subject and omitting workflow-only blocked metadata. I reproduced the full pending -> in_progress -> blocked sequence through the production SQLite stores; the first Todo bootstrap returned and persisted the expected pending item. The schema-10 upgrade path exercises the same result. The direct cutover commit is range-diff identical to the previously reviewed patch, with one additional documentation commit describing this migration.
The current head contains current main, advances the strict Runtime Host compatibility epoch from 79 to 80, and produces the same tree when merged with main. Core, Storage, Runtime, Runtime Host, UI, CLI, and Desktop builds passed; 174 focused migration, protocol, tool, transcript, renderer, and lifecycle tests passed. The full Storage run passed 1,062 tests and had one unrelated cross-process crash test fail while starting its child process; the two affected Storage suites passed 37/37 when rerun directly.
I am not approving this stacked head yet because the PR still targets feat/4338-session-todo-foundation. GitHub has no exact-head test or windows_recovery result; the successful package, audit, and admission jobs do not replace those gates. Please merge the foundation, retarget this PR to main, and let the required exact-head checks complete.
Automated review notice: This comment was posted by an automated review agent operated by WAWQAQ. It is not an independent human review and does not replace one.
8fd2201 to
c1920ee
Compare
|
Rebased #4351 onto current
Exact-head hosted |
c1920ee to
767ea56
Compare
|
The first exact-head CI run on Fixed at new exact head
The exact base-relative architecture check, epoch guard, full test build, Astryx inventory, formatting, and 207 focused tests pass locally. Two independent pre-push reviews found no P0-P2 blockers. New exact-head hosted checks are now running. |
Replace the retired Task Ledger demand chain with one Host-owned current SessionTodo document across Runtime, CLI, and Desktop. Preserve one-time legacy bootstrap, exact copy and retirement semantics, and publish the protocol change at compatibility epoch 80. Refs #4338 Generated-by: OpenAI Codex
Clarify that the one-time legacy bootstrap keeps blocked Task subjects visible as pending Todo items while dropping workflow-only metadata. Refs #4338 Generated-by: OpenAI Codex
Generated-by: OpenAI Codex
Generated-by: OpenAI Codex
767ea56 to
eb65f36
Compare
|
The second exact-head CI run reached Desktop E2E after the renderer architecture fix passed. Its only failure was the accessibility journey waiting for the retired Task Ledger Fixed at exact head
The branch was also rebased conflict-free onto current |
|
Exact-head hosted gates are now terminal green on |
jackwener
left a comment
There was a problem hiding this comment.
The previous migration issue is closed at exact head eb65f3653234667cda91a6e039356ffc7b2cf406, and I found no remaining P0-P2 issue.
The merged foundation preserves a legacy Task that reached blocked by importing it as a pending Todo with the same subject. This cutover then replaces the retired Task Ledger with one Host-owned SessionTodo document across Runtime, CLI, and Desktop without restoring a second authority. The rebase preserves main's epoch 80 assignment and uses epoch 81 for the incompatible SessionTodo protocol change.
Both issues found by the post-rebase checks are also closed. Desktop now injects localized failure copy through the existing Workbar composition boundary, so the feature no longer imports a legacy locale module or adds architecture debt. The accessibility journey now verifies the complete ordered flat Todo list, including completed items, instead of waiting for the retired “Recently completed” disclosure. I reproduced the fixed journey locally (1/1), ran the complete accessibility spec (6/6), and the base-relative renderer architecture suite passed 60/60.
The three previously reviewed commits remain range-diff equivalent; the fourth commit only updates that E2E contract. Current main is an ancestor of the head, and the synthetic merge tree equals the head tree. Exact-head CI/test, Windows recovery/windows_recovery, and the other hosted checks are terminal green.
Automated review notice: This comment was posted by an automated review agent operated by WAWQAQ. It is not an independent human review and does not replace one.
…ionTodoPanel (apache#4394) apache#4351 replaced the nested Task Ledger demand chain with the Host-owned, flat SessionTodo document (SessionTodoPanel), but its stylesheet still described the retired four-column, depth-indented tree row — selectors that could no longer match any element. Reduce the sheet to what the flat `<li>` actually renders and rename it to match the component: - Row is now a two-column `[icon] [text]` grid whose content wraps within the panel width; drop the 4-column grid and the `--task-depth` indent. - Remove dead rules: `-group`, the `[data-status]` icon colors, `-key`/`-subject`/`-meta`/`-detail`, `-terminal`/`-terminal-trigger`, the row `:focus-visible` (the `<li>` is not focusable), and the viewport `@media` block. - Delete the viewport breakpoint rather than porting it: the flat row wraps at any width. Documented that future width-responsive styling should be an `@container` query on the panel (per workbar/inspector.css / chat-header.css), since the workbar shrinks to SESSION_WORKBAR_MIN_WIDTH (320px) inside a wide window where a viewport `@media` never fires. - Rename styles/task-ledger.css -> styles/session-todo-panel.css and the `maka-task-ledger-*` class prefix -> `maka-session-todo-*`; update the @import, the maka-tokens.css reference, and regenerate the Astryx surface inventory. No user-visible change: the removed selectors matched no elements. Generated-by: Claude Code
…ionTodoPanel (apache#4394) apache#4351 replaced the nested Task Ledger demand chain with the Host-owned, flat SessionTodo document (SessionTodoPanel), but its stylesheet still described the retired four-column, depth-indented tree row. Beyond selectors that could no longer match any element, the row `padding` fed a `calc()` the never-set `--task-depth` custom property, which made the whole padding declaration invalid at computed-value time — so on main the rows actually render with padding: 0. Reduce the sheet to what the flat `<li>` renders and rename it to match the component: - Row is now a two-column `[icon] [text]` grid whose content wraps within the panel width; drop the 4-column grid (which reserved a phantom >=100px empty column) and the `--task-depth` indent. Removing the invalid calc restores the intended `var(--space-1) var(--space-2)` padding the rows were meant to have — a small but real visual change (rows regain their inset/spacing). - Remove dead rules: `-group`, the `[data-status]` icon colors, `-key`/`-subject`/`-meta`/`-detail`, `-terminal`/`-terminal-trigger`, the row `:focus-visible` (the `<li>` is not focusable), and the viewport `@media` block. - Delete the viewport breakpoint rather than porting it: the flat row wraps at any width. Documented that future width-responsive styling should be an `@container` query on the panel (per workbar/inspector.css / chat-header.css), since the workbar shrinks to SESSION_WORKBAR_MIN_WIDTH (320px) inside a wide window where a viewport `@media` never fires. - Rename styles/task-ledger.css -> styles/session-todo-panel.css and the `maka-task-ledger-*` class prefix -> `maka-session-todo-*`; update the @import, the maka-tokens.css reference, and regenerate the Astryx surface inventory. Behavioral: restoring the row padding changes the rendered spacing of task rows. Generated-by: Claude Code
…ionTodoPanel (apache#4394) apache#4351 replaced the nested Task Ledger demand chain with the Host-owned, flat SessionTodo document (SessionTodoPanel), but its stylesheet still described the retired four-column, depth-indented tree row. Beyond selectors that could no longer match any element, the row `padding` fed a `calc()` the never-set `--task-depth` custom property, which made the whole padding declaration invalid at computed-value time — so on main the rows actually render with padding: 0. Reduce the sheet to what the flat `<li>` renders and rename it to match the component: - Row is now a two-column `[icon] [text]` grid whose content wraps within the panel width; drop the 4-column grid (which reserved a phantom >=100px empty column) and the `--task-depth` indent. Removing the invalid calc restores the intended `var(--space-1) var(--space-2)` padding the rows were meant to have — a small but real visual change (rows regain their inset/spacing). - Remove dead rules: `-group`, the `[data-status]` icon colors, `-key`/`-subject`/`-meta`/`-detail`, `-terminal`/`-terminal-trigger`, the row `:focus-visible` (the `<li>` is not focusable), and the viewport `@media` block. - Delete the viewport breakpoint rather than porting it: the flat row wraps at any width. Documented that future width-responsive styling should be an `@container` query on the panel (per workbar/inspector.css / chat-header.css), since the workbar shrinks to SESSION_WORKBAR_MIN_WIDTH (320px) inside a wide window where a viewport `@media` never fires. - Rename styles/task-ledger.css -> styles/session-todo-panel.css and the `maka-task-ledger-*` class prefix -> `maka-session-todo-*`; update the @import, the maka-tokens.css reference, and regenerate the Astryx surface inventory. - Add a `Product/Session Todo` Storybook story covering the populated, long-content-at-320px, empty, loading, and error states — the governance-sanctioned surface (docs/frontend-css-governance.md) for verifying the restored row padding and content wrapping. Behavioral: restoring the row padding changes the rendered spacing of task rows. Generated-by: Claude Code
…ionTodoPanel (apache#4394) apache#4351 replaced the nested Task Ledger demand chain with the Host-owned, flat SessionTodo document (SessionTodoPanel), but its stylesheet still described the retired four-column, depth-indented tree row. Beyond selectors that could no longer match any element, the row `padding` fed a `calc()` the never-set `--task-depth` custom property, which made the whole padding declaration invalid at computed-value time — so on main the rows actually render with padding: 0. Reduce the sheet to what the flat `<li>` renders and rename it to match the component: - Row is now a two-column `[icon] [text]` grid whose content wraps within the panel width; drop the 4-column grid (which reserved a phantom >=100px empty column) and the `--task-depth` indent. Removing the invalid calc restores the intended `var(--space-1) var(--space-2)` padding the rows were meant to have — a small but real visual change (rows regain their inset/spacing). - Remove dead rules: `-group`, the `[data-status]` icon colors, `-key`/`-subject`/`-meta`/`-detail`, `-terminal`/`-terminal-trigger`, the row `:focus-visible` (the `<li>` is not focusable), and the viewport `@media` block. - Delete the viewport breakpoint rather than porting it: the flat row wraps at any width. Documented that future width-responsive styling should be an `@container` query on the panel (per workbar/inspector.css / chat-header.css), since the workbar shrinks to SESSION_WORKBAR_MIN_WIDTH (320px) inside a wide window where a viewport `@media` never fires. - Rename styles/task-ledger.css -> styles/session-todo-panel.css and the `maka-task-ledger-*` class prefix -> `maka-session-todo-*`; update the @import, the maka-tokens.css reference, and regenerate the Astryx surface inventory. - Add a `Product/Session Todo` Storybook story covering the populated, long-content-at-320px, empty, loading, and error states — the governance-sanctioned surface (docs/frontend-css-governance.md) for verifying the restored row padding and content wrapping. Behavioral: restoring the row padding changes the rendered spacing of task rows. Generated-by: Claude Code
…ionTodoPanel (apache#4394) apache#4351 replaced the nested Task Ledger demand chain with the Host-owned, flat SessionTodo document (SessionTodoPanel), but its stylesheet still described the retired four-column, depth-indented tree row. Beyond selectors that could no longer match any element, the row `padding` fed a `calc()` the never-set `--task-depth` custom property, which made the whole padding declaration invalid at computed-value time — so on main the rows actually render with padding: 0. Reduce the sheet to what the flat `<li>` renders and rename it to match the component: - Row is now a two-column `[icon] [text]` grid whose content wraps within the panel width; drop the 4-column grid (which reserved a phantom >=100px empty column) and the `--task-depth` indent. Removing the invalid calc restores the intended `var(--space-1) var(--space-2)` padding the rows were meant to have — a small but real visual change (rows regain their inset/spacing). - Remove dead rules: `-group`, the `[data-status]` icon colors, `-key`/`-subject`/`-meta`/`-detail`, `-terminal`/`-terminal-trigger`, the row `:focus-visible` (the `<li>` is not focusable), and the viewport `@media` block. - Delete the viewport breakpoint rather than porting it: the flat row wraps at any width. Documented that future width-responsive styling should be an `@container` query on the panel (per workbar/inspector.css / chat-header.css), since the workbar shrinks to SESSION_WORKBAR_MIN_WIDTH (320px) inside a wide window where a viewport `@media` never fires. - Rename styles/task-ledger.css -> styles/session-todo-panel.css and the `maka-task-ledger-*` class prefix -> `maka-session-todo-*`; update the @import, the maka-tokens.css reference, and regenerate the Astryx surface inventory. Behavioral: restoring the row padding changes the rendered spacing of task rows. The existing real-host stories (Product/Session Workbar -> Tasks / TasksEmpty / TasksLoadFailed) render SessionTodoPanel through the workbar's `todo.read` service and cover the populated/empty/error states. Generated-by: Claude Code
#4351 removed the Task Ledger protocol operation and coordinator but left the layers above and below it standing: a 970-line core module, a closed three-file storage island, a legacy bootstrap path, and the SQLite table that path read from. Nothing on `main` writes that table any more, and nothing outside the island reads the modules. BREAKING: upgrading a workspace last opened by v0.2.0-incubating-rc1 or earlier discards its unfinished Tasks. Those releases shipped a live Task Ledger, and `bootstrapLegacyTasks` — the path that would have carried those rows into SessionTodo on first read — has never shipped in any release. Rather than keep an unshipped bridge alive for a pre-1.0 surface, workflow schema 12 drops `workflow_task_ledger_events` outright and the bridge goes with it. Tasks are not imported; SessionTodo starts empty. Completed and cancelled Tasks were never going to be imported anyway, and the affected surface is one RC and a 0.1.x line. The drop follows the `workflow_plan_reminders` idiom directly above it. Two mechanisms that name Task Ledger are deliberately kept: `RELEASED_WORKFLOW_PROJECTION_TABLES` still retires `workflow_task_ledger_projections`, which released databases really carry, and the released-cutover validation contract in `operational-state-store.ts` still records what a released build wrote to `cutover_journal` — dropping that entry would fail a workspace closed rather than clean it. `readOrBootstrap` now persists an empty document, and `initializeCopy` no longer writes a placeholder row into an uninitialized copy source; both are observationally unchanged and now have tests that pin the stored rows rather than only the returned snapshot. Tests that only needed some store to open the workflow database move to the Plan store, and the schema-10 migration case asserts the new drop. `docs/session-todo-lifecycle.md` no longer describes the removed bootstrap. `apps/desktop/src/renderer/styles/task-ledger.css` is residue from the same retirement and is tracked separately in #4394. Closes #4399 Generated-by: Claude Code
#4351 removed the Task Ledger protocol operation and coordinator but left the layers above and below it standing: a 970-line core module, a closed three-file storage island, a legacy bootstrap path, and the SQLite table that path read from. Nothing on `main` writes that table any more, and nothing outside the island reads the modules. BREAKING: upgrading a workspace last opened by v0.2.0-incubating-rc1 or earlier discards its unfinished Tasks. Those releases shipped a live Task Ledger, and `bootstrapLegacyTasks` — the path that would have carried those rows into SessionTodo on first read — has never shipped in any release. Rather than keep an unshipped bridge alive for a pre-1.0 surface, workflow schema 12 drops `workflow_task_ledger_events` outright and the bridge goes with it. Tasks are not imported; SessionTodo starts empty. Completed and cancelled Tasks were never going to be imported anyway, and the affected surface is one RC and a 0.1.x line. `CHANGELOG.md` records the affected releases and tells users to finish, export, or back up outstanding Tasks before first opening this build, since the migration removes the only live copy. The drop follows the `workflow_plan_reminders` idiom directly above it. Two mechanisms that name Task Ledger are deliberately kept: `RELEASED_WORKFLOW_PROJECTION_TABLES` still retires `workflow_task_ledger_projections`, which released databases really carry, and the released-cutover validation contract in `operational-state-store.ts` still records what a released build wrote to `cutover_journal` — dropping that entry would fail a workspace closed rather than clean it. `readOrBootstrap` now persists an empty document, and `initializeCopy` no longer writes a placeholder row into an uninitialized copy source; both are observationally unchanged and now have tests that pin the stored rows rather than only the returned snapshot. Tests that only needed some store to open the workflow database move to the Plan store, and the schema-10 migration case asserts the new drop. `docs/session-todo-lifecycle.md` no longer describes the removed bootstrap. `apps/desktop/src/renderer/styles/task-ledger.css` is residue from the same retirement and is tracked separately in #4394. Closes #4399 Generated-by: Claude Code
Summary
Cut the product over from the retired Task Ledger demand chain to one Runtime Host-owned SessionTodo current document. Runtime exposes strict whole-list
todo_readandtodo_writetools, TUI renders only settled committed results, and Desktop projects a flat read-only current list through the same Host protocol.#4340 is merged. This branch was rebuilt directly on current
main: the two original Foundation commits were dropped, so the PR contains the direct cutover, its migration documentation, a narrow Desktop architecture fix, and an E2E contract update identified by exact-head CI.Refs #4338
Contract and lifecycle
Surfaces and safety
todo_writemodel arguments are omitted from live previews and durable transcript projections; only the store-returned committed result is rendered.session.todo.query, refreshes ontodo:changed, and fences stale reads by Session/request generation.Recently completeddisclosure is not part of the SessionTodo UI.taskIdsdecode field empty but no longer exposes Task IDs as an input or model-visible checkpoint promise.Migration and rollback
There is no dual write. Existing pending/in-progress legacy Tasks are imported once on first Host read; blocked Tasks are conservatively made pending so reachable unfinished subjects stay visible for replanning. An explicit Todo write before that read creates the authoritative document directly and never merges legacy state.
Rollback to a pre-cutover binary requires restoring a pre-upgrade data-root backup. Such a rollback loses Todo edits made after the backup; in-place downgrade against the upgraded database is not supported.
Verification
mainatbcbea003d; the branch contains four commits: direct cutover, migration docs, Desktop architecture fix, and flat-Todo E2E update.mainis conflict-free.80 -> 81.eb65f3653.AI use
Tool(s) and scope: OpenAI Codex implemented, tested, documented, and independently reviewed the Runtime Host cutover under human direction; the commits include the required Generated-by trailer.
Checklist
Does this PR entail a change in behavior?