Repository navigation
Conversation
…r asking again The edge reads pull requests, ranked issues and prompts from GitHub with the fleet's token, so it draws on the same hourly allowance the agents do. Twice on 2026-11-23 the agents used the hour up and the edge's reads failed until it turned (#13489). - Each answer to a read is kept under its address with GitHub's tag, and asked for again by that tag. GitHub answers "not modified" for a list that has not changed, and such a call does not count against the allowance. A screen left open asks for the same lists every minute or two: those calls now cost nothing unless something changed. - Turned away for calling too often, GitHub says when to ask again (retry-after, or the turn of the hour when nothing is left). That time is now kept to: nothing is asked of GitHub until it has come, where before the edge asked again every five minutes. It is never kept to for more than a little over an hour, and the owner's "try again now" lifts it. - Why a read failed now starts with that time, so the app can say when. - Health says how many of GitHub's answers were "not modified", so the saving can be seen from outside. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YLT5K1QVuzZjfWGFhXSSNF
… screen why its list is old Follows the commit before it on this branch (#13489). - GitHub counts searches by the minute and everything else by the hour. The time it gives for asking again is now kept to for what draws on the allowance that ran out, not for everything: ranked issues (a search) are still read while the hour's allowance is spent, and a minute's searches running out does not stop the lists. Going too fast (retry-after) is said of the caller and hushes both. - A call held back is marked as not sent, and why it failed carries GitHub's own words, so the app can say which of the two it was. - The app: "GitHub says it answers again at 12:40 PM, and it is not asked before then", and how old the copy shown is. - The screens drawn from the operations document (pull requests, ranked issues, agents, units) said nothing when their list could not be read: they showed the old copy as if it were current. Each now names its own list and is told of that one. - The real-runtime smoke run has GitHub's stand-in tag its answers and turn calls away with a time, and checks both in the Worker runtime. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YLT5K1QVuzZjfWGFhXSSNF
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YLT5K1QVuzZjfWGFhXSSNF
|
Warning Review limit reachedYou'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 24 minutes. View limit details
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. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 06914ce89d
ℹ️ 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".
| if (only && !only.includes(name)) continue; | ||
| if (s.ok || !s.error) continue; | ||
| const what = name === "services" ? "the machine's units" : SECTION_SAID[name] || name; | ||
| const read = doc.read?.[name] ? `, read ${ago(doc.read[name], now)}` : ""; |
There was a problem hiding this comment.
Use the last successful read time for the stale-copy age
When a refresh fails, this reports the age of the failed attempt rather than the last good copy. Docs.refresh() updates the section's at even on failure while preserving goodAt, and Docs.doc() populates doc.read from at. Consequently, an hours-old list can be described as “read just now,” with its displayed age resetting on subsequent failed refreshes. Expose and use the last-successful-read timestamp for this notice so users can assess how stale the displayed data actually is.
Useful? React with 👍 / 👎.
| } | ||
| if (!write && memory) { | ||
| const etag = res.headers?.get("etag") ?? null; | ||
| if (etag) memory.set(url, { etag, text }); |
There was a problem hiding this comment.
Avoid caching an unreadable response body
If a successful GET supplies an ETag but res.json() rejects—for example, when the connection closes while reading the body—the catch above converts the failure into empty text, which is then cached under the valid ETag. Subsequent requests receive 304 responses and reuse that empty text until the resource changes, the entry is evicted, or the object restarts. Ops.gh() converts empty stdout to null, so consumers such as Ops.prs() repeatedly fail at list.map instead of recovering on the next refresh as they did before. Only cache the response's ETag after its body has been successfully consumed and decoded.
Useful? React with 👍 / 👎.
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
What
The half of #13489 that needs no new identity: the edge stops drawing on the hourly GitHub allowance it shares with the agents for lists that have not changed, keeps to the time GitHub gives when it is turned away, and says what happened on the screens it affects.
Twice on 2026-11-23 the agents used the account's hour up, and the edge's reads of pull requests and prompts failed until it turned.
Changes
Asked by tag. Each answer to a read is kept under its address with GitHub's
etagand asked for again withif-none-match. GitHub answers "not modified" for a list that has not changed, and such a call does not count against the allowance. GitHub is still asked every time and decides whether the kept answer stands, so nothing shown is older than before. The answers live in the object's memory (bounded, least lately used dropped first).GitHub's time is kept to. Turned away for calling too often, GitHub says when to ask again (
retry-after, orx-ratelimit-resetwith nothing left). Until then the edge asks nothing that draws on what ran out, where before it asked again every five minutes. Never for more than 65 minutes; "Try again now" lifts it.Two allowances, kept apart. GitHub counts searches by the minute and everything else by the hour. Ranked issues are a search, so they are still read while the hour's allowance is spent, and a minute's searches running out does not stop the lists.
retry-afteris said of the caller and hushes both.Said in the app. "GitHub's allowance for the hour is used up on this account, which the agents share; GitHub says it answers again at 12:40 PM, and it is not asked before then. Showing the last good copy, read 12 min ago." A short wait, or GitHub's "secondary rate limit", is said as being turned away for asking too often, not as the hour.
A gap found on the way. The screens drawn from the operations document (Pull requests, Ranked issues, Agents, Units) said nothing when their list could not be read: they showed the old copy as if it were current. Each now names its own list.
Health has
github: { answers, unchanged, kept, quiet: { core, search } }, so the saving and any wait can be seen from outside.Not in this PR
Checked
bun test: 377 pass, 15 files (364 before).wrangler devandscripts/edge-smoke.ts, which the deploy runs before deploying): a list read again is asked by its tag and the 304 is the kept answer; turned away with a reset time, the Worker asks nothing until that second, then asks again. All checks pass.biome format,prettier,bun run src/server.ts --check, bothwrangler deploy --dry-runbuilds; the type checker run by hand reports nothing new (53 as before, pm-console: type-check the console before it is deployed #13498).Not checked: against GitHub itself. The first deploy's health (
github.unchanged) will show whether its "not modified" answers arrive as documented.Design record:
doc/2026-11-23T06-50-00Z_architecture_pm_platform_cloudflare_core/(section "2026-11-23T18:10Z Update").Generated by Claude Code
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.