Skip to content

id: F12.9 program upgrade with state migration and rollback #1066

Open

Description

@dezren39

F12.9 — Program upgrade with state migration

From the Phase 12 plan (.opencode/plans/phase-12-platform-flexibility.md, workstream C):

Versioned snapshots and an optional migrate export. An upgrade runs on a probe instance first (the way checkpoints already do), commits only if the migrated state round-trips, and otherwise rolls back.

Exit: a test upgrades a counter across a snapshot format change, and a deliberately failing upgrade leaves the old program running.

Coordination (2026-10-26 reprioritization, per Drew): every id roadmap item now has its own GitHub issue, and priority encodes the order: (1) the path to Phase 12 — now + priority/high; (2) Phase 12 itself — next; (3) Phase 13 and long-term ideas — priority/low. The dashboard mirrors this list (org Project "Developing Today" #4, Area id-train; Grist Program roadmap, Area id). If this item turns out to be blocked, wrong, or superseded, park or close it with a note rather than letting it stall the queue — dropping an issue is always allowed; silently stalling is not.

Activity

  1. added
    kind/featureNew feature or capability request
    source/humanFiled directly by a human
    priority/normalOrdinary priority (the default)
    app/idPackage/app: id (pkgs/ or apps/ in this repo)
    nextOrg Project gate: queued next — orchestrator adds to the board
    effort/lLarge: multi-day or open-ended; expect staged check-ins
    on Oct 27, 2026
  2. developing-today commented on Oct 27, 2026

    @developing-today
    Contributor
  3. added
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    and removed on Nov 1, 2026
  4. dezren39 commented on Nov 1, 2026

    @dezren39
    MemberAuthor

    agent-note:v1 — picked up (queue task 2342, Lane A, triage)

    Triaging F12.9 against current main: checking whether versioned snapshots, a migrate export, probe-instance upgrade, or rollback machinery exists today in pkgs/id, and what checkpoint/snapshot pieces it would build on. Verdict + routing to follow in this pass.

  5. dezren39 commented on Nov 1, 2026

    @dezren39
    MemberAuthor

    agent-note:v1 — triage verdict: CONFIRMED ABSENT, routing deferred to prerequisites (queue task 2342, Lane A)

    Verified on current main b56ccda5 (laptop primary, HEAD == origin/main):

    • No upgrade path exists. No upgrade entry point anywhere in pkgs/id/src (no fn upgrade / upgrade_program); nothing swaps a world's installed module for a new version.
    • Snapshots are unversioned. pkgs/id/src/world_store.rs checkpoints hold guest-serialized state via the plaza_snapshot / plaza_restore exports with no format-version field, and pkgs/id/src/sandbox.rs (~:207, :234) validates exactly that export pair — there is no migrate export for a guest to transform old state.
    • The piece F12.9 reuses does exist: world_store.rs (~:20) already verifies each checkpoint snapshot round-trips on a probe instance before trimming the journal — the probe-first pattern the upgrade is specified to follow.

    Routing — deliberately NO implementation packet enqueued yet, same call as the #558 triage (task 2148):

    Next action when #1064 closes (or its ABI draft pins the export surface): enqueue a staged implementation packet for this issue — (1) snapshot format version + plaza_migrate-style export in the sandbox validation, (2) probe-instance upgrade that commits only on migrated-state round-trip and otherwise leaves the old program running, (3) the plan's exit tests (counter across a format change; deliberately failing upgrade leaves the old program running). Downstream note: #558 already waits on this item, and F12.15 (id world dev) builds on it.

    This triage task completes as triaged; the issue stays open with its next sequencing intact.

  6. 3 remaining items

  7. added
    mode/onlineFully doable remotely: design, config, code, cloud
    queue/queuedHas a queued task in the Supabase agent queue
    task/triageQueue packet kind: verify, reproduce, and route this item
    on Nov 1, 2026
  8. dezren39 commented on Nov 3, 2026

    @dezren39
    MemberAuthor

    agent-note:v1
    state: triaged (coverage pass)
    Coverage pass 2026-11-03: reviewed in the fleet-wide per-issue pass (drift / overlap / already-handled / stale / blockers / ordering). Verdict: still live; queued in repo-health-code-pilot as triage at priority 40 (priority/normal). If this is already handled at current main, the triage closes it with evidence; if it needs splitting, the triage files the split.
    Found via: coverage pass 2026-11-03

  9. added
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    and removed
    queue/queuedHas a queued task in the Supabase agent queue
    on Nov 3, 2026
  10. dezren39 commented on Nov 3, 2026

    @dezren39
    MemberAuthor

    agent-note:v1
    task: 7639
    state: picked_up
    lane: code-e (direct)
    summary: Triage of #1066 (F12.9 program upgrade with state migration and rollback) started by queue task 7639. Verifying the current-main state of the id program/snapshot machinery before posting the verdict.

  11. dezren39 commented on Nov 3, 2026

    @dezren39
    MemberAuthor

    agent-note:v1
    task: 7639
    state: triaged
    lane: code-e (direct)
    verdict: confirmed — not implemented on current main; fix path scoped; blocked on prerequisite ordering

    Evidence (laptop primary ~/git/code at refs/remotes/origin/main d4d7834, 2026-11-03):

    • No migrate export, no versioned program-state snapshot format, and no probe-instance upgrade path exists in pkgs/id: a tree-wide search of pkgs/id/src/world/, world_compile.rs, and world_store.rs finds no migrate/upgrade implementation for program state.
    • The only upgrade/rollback machinery present is the journal contract (pkgs/id/src/world/mod.rs:960, from issue Define rollback compatibility for world profile journal entries #227) plus JOURNAL_VERSION header bumping in world_store.rs — that versions the journal format, not a guest program's state across a program upgrade.
    • The BUILDER capability (pkgs/id/src/world/mod.rs:154) already permission-gates "install and upgrade the world's program", so the authorization seam F12.9 needs exists; the migration mechanism itself does not.
    • The spec source is intact: .opencode/plans/phase-12-platform-flexibility.md:45 states the F12.9 design and exit test verbatim (counter upgraded across a snapshot format change; a deliberately failing upgrade leaves the old program running).

    Scoped fix path (when unblocked): versioned snapshot format for world program state + optional migrate export in the guest ABI + upgrade runner that migrates on a probe/checkpoint instance, commits only on a successful round-trip, and rolls back otherwise; exit tests per the plan.

    Blockers / ordering (why no fix packet is enqueued yet): the plan's dependency chain is F12.7 -> F12.8 -> F12.9 -> F12.15 (phase-12 plan line 75). F12.9's versioned snapshots build on the versioned ABI specification (plaza_abi_version) from F12.7 — issue #1064, still OPEN — and F12.8 is issue #1065, also OPEN. The ordered prerequisite queue is tracked on issue #1235. Enqueueing an implementation packet now would only park against #1064; the correct next action is landing F12.7 (#1064), after which this issue is ready to scope as a small_fix packet. Downstream dependent: F12.15 id world dev (issue #558) consumes this migration path.

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

Metadata

Metadata

Assignees

Labels

app/idPackage/app: id (pkgs/ or apps/ in this repo)effort/lLarge: multi-day or open-ended; expect staged check-inskind/featureNew feature or capability requestmode/onlineFully doable remotely: design, config, code, cloudnextOrg Project gate: queued next — orchestrator adds to the boardpriority/normalOrdinary priority (the default)source/humanFiled directly by a humantask/triageQueue packet kind: verify, reproduce, and route this item

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions