Repository navigation
fix(pm-console): the edge could not make a request of its own: no notification it sent ever left - #12954
Merged
Conversation
…ification it sent ever left In the Worker runtime the platform's fetch refuses to be called as a method of another object: `this.fetchImpl(url)`, with the global fetch kept in `fetchImpl`, throws "TypeError: Illegal invocation". bun and Node do not mind, so every test passed. The edge kept the global fetch on itself and called it exactly that way, in three places: - the sender of notifications: every notification the edge has tried to send since it went in front of the site failed before leaving (a reply from the fleet, something that needs the owner, a unit that keeps failing, the laptop gone quiet). The failure was caught and counted, and nothing showed it; - reading the Android release from GitHub, and fetching its file: the edge never knew of a release, so a download always fell back to the laptop's copy; - and, through the laptop's own classes run at the edge, every read and write of the queue store in direct mode, had it been switched on. Found from outside: health had just been made to say which release the edge knows of, and on the deployed Worker it said none while the release was plainly there. Reproduced in the runtime itself: called as a method, fetch throws; called plainly, it works. - No class keeps a fetch it was given: each keeps a plain caller (src/plain.ts). Edge, Ops (which Work reaches through) and the laptop's link all do. - The tests could not see this, so they are made able to: the stand-in fetch handed to the edge, to direct mode and to Ops now refuses to be called as a method, as the runtime's does (asThePlatformFetch). With the code as it was, 21 tests fail on it: the release, the notifications, direct mode. They pass with the fix. - Health says why the release could not be read (androidReleaseTrouble), so "none published" and "could not ask" no longer look the same from outside. - The deploy's run of the bundle in the Worker runtime checks that the state can make a request of its own. Run here with the fix it reads the real release from GitHub (2026.11.23-0f311ae); with the fix taken out it fails with the runtime's own words. Not checked: a notification leaving the deployed Worker. That needs a subscribed device; what is checked after deploy is that the deployed Worker now reads the release, which is the same fetch. 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 52 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. |
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No notification the edge has sent ever left it. Nor did it ever read the Android release from GitHub. Both failed the same way, silently, since the edge first went in front of the site (b7b881d, 2026-11-22 11:14Z).
What was wrong
In the Worker runtime the platform's
fetchrefuses to be called as a method of another object.this.fetchImpl(url), with the globalfetchkept infetchImpl, throws:bun and Node do not mind, so every test passed. The edge kept the global
fetchon itself and called it exactly that way:How it was found
Health had just been made to say which release the edge knows of (#12946). On the deployed Worker it said none, while the release was plainly published. Reproduced in the runtime itself: called as a method,
fetchthrows; called plainly, it works.The fix, and why it cannot come back quietly
fetchit was given: each keeps a plain caller (src/plain.ts).fetchhanded to the edge, to direct mode and toOpsrefuses to be called as a method, as the runtime's does. With the code as it was, 21 tests fail on it (the release, the notifications, direct mode); with the fix they pass.2026.11.23-0f311ae); with the fix taken out it fails, quoting the runtime.androidReleaseTrouble), so "none published" and "could not ask" no longer look the same from outside.Checked
bun test194 pass; five planted faults each caught (a sixth was in a line that turned out to be redundant, which is removed); the real-runtime run passes with the fix and fails without it.Not checked
A notification leaving the deployed Worker: that needs a subscribed device. What I check after the deploy is that the deployed Worker now reads the release, which is the same
fetch.Generated by Claude Code
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.