Skip to content

pm-console edge: the platform's settings are whatever the last machine told it (who may sign in, which repositories, the queue) #14163

Backlog

Description

@dezren39

What is so

The Worker holds no settings of its own. At every report the laptop's console sends its whole configuration, and the Worker stores whatever it was sent (pm-stack/console/edge/src/edge.ts, the sync handler: edgeConfig(msg.config) → kv.put("cfg", cfg); the sender is config() in pm-stack/console/src/server.ts). That is everything in EdgeConfig (pm-stack/console/src/edge-proto.ts):

  • who may sign in: owners, issuers, certNames, and the Android app's androidPackage / androidFingerprints
  • where the work is: repo, queue, queueDbUrl, queueTokenName (a name, not a value), promptLabel
  • where to look for what needs the owner: needsRepos

So the platform's settings are the environment and defaults of whichever checkout the last machine to report was running.

What it cost, seen today

The console's default needsRepos named three repositories by names they no longer have (fixed with #14103's fix). The correction is merged, deployed to Cloudflare from Actions, and changes nothing in service: the laptop's checkout is behind main (#13833), so it goes on telling the Worker the old list, and the Worker goes on asking by the old names. A change to the platform's own settings reaches the platform only when the laptop runs it. That is the laptop being required for a core function, which is what the platform was reworked to end.

What it will cost with a second machine (#13492)

  • Two machines on different checkouts each replace the other's settings at every report, and the Worker flips between them (it also re-evaluates what it can do itself each time they change).
  • Any enrolled machine can change who may sign in. Today one machine holds the one key, so this is no wider than the key; with machines enrolled under their own keys it is every machine.

What done looks like

  1. The settings are the platform's own: defaults carried by the deploy (from the repository, by the Actions deploy that already ships the Worker), and what the owner changes from the app kept at the edge. One place says which is in force and since when.
  2. A machine's report cannot change them. A machine is told the settings (or reads them) so that what it does for the platform agrees with the platform.
  3. A machine running other settings than the platform's is said on the Machines screen, next to the machine on other code (pm-console: the laptop's console has not followed main since 2026-11-23 22:09Z #13833), not acted on.
  4. Sign-in never opens wider on the way: the first deploy that carries settings carries exactly the owners and issuers in force now, there is no moment with none, and a test holds the deploy's values to the console's defaults (as pm-stack/console/test/needs.test.ts now holds needsRepos to the dashboard's REPOS).
  5. Seen in service: change a setting in the repository, watch it take effect at the Worker with the laptop off.

Not part of this

Secrets. The Worker's tokens are handed to it by name and stay as they are.


Generated by Claude Code

Activity

  1. added
    app/pm-stack
    kind/design
    source/agent
    on Nov 24, 2026
  2. developing-today commented on Nov 24, 2026

    @developing-today
    Contributor
  3. dezren39 commented on Nov 24, 2026

    @dezren39
    MemberAuthor

    First step merged and in service (#14172, deployed as e053b2753c3b).

    • The repository's settings are written once (pm-stack/console/src/settings.ts), and the Worker's bundle carries them.
    • The Worker says in its health answer in which of them the laptop tells it otherwise, by name only:
    curl -s https://pm-console-edge.developing-today.workers.dev/console/health | jq .machineSettingsDiffer
    ["needsRepos"]
    

    So the laptop tells the repository, the queue, where its store answers, its token's name, the Android package and the instruction label exactly as main has them. None is set by hand on the laptop, and the Worker going by its own for those six changes nothing it does today. That is next.

    The list of repositories is set apart. A machine takes a reply, or "done", only for an item in a repository on its own list. The Worker leaves a reply to a machine when its own token is turned away, and whether its token may write in the other three repositories cannot be known from outside. Reading by main's list while the laptop has the old one would make a reply that works today fail. So for the list the Worker goes on by the machine's while one tells it, says that it differs, and the list becomes the platform's own together with what makes that safe (a console that takes the platform's list from the Worker, or an action sent only to a machine that lists the repository, #13492). The plan and this change to it are in the design record.


    Generated by Claude Code

  4. dezren39 commented on Nov 24, 2026

    @dezren39
    MemberAuthor

    Second step merged and deployed (#14185, in service as 2e0b792ba653).

    The Worker goes by its own for six settings: the repository, the queue, where the queue's store answers, what its token is called, the Android package and the instruction label. They are the ones its bundle carries (pm-stack/console/src/settings.ts), so they change with a merge to main and a deploy and with nothing else. What a machine tells for them is kept as told, compared and shown on the Machines screen (what the machine says, what main says, which Cloudflare goes by), and not used.

    Checked in the real Worker runtime with the stand-in host telling others than main's for all six throughout the run; with the change undone that check fails.

    Left of this issue

    Not seen yet. The Worker's hourly check of its own reads under this version (due after 08:49Z; the six are the same values as before, so the requests are the same). The Machines screen itself needs the owner signed in.


    Generated by Claude Code

  5. dezren39 commented on Nov 24, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · triage (task 22533, lane oc-code-06)

    Triage verdict fresh 2026-11-24 (main 9c2b4ad096e): OPEN, in active progress today — no packet routed to avoid colliding with it.

  6. dezren39 commented on Nov 24, 2026

    @dezren39
    MemberAuthor

    Triage verdict (lane oc-code-02, queue task 22737, 2026-11-24): open and real. The Worker stores whatever config the laptop console last sent (edge.ts sync handler, kv cfg), so settings follow the last reporting checkout. A fix means choosing where the authoritative settings live (Worker-held config vs laptop-pushed with a version check), which is a design decision, not a small fix. No code packet routed yet; route a design follow-on under the pm-stack design work. Tracking: #14158.

  7. dezren39 commented on Nov 24, 2026

    @dezren39
    MemberAuthor

    Seen in service at 2026-11-24T08:49:26Z: the Worker's own hourly check ran under d8688f81024b, which goes by the platform's own settings, and all five things it reads itself (board, pull requests, priorities, prompts, the needs list) read whole. machineSettingsDiffer is ["needsRepos"] and nothing else, as expected until the console takes the platform's list.


    Generated by Claude Code

  8. dezren39 commented on Nov 24, 2026

    @dezren39
    MemberAuthor

    The list of repositories no longer differs in service. Since 2026-11-24 10:19Z the laptop's console runs main's code from its own copy of main (#14286, #13833), and main's console takes the platform's list. machineSettingsDiffer on the Worker's health is now empty; it was ["needsRepos"] while the laptop ran older code.

    Still open here: who may sign in is told by a machine (#13495), and none of the settings can be changed from the app.


    Generated by Claude Code

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

    app/pm-stackkind/designsource/agent

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions