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 — feat(pm-console): refresh open PRs from edge by dezren39 · Pull Request #12548 · developing-today/code

Conversation

@dezren39

@dezren39 dezren39 commented Nov 22, 2026 •
edited by blacksmith-sh Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

Summary

  • Add opt-in, read-only GitHub open-PR refresh after 60 seconds of laptop silence.
  • Keep the GitHub token in the Worker secret boundary; expose readiness flags without exposing credentials.
  • Record successful and failed trusted fresh reads in the console document state.
  • This is one slice of pm-console edge: do queue and GitHub operations from Cloudflare while the laptop is away #12518; it does not enable queue reads or write operations.

Evidence

  • Before: open PRs remained at the last laptop report while the laptop was away.
  • After: bun test — 112 pass; npm run build — pass; git diff --check — pass.
  • Ran on the laptop worktree after merging current origin/main into the branch.

Merge Danger

  • Low: direct reads are disabled unless GITHUB_READ_ENABLED=on and GITHUB_TOKEN are configured; no write endpoint is added.

Refs #12518


Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

chatgpt-codex-connector[bot] reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
dezren39 added 2 commits November 22, 2026 07:17
@dezren39
feat(pm-console): refresh open PRs from edge
099ca5a
@dezren39
Merge remote-tracking branch 'origin/main' into queue/21047-12518-edg…
b989032
…e-ops
@dezren39
dezren39 requested a review from a team as a code owner November 22, 2026 13:18
@coderabbitai

coderabbitai Bot commented Nov 22, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 52 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 41abd382-bb53-4f16-a97a-44811ab1705b
Commits

Reviewing files that changed from the base of the PR and between 5133832 and 18d9220.

Files selected for processing: 6

  • pm-stack/console/edge/README.md
  • pm-stack/console/edge/src/edge.ts
  • pm-stack/console/edge/src/github.ts
  • pm-stack/console/edge/src/worker.ts
  • pm-stack/console/src/docs.ts
  • pm-stack/console/test/edge.test.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

  • X
  • Mastodon
  • Reddit
  • LinkedIn
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 22, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-23T00:06:47.171570Z 18d9220 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@dezren39 dezren39 mentioned this pull request Nov 22, 2026
pm-console edge: do queue and GitHub operations from Cloudflare while the laptop is away #12518
Open
chatgpt-codex-connector[bot]
chatgpt-codex-connector Bot reviewed Nov 22, 2026
View reviewed changes

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b989032429

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread pm-stack/console/edge/src/github.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread pm-stack/console/edge/src/edge.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread pm-stack/console/edge/src/edge.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

dezren39 added a commit that referenced this pull request Nov 22, 2026
@dezren39
pm-console: run queue and GitHub operations at the edge while the lap…
a9caf45
…top is away

The edge runs the real Ops and Work classes in the Durable Object once
the laptop has been quiet for 60s, through a new edge run translator
(edge/src/direct.ts): fleet gh api argv become GitHub REST calls,
fleet secrets get becomes a Worker secret, and the queue store is
already reached by fetch. Laptop-only verbs answer 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, which runs ops.enqueue on return; a
reply posts its comment once at the edge and is never repeated. The
no-twice rule stands: an action relayed with no answer is only ever
resolved by the laptop.

EdgeConfig gains queueDbUrl, queueTokenName, promptLabel, needsRepos.
scripts/expose.py gains --edge-direct (off by default, remembered like
--edge) provisioning GITHUB_TOKEN, QUEUE_TOKEN and EDGE_DIRECT;
health reports the capability and an hourly self-check of one read of
each kind.

This supersedes the approach of PR #12548 for the PR read: its
dedicated readOpenPullRequests/freshRead is replaced by Ops.prs()
through the same run/fetch, so the PR read shares the one path.

Tests: bun test 130 pass (was 110) — 13 direct translator tests, 6
new edge integration tests, 1 enqueue-hook test. The edge bundles:
wrangler deploy --dry-run, 126.87 KiB.

Refs #12518
This was referenced Nov 22, 2026
pm-console: run queue and GitHub operations at the edge while the laptop is away #12579
Merged
fleet: ready PRs are left unmerged (20 open; the merge sweep has filed nothing since 2026-11-17) #12280
Open
dezren39 added a commit that referenced this pull request Nov 22, 2026
@dezren39
pm-console: run queue and GitHub operations at the edge while the lap…
27c78ba
…top is away (#12579)

* pm-console: run queue and GitHub operations at the edge while the laptop is away

The edge runs the real Ops and Work classes in the Durable Object once
the laptop has been quiet for 60s, through a new edge run translator
(edge/src/direct.ts): fleet gh api argv become GitHub REST calls,
fleet secrets get becomes a Worker secret, and the queue store is
already reached by fetch. Laptop-only verbs answer 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, which runs ops.enqueue on return; a
reply posts its comment once at the edge and is never repeated. The
no-twice rule stands: an action relayed with no answer is only ever
resolved by the laptop.

EdgeConfig gains queueDbUrl, queueTokenName, promptLabel, needsRepos.
scripts/expose.py gains --edge-direct (off by default, remembered like
--edge) provisioning GITHUB_TOKEN, QUEUE_TOKEN and EDGE_DIRECT;
health reports the capability and an hourly self-check of one read of
each kind.

This supersedes the approach of PR #12548 for the PR read: its
dedicated readOpenPullRequests/freshRead is replaced by Ops.prs()
through the same run/fetch, so the PR read shares the one path.

Tests: bun test 130 pass (was 110) — 13 direct translator tests, 6
new edge integration tests, 1 enqueue-hook test. The edge bundles:
wrangler deploy --dry-run, 126.87 KiB.

Refs #12518

* pm-console: answer Codex review on #12579

- direct.ts: send an explicit User-Agent with GitHub REST requests;
  Workers supplies none and GitHub requires it.
- edge-proto.ts: accept configs stored or reported before direct mode
  (new direct fields empty); gate direct capabilities on the config
  carrying them instead of refusing the whole config.
- edge.ts: hydrate the durable mirror before a first direct read, so a
  failed read after a restart keeps last-good data; keep notification
  refreshes from reloading the mirror over freshly read sections.
- actions.ts: a failed deferred prompt.enqueue throws, so the held
  action is reported failed instead of recorded done with no queue task.
- expose.py: remember the direct-mode choice only after the Worker has
  it, so a failed run retries instead of assuming the mode is set.

Tests: 134/134 console tests (bun test), 19/19 expose tests; each new
test fails against the pre-fix code.

---------

Co-authored-by: Drewry Pope <[email protected]>
dezren39 added 3 commits November 22, 2026 23:56
@dezren39
Set an explicit User-Agent for GitHub requests
8b7dc54
GitHub rejects requests without a valid User-Agent, and a Cloudflare
Worker sends none by default, so the direct PR read failed even with
a valid token. Addresses review thread on #12548 (github.ts:22).
@dezren39
Refresh GitHub pull requests without blocking cached documents
ed3d77f
The ops document awaited the GitHub read (up to the 20s timeout) on
every request while the laptop was silent, stalling the Next, ranked
issue, agent and service views too. The read now runs in the
background through the Durable Object's waitUntil, shared while one
is already running, and only for a stale section, so the document
answers at once from cache and the fresh list arrives on the next
poll.

Also in Docs.refresh: a load that finishes after a newer read must
not put its older copy back, so the background record cannot be
overwritten by the document's own stale-section mirror load.
Addresses review threads on #12548 (edge.ts:594).
@dezren39
Restore persisted PR data before recording a failed fresh read
18d9220
A failed GitHub read stamped the section's time before the stored
copy was ever loaded, so after a Durable Object restart the PR view
stayed on 'Loading...' even with a good laptop snapshot in storage:
the stamped time both skipped the initial mirror load (which only
runs for sections never read) and kept the 90s staleness window from
ever elapsing, since the frontend polls every 20s. The failure path
now reads the persisted section back first, then records the failure,
so the last good list stays visible with the failure reported in its
health. Addresses review thread on #12548 (edge.ts:596).
@dezren39
dezren39 removed the request for review from a team November 23, 2026 05:56
@dezren39 dezren39 mentioned this pull request Nov 24, 2026
AUDIT-7 Lane 1 follow-up: rebase-and-merge queue for 90 blocked PRs (batches A–H) #13903
Closed
@dezren39

dezren39 commented Nov 24, 2026

Copy link
Copy Markdown
Member Author

Batch A triage (#13903): still DIRTY against origin/main (5 files conflict: pm-stack/console/edge/{README.md,src/edge.ts,src/worker.ts}, pm-stack/console/src/docs.ts, pm-stack/console/test/edge.test.ts). Main has no open-PR refresh (no readOpenPullRequests/freshRead/prsRefresh on main), so this is not superseded, but main's edge now uses the direct/setAlarm/getAlarm/ownClockMs design, and the PR's freshRead/prsRefresh wiring has to be ported onto it. BLOCKED: needs a port (not a merge) by the PR owner; no push made.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@dezren39

dezren39 commented Nov 26, 2026

Copy link
Copy Markdown
Member Author

Merge-watch recheck (2026-11-26): fetched current main at 18dd610127c and PR head remains 18d9220f860b. git merge-tree --write-tree origin/main origin/queue/21047-12518-edge-ops reports content conflicts in pm-stack/console/edge/README.md, pm-stack/console/edge/src/edge.ts, pm-stack/console/edge/src/worker.ts, pm-stack/console/src/docs.ts, and pm-stack/console/test/edge.test.ts. Main has no readOpenPullRequests, freshRead, prsRefresh, or GITHUB_READ_ENABLED implementation, so the change is not superseded; main has moved to the alarm/ownClockMs edge design. No refresh or merge made: this needs a feature port onto current main, consistent with the prior PR note. Recheck after the PR head changes.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@dezren39

dezren39 commented Nov 26, 2026

Copy link
Copy Markdown
Member Author

Merge-watch recheck (queue task 23987, 2026-11-26) — closing as superseded, with salvage note.

Mergeability re-tested against current main: main is now 8fd0812a537e (2026-11-26T14:43:49Z); this PR's head is unchanged at 18d9220f860b. GitHub reports mergeable: CONFLICTING, mergeStateStatus: DIRTY; compare main...18d9220f is diverged, ahead 5 / behind 4687, touching 6 files (pm-stack/console/edge/README.md, pm-stack/console/edge/src/edge.ts, pm-stack/console/edge/src/github.ts (added), pm-stack/console/edge/src/worker.ts, pm-stack/console/src/docs.ts, pm-stack/console/test/edge.test.ts). The earlier rechecks (2026-11-24 and 2026-11-26 14:24) recorded the same 5-file content conflicts.

Why not a port, and why superseded: those rechecks searched main only for this PR's own symbol names (readOpenPullRequests/freshRead/prsRefresh/GITHUB_READ_ENABLED) and concluded "not superseded". That missed the functional replacement. On issue #12518 the owner recorded that PR #12579 "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." PR #12579 merged 2026-11-22T16:54:29Z (merge commit 27c78ba58607), and the follow-up status on #12518 confirms direct mode is built (#12579) and deployed.

Verified on current main: pm-stack/console/edge/src/direct.ts lists prs in DIRECT_READ_SECTIONS with READ_FROM.prs = ["github"], and pm-stack/console/edge/src/edge.ts runs those direct reads (board, prompts, pull requests, ranked issues) while the laptop is away. This PR's three review fixes are also covered in the replacement: explicit GitHub User-Agent, hydrating the persisted mirror before recording a failed read, and non-blocking refresh.

Salvage note (diff against main first): the only textually unique artifact is the dedicated edge/src/github.ts + freshRead wiring, which #12579 deliberately replaced with the single direct.ts run/fetch path. Nothing functionally unique remains to salvage; re-porting this branch would duplicate live functionality. Closing per the merge-watch protocol for a PR superseded by main. Issue #12518 itself stays open for its remaining owner-switch / live-verification scope — this close does not close it (the PR body only says Refs #12518).

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@dezren39 dezren39 closed this Nov 26, 2026
@developing-today-fleet developing-today-fleet Bot mentioned this pull request Nov 26, 2026
AUDIT-7 Lane 1 — PR-SWEEP tracking (open PRs, 4 repos) #13872
Open
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@chatgpt-codex-connector chatgpt-codex-connector[bot] chatgpt-codex-connector[bot] left review comments

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@dezren39
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.