GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — pm-console edge: do queue and GitHub operations from Cloudflare while the laptop is away · Issue #12518 · developing-today/code

pm-console edge: do queue and GitHub operations from Cloudflare while the laptop is away #12518

New issue
Copy link
New issue
Copy link
Open
Open
pm-console edge: do queue and GitHub operations from Cloudflare while the laptop is away#12518
Copy link
Labels
effort/lLarge: multi-day or open-ended; expect staged check-inskind/featureNew feature or capability requestsource/queue-workerFiled or worked by the queue/worker pilotstatus/blockedQueue or user escalation statestray-workStray work: not tied to a design or roadmap item (AUDIT-7 Lane 7)task/triageQueue packet kind: verify, reproduce, and route this itemuser/escalatedRequires a Drew decision or access

Description

@dezren39
dezren39
opened on Nov 22, 2026
Issue body actions

Where it stands

The app is served from the Worker pm-console-edge (pm-stack/console/edge). With the laptop away it still opens, shows the last state the laptop reported (marked with its age), holds twelve kinds of action for the laptop's return, and sends notifications. It cannot read anything fresh or act at once: every read and write of the queue store and of GitHub still happens on the laptop.

What is wanted

While the laptop has not reported for about a minute, the edge reads and acts by itself where nothing on the laptop is needed:

  • reads: the board (queue store), pull requests, ranked issues, the owner's prompts and their replies (GitHub);
  • writes that are one call: reply to or close a prompt, comment, rank an issue, move a task;
  • a new prompt: the issue is one call, but its queue task goes through fleet queue enqueue, which is the fleet binary. Either the edge writes the task by the queue's documented contract, or the issue is filed and marked so the laptop enqueues it on return. Decide from pkgs/fleet/crates/fleet-queue and doc/agents/one-queue-claiming-work.md, not by copying SQL blind.

Design already worked out

  • Ops and Work (pm-stack/console/src) take a run function and a fetch. Ops.gh only ever runs fleet gh api [-X M] <path> [--input -], and the queue store is already reached by fetch. An edge run that turns those argv into GitHub REST calls, and fleet secrets get <queue token name> into a Worker secret, lets both classes run unchanged in the Durable Object. Laptop-only calls (fleet queue enqueue, systemctl, fleet bridge) answer "needs the laptop".
  • Rule against doing anything twice: an action that was relayed and got no answer is only ever resolved by the laptop (it has the action's name). The edge acts by itself only on requests that arrive while the laptop is already known to be quiet, which never went to the laptop.
  • Sections read directly are written into the edge's mirror; when the laptop returns its report replaces them.
  • Credentials: the Worker needs the repository automation token and the queue store token as Worker secrets. pkgs/queue-transport-alert/worker/deploy.mjs is the existing pattern (Bitwarden name -> Worker secret, nothing printed or written). Make it an explicit switch in scripts/expose.py (off by default, remembered like --edge), and have the Worker say in /console/health whether it has each, so nothing is uploaded on every run.
  • A self-check the Worker runs when it gets its secrets (one direct read of each kind, result in /console/health) proves the path without taking the laptop down.

Done when

With the console service stopped on the laptop for five minutes, the app shows a board, pull requests and prompts newer than the stop, and a reply to a prompt appears on GitHub once and is not repeated when the laptop returns. Tested the way test/edge.test.ts tests the rest: the real classes, stand-ins only for GitHub and the queue store.

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
    developing-todayBot
    on Nov 22, 2026 – with developing.today
    Contributor
    More actions

    CODE-4615

  2. dezren39 commented on Nov 22, 2026

    @dezren39
    dezren39
    on Nov 22, 2026
    MemberAuthor
    More actions

    Picked up for triage under queue task 21029. Revalidating the issue and related edge work before choosing a bounded implementation slice or routing it for implementation.

  3. dezren39 commented on Nov 22, 2026

    @dezren39
    dezren39
    on Nov 22, 2026
    MemberAuthor
    More actions

    Triage: this is a substantial edge capability, not a small local defect. #12505/#12511 are merged and the architecture note explicitly leaves fresh GitHub/queue reads, direct safe actions, and laptop-away prompt handling unimplemented. The requested behavior crosses pm-stack/console/edge, Ops.gh REST adaptation, queue-store access, Worker secrets, and idempotent host/edge reconciliation. Follow-up task 21047 is queued to implement it in reviewable slices. Keep new prompt queue-task creation on the documented fleet queue contract (or explicitly defer enqueue to the laptop); do not copy SQL blindly. Acceptance remains the five-minute laptop-offline check and one-time prompt reply after laptop return.

  4. dezren39
    added
    queue/queuedHas a queued queue task
    kind/featureNew feature or capability request
    task/triageQueue packet kind: verify, reproduce, and route this item
    effort/lLarge: multi-day or open-ended; expect staged check-ins
    source/queue-workerFiled or worked by the queue/worker pilot
    on Nov 22, 2026
  5. dezren39 commented on Nov 22, 2026

    @dezren39
    dezren39
    on Nov 22, 2026
    MemberAuthor
    More actions

    Triage disposition complete: the issue is open, the implementation follow-up is live as queue task 21047, and the request is sized effort/l. No local fix was made because this spans the edge Worker, queue/GitHub adapters and replay safety.

  6. dezren39
    added
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    status/in-progressQueue worker lifecycle state
    and removed
    queue/queuedHas a queued queue task
    on Nov 22, 2026
  7. dezren39 commented on Nov 22, 2026

    @dezren39
    dezren39
    on Nov 22, 2026
    MemberAuthor
    More actions

    Picked up implementation task 21047. Issue #12518 is open; related PRs #12505 and #12511 are merged and no competing live PR was named in the packet. I am taking a bounded, reviewable implementation slice from the accepted scope.

  8. dezren39 commented on Nov 22, 2026

    @dezren39
    dezren39
    on Nov 22, 2026
    MemberAuthor
    More actions

    Progress: opened PR #12548 for the first read-only slice: refresh open pull requests from GitHub after the laptop has been silent for 60 seconds. Evidence: 112 console tests pass, the edge build passes, and diff check is clean. Remaining issue scope is still open; this PR does not add fresh board/ranked-issue/prompt reads or direct actions. Next slice: add the next safe fresh read with an observable boundary and test, without enabling writes.

  9. dezren39
    added a commit that references this issue on Nov 22, 2026

    pm-console: run queue and GitHub operations at the edge while the lap…

    a9caf45
  10. dezren39 commented on Nov 22, 2026

    @dezren39
    dezren39
    on Nov 22, 2026
    MemberAuthor
    More actions

    Queue task 21047 — the remaining accepted scope is in PR #12579 (branch xaltha/pm-console-edge-r2, commit a9caf45bf, OPEN / MERGEABLE).

    Landed: the edge runs the real Ops/Work classes in the Durable Object once the laptop has been quiet for 60s, through a new run translator (pm-stack/console/edge/src/direct.ts): fleet gh api argv become GitHub REST calls, fleet secrets get becomes a Worker secret, the queue store is reached by fetch, and every other verb answers needs the laptop. Direct reads: board, prs, priorities, asks. Direct writes: ask.send, ask.reply, ask.close, issue.comment, need.comment, issue.rank, task.move. A new prompt files its issue at the edge and holds only prompt.enqueue for the laptop (new held action, runs ops.enqueue(promptPacket(...)) on return — the queue-task contract); a reply posts once and is never repeated on return. expose.py --edge-direct on|off (default off) provisions GITHUB_TOKEN/QUEUE_TOKEN/EDGE_DIRECT; health reports the capability and an hourly self-check.

    Supersedes #12548's approach: this PR is from main so it includes the PR read, and it replaces #12548's dedicated readOpenPullRequests/freshRead with Ops.prs() through the one run/fetch path. #12548 can be closed once this lands.

    Verification: bun test in pm-stack/console 130 pass, 0 fail (was 110) — 13 translator tests, 6 edge integration tests (fresh reads after 60s silence; reply once, not repeated on return; prompt files once, holds only the enqueue; close/rank/need-comment/move at the edge; health + self-check; no-switch/before-quiet falls back), 1 enqueue-hook test. Edge bundles: wrangler deploy --dry-run, 126.87 KiB.

    Remains: live verification — deploy (the workflow provisions no secrets), scripts/expose.py --edge-direct on, then the 5-minute stopped-service check and one real reply + one real new prompt end to end. That needs the deploy + secrets, which this seat cannot do from here.

  11. dezren39 commented on Nov 22, 2026

    @dezren39
    dezren39
    on Nov 22, 2026
    MemberAuthor
    More actions

    Codex review on PR #12579 answered — all six threads fixed, replied to, and resolved.

    Fixes (commit d59a57f, branch xaltha/pm-console-edge-r2):

    1. P1 User-Agent: ghApi now sends user-agent: pm-console-edge on GitHub REST requests (edge/src/direct.ts:94).
    2. P1 old edge configs: edgeConfig() accepts configs missing the four new direct fields (defaults empty); direct capability is gated separately via Edge.directConfigReady, so an old stored config or old host report keeps serving the offline app instead of relaying.
    3. P2 persist direct choice after applying: ensure_edge_direct writes the edge-direct marker only after the wrangler secret puts succeed, both directions — a failed run no longer suppresses retries.
    4. P2 failed deferred enqueue: prompt.enqueue now throws OpError 502 on nonzero exit, so heldRunner records it failed and EdgeLink.take() acks ok: false instead of dropping the held command.
    5. P2 notification refresh overwrite: Notifier.tick(skip) skips reloading the sections just read directly; directRefresh/directAct pass them.
    6. P2 hydrate mirror before initial failure: directReadSection loads the durable mirror first when there is no in-memory good value, so a failed first read after a restart keeps last-good data.

    Verification: bun test 134/134 (was 130, +4 new tests), scripts/test_expose.py 19/19 (+1); all 6 new tests failed pre-fix in a scratch copy and pass with the fix. No deploy attempted — live laptop-away verification still needs a deploy with secrets and the wrangler dry-run approval that timed out twice before. PR is mergeable at the new head. Nothing merged.

  12. dezren39
    added a commit that references this issue on Nov 22, 2026

    pm-console: run queue and GitHub operations at the edge while the lap…

    27c78ba
  13. dezren39 commented on Nov 23, 2026

    @dezren39
    dezren39
    on Nov 23, 2026 – with Claude
    MemberAuthor
    More actions

    Status after #12579 and #12712.

    Done

    • Direct mode is built (pm-console: run queue and GitHub operations at the edge while the laptop is away #12579) and deployed. /console/health on the Worker shows directEnabled: false with neither token present, which is the intended state until the owner turns it on.
    • Turning it on is now the owner's switch in the app: More → Laptop away (feat(pm-console): the owner's switch for Cloudflare acting while the laptop is away #12712). It runs expose.py --edge-direct on on the laptop. The script no longer needs wrangler or anything else installed there: the two tokens go through Cloudflare's API with the token the script already holds. Turning it off takes the tokens away again; an attempt that fails part-way leaves the Worker holding nothing; a mode that is on gets back what the Worker has lost; runs take turns.

    Left on this issue

    • The switch has not been turned on. It hands the Worker the repository automation token and the queue store token, so it is the owner's to turn; the session that wrote feat(pm-console): the owner's switch for Cloudflare acting while the laptop is away #12712 also had no way left to run anything on the laptop.
    • Once it is on, the Worker checks one read of each kind by itself and the result shows on the same screen and in /console/health (selfCheck). That covers reads with the real credentials.
    • The five-minute laptop-away check in the description (fresh board, pull requests and prompts with the console stopped; one reply posted once and not repeated on return) is still to be done, by someone who can stop the console on the laptop and look at the app as the owner.

    Generated by Claude Code

  14. dezren39 commented on Nov 24, 2026

    @dezren39
    dezren39
    on Nov 24, 2026
    MemberAuthor
    More actions

    Second-pass verdict (lane any-n, queue task 22217, 2026-11-24). Verified fresh: direct mode is built and deployed (#12579, #12712). /console/health reports directEnabled false, which is the intended default. Nothing further is needed to build. The remaining step is the owner's switch (More → Laptop away) that hands the Worker its two tokens; the issue states that is the owner's to turn, so this lane did not turn it on and changed nothing. Once it is on, the selfCheck result on /console/health confirms the real-credential reads. No new follow-on packet is needed. Left open for the switch and the selfCheck confirmation. Tracking: #14158.

  15. dezren39 commented on Nov 26, 2026

    @dezren39
    dezren39
    on Nov 26, 2026
    MemberAuthor
    More actions

    Merge-watch disposition (queue task 23987, 2026-11-26): PR #12548 is now closed as superseded — salvage note and full evidence on the PR: #12548 (comment)

    Summary: head 18d9220f860b unchanged, CONFLICTING/DIRTY against current main 8fd0812a537e (ahead 5 / behind 4687). Its open-PR refresh slice is functionally live on main via merged PR #12579 (27c78ba58607): edge/src/direct.ts reads prs from GitHub in DIRECT_READ_SECTIONS and edge/src/edge.ts runs those direct reads while the laptop is away — the replacement you recorded here ("#12548 can be closed once this lands"). Nothing functionally unique remained to salvage. This issue stays open for its remaining owner-switch / live-verification scope.

  16. developing-today-fleet commented on Nov 27, 2026

    @developing-today-fleet
    developing-today-fleetBot
    on Nov 27, 2026 – with developing.today fleet
    Contributor
    More actions

    Triage verdict — oc-code-01 (queue task 25534, 2026-11-27)

    Verdict: implementation is complete; the remaining acceptance check is a hands-only operation. PR #12579 delivered and deployed edge direct mode; PR #12712 delivered the Laptop away switch. Prior verification reports /console/health has directEnabled: false by default and direct mode has not been enabled. The remaining acceptance requires enabling the switch (which supplies the Worker with repository and queue credentials) and performing the five-minute laptop-away check. This lane will not enable it or claim the live check has passed.

    The only remaining action for a person is: In pm-console, open More → Laptop away and turn it on. After that, a Fleet task can verify the self-check and complete the documented five-minute scenario. This is a concrete hands item, not a request for a design decision.

  17. developing-today-fleet
    added
    user/escalatedRequires a Drew decision or access
    status/blockedQueue or user escalation state
    stray-workStray work: not tied to a design or roadmap item (AUDIT-7 Lane 7)
    on Nov 27, 2026
  18. developing-today-fleet commented on Nov 27, 2026

    @developing-today-fleet
    developing-today-fleetBot
    on Nov 27, 2026 – with developing.today fleet
    Contributor
    More actions

    🤖 Agent note · handed off

    • Agent: fleet monitor
    • Session / ID: repo-fleet-monitor run 2026-11-27T17:14Z
    • Found via: monitor reconciliation
    • Task: Claim-evaporation repair. The last queue task for this issue, task 23987 (pr_shepherd, checkpoint stage mergeability_rechecked_superseded at 2026-11-26T14:52Z; PR feat(pm-console): refresh open PRs from edge #12548 ruled superseded by PR pm-console: run queue and GitHub operations at the edge while the laptop is away #12579), is DONE, and task 21047 is also DONE. Verified this run: no live task for issue pm-console edge: do queue and GitHub operations from Cloudflare while the laptop is away #12518 exists in the code pilot queue in queued, claimed, parked, blocked, or dep_blocked state, yet the issue still carried queue/claimed + work/assigned + status/in-progress. Those claim labels were stale and are removed. The issue keeps status/blocked + user/escalated — it remains blocked on the recorded escalation, so no fresh packet is enqueued and no queue/queued label is applied while the escalation stands.
    • Expectation: effort/l item stays parked on the escalation; a fresh claim may only be made through the queue once the escalation is resolved.
    • Links: task 23987 (done), task 21047 (done), PR feat(pm-console): refresh open PRs from edge #12548 (superseded), PR pm-console: run queue and GitHub operations at the edge while the laptop is away #12579
  19. developing-today-fleet
    removed
    status/in-progressQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    work/assignedQueue worker lifecycle state
    on Nov 27, 2026
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-inskind/featureNew feature or capability requestsource/queue-workerFiled or worked by the queue/worker pilotstatus/blockedQueue or user escalation statestray-workStray work: not tied to a design or roadmap item (AUDIT-7 Lane 7)task/triageQueue packet kind: verify, reproduce, and route this itemuser/escalatedRequires a Drew decision or access

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.