Skip to content

chore(storage,runtime): retire legacy Task Ledger after SessionTodo migration window #4421

Description

@me2seeks

Problem

#4351 cut the product over to SessionTodo, but intentionally retained the legacy Task Ledger replay, codecs, tests, and tables for lazy migration and rollback. A SessionTodo document is materialized only when a Session first reads Todo: pending/in-progress Tasks are imported, blocked Tasks become pending, and even an empty document is persisted.

Consequently, directly deleting the legacy tables or replay code would strand old Sessions that have not yet reached readOrBootstrap. #4420 separately repairs the persisted Runtime Host access grant transition from task.ledger.query to session.todo.query; it does not materialize legacy Task data.

Desired outcome

After an explicitly chosen migration window, supported State Roots reach a durable SessionTodo document without any runtime dependency on legacy Task Ledger state. Then remove the retired implementation and database storage without reintroducing a dual writer or a dual product surface.

Scope and acceptance criteria

  • Define the supported pre-retirement State Root/version boundary and the backup, restore, and downgrade policy.
  • Define and test a deterministic final migration for eligible Sessions that have no SessionTodo document yet, including initialized-empty semantics and the existing blocked-to-pending mapping.
  • Treat the fix(desktop): recover managed Runtime Host startup #4420 access-grant compatibility path as release-upgrade evidence before declaring the legacy operation fully retired.
  • Remove legacy Task Ledger replay, codecs, stores, operational-backup handling, tests, and SQLite tables only after the final migration is proven.
  • Verify no remaining production consumer exposes task_ tools, task.ledger.query, the legacy Task change feed, or a Task Ledger UI projection.
  • Add upgrade, backup/restore, removal, and unsupported-downgrade regressions for the final boundary.

Non-goals

  • Do not change the SessionTodo contract: it remains a Host-owned current snapshot, read explicitly with todo_read and replaced atomically with todo_write.
  • Do not restore Task identity, mutation history, revision/CAS, turn-tail injection, task-to-subagent binding, claim/settle, or a compatibility switch.
  • Do not begin physical deletion merely because feat(runtime): cut over SessionTodo to Runtime Host authority #4351 merged; the migration-window and State Root support decisions are required first.

Related

AI assistance disclosure: Codex helped derive the migration and compatibility acceptance criteria from the merged SessionTodo cutover. I reviewed the scope and own the final position.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions