Skip to content

Actor page empty after daemon restart — list_actors reads in-memory state, never reconstructs from chain #233

@hanwencheng

Description

@hanwencheng

Context

GET /v1/actors reads an in-memory state.actors map (ui_bridge.rs::list_actors) that is populated during onboarding/pairing but lost on a daemon restart and never rebuilt from chain. After a restart the master + agents are still registered on-chain (operatorMasterWallet[omni]; getOperatorDevices(omni) returns the master + agent device hashes) and GET /v1/onboarding/state correctly reports chain: "master-registered" (because registered_master is rehydrated) — but /v1/actors returns [], so the actor page is empty even though everything is bound. The code already flags this: rehydrate_master_session carries the comment "list_actors reads it from chain when absent (E7 actor-page follow-up)."

Scope

  • crates/agentkeys-daemon/src/ui_bridge.rslist_actors and/or rehydrate_master_session.
  • Reconstruct the actor tree from chain: master from registered_master / operatorMasterWallet[omni]; agents from getOperatorDevices(omni)getDevice(hash) (tier, actor_omni, active) → ApiActor (+ enrich_actor_account).
  • Reflect on-chain truth even with an empty in-memory map (post-restart); reconcile with in-memory actors.

Acceptance

  • After a daemon restart, the actor page shows the master + every bound agent (cross-checked against getOperatorDevices).
  • Revoked devices excluded (isActive == false).

Effort

~M.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/daemonagentkeys-daemon (sidecar) work

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions