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. 11 remaining items

  7. 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.

  8. 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.

  9. dezren39 commented on Nov 8, 2026

    @dezren39
    MemberAuthor

    Partial verification — staying open (2026-11-07 done-task-only audit, tracking: #7016).

    Queue task(s) [7639, 2342] were marked done, and some work did land:

    No merged change closes this issue's full scope, so the done status is not treated as completion. Remainder re-queued as triage task 11529.

  10. dezren39 commented on Nov 8, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · done (triaged)

    • Agent: queue worker (repo-worker-code, lane code-y)
    • Session / ID: task 11888 (remainder triage; prior triage was task 7639)
    • Found via: queue claim
    • Task: Re-triage the remainder of issue id: F12.9 program upgrade with state migration and rollback #1066 (F12.9 program upgrade with state migration and rollback) against current state.
    • Verdict: CONFIRMED remainder — F12.9 is still not implemented, and it is still ordering-blocked, but the blocker set has narrowed since task 7639: F12.7 is now DONE; F12.8 is the only remaining prerequisite.
    • Evidence (fresh, laptop origin/main c977d913e9d2, 2026-11-08):
      • git ls-tree origin/main pkgs/id/src/world/ lists no upgrade module (actor, clock, core, handle, hotness, metrics, mod, replica, replication, signed, tests, util only), and no file under pkgs/id/src/ is named upgrade.
      • Targeted grep: the only migrate hit in pkgs/id/src/world/, world_store.rs, and world_compile.rs is a comment in world/mod.rs ("entry kind is never migrated") — no migrate export, no versioned program-state snapshot format, no probe-instance upgrade runner. (Verification note: one initial broad grep returned lines naming a world/upgrade.rs that does not exist; that output was refuted by the ls-tree and targeted-grep checks above and was not relied on.)
      • Plan source intact: .opencode/plans/phase-12-platform-flexibility.md:45 states the F12.9 design + exit test verbatim; line 75 gives the chain F12.7 -> F12.8 -> F12.9 -> F12.15.
      • Ordering update: issue id: F12.7 ABI specification and conformance suite #1064 (F12.7 ABI specification) is CLOSED (2026-11-03T18:58Z) — that prerequisite has landed. Issue id: F12.8 guest SDKs — Rust + Zig/AssemblyScript, component-model decision #1065 (F12.8 guest SDKs) is still OPEN — it is now the sole blocker; its own remainder triage (task 11887) is currently handed off to the opencode claimant, so it is live in the queue system. Tracker issue id: Path to Phase 12 — ordered prerequisite queue (CI trust → validation → journal → visibility → remaining F11) #1235 remains OPEN.
    • Fix path (unchanged, 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, rolls back otherwise; exit tests per the plan (counter across a snapshot format change; deliberately failing upgrade leaves the old program running).
    • Why no fix packet yet: enqueueing a small_fix for F12.9 now would only park against issue id: F12.8 guest SDKs — Rust + Zig/AssemblyScript, component-model decision #1065 (F12.8), the same reasoning as task 7639. The correct next action is landing F12.8; after that, issue id: F12.9 program upgrade with state migration and rollback #1066 is ready to scope as a small_fix packet for the remainder only. Downstream dependent: F12.15 (issue id: F12.15 id world dev: watch, rebuild, hot-swap, fixture replay, fuzz harness #558) consumes this migration path.
  11. added
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    and removed
    queue/claimedQueue worker lifecycle state
    work/assignedQueue worker lifecycle state
    on Nov 8, 2026
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