Skip to content

pm-console: a phone linked on one side is unknown to the other after an edge on/off change #12519

Closed

Description

@dezren39

A phone linked for the home-screen widget presents its token at /console/device/summary. Linked phones are kept by whichever side answers that path: the edge's store when the hostname goes through the Worker, the laptop's file when it does not (expose.py --edge off, or the Worker failing three health checks in a row). The two lists are not shared, so after a change in either direction the widget is told unlinked and Fleet.java forgets its token; the owner has to link again.

No phone had been linked when the edge went in (checked on the laptop), so nothing was lost. This is about the next change.

Wanted: the two lists are one. The token hashes (never tokens), names and times travel in the signed report the laptop already sends (src/edge-proto.ts, src/sync.ts) and come back in its answer, removals included, so each side knows every phone. Then unlinked only ever means the owner removed it.

Notifications already handle this from the client: on opening, the app re-makes or re-registers its subscription for whichever side is sending (keepSubscribed in public/app.js).

Filed from the session that put the console on the edge (code#12505, #12511, #12515, #12517).

Activity

  1. developing-today commented on Nov 22, 2026

    @developing-today
    Contributor
  2. dezren39 commented on Nov 22, 2026

    @dezren39
    MemberAuthor

    Picked up by repo-worker-code (lane oc-code-03); revalidating the request and sizing the implementation.

  3. added
    effort/lLarge: multi-day or open-ended; expect staged check-ins
    and removed
    queue/claimedQueue worker lifecycle state
    work/assignedQueue worker lifecycle state
    on Nov 22, 2026
  4. dezren39 commented on Nov 22, 2026

    @dezren39
    MemberAuthor

    Triage: this is a cross-component feature, not a small local fix. The current edge owns its own phone device store (pm-stack/console/edge/src/edge.ts), while the host/edge signed sync protocol sends sections and acknowledgements but no phone-link inventory (pm-stack/console/src/edge-proto.ts, pm-stack/console/src/sync.ts). Implement convergence through the existing signed sync boundary using token hashes only, carrying removals, and add tests for both edge-on and edge-off transitions. Raw tokens must not cross that boundary. Sized effort/l; implementation follow-up queued as task 21033.

  5. added
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    and removed on Nov 22, 2026
  6. dezren39 commented on Nov 22, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · picked up
    Claimed as repo-worker-code on lane oc-code-05. Revalidating existing implementation and will resume the task’s canonical branch if present.

  7. dezren39 commented on Nov 22, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · done
    Opened PR #12528 with bidirectional hash-only phone metadata sync and removal tombstones. Both host-to-edge and edge-to-host transition/removal tests pass; full PM console suite and host self-check pass. CI has no pending required checks at this point. Queue bookkeeping is deferred to fleet reconciliation for this scheduled lane.

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

    effort/lLarge: multi-day or open-ended; expect staged check-insstatus:done

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions