Repository navigation
fix(pm-console): refuse bad reports unread, and say which commit the laptop runs - #12715
Merged
Merged
Conversation
…e failed /console/edge/sync is open to anyone, because the laptop cannot sign in, and the edge read every body (up to 8 MB) before checking who sent it. Now: - A report that says it is too large, has no key name, or has no signature of the right shape is refused without its body being read. - The key name is checked before the body is read. - Each refused report counts against the address it came from; twenty in a minute and that address is refused unread for the rest of the minute. A report the host signed that is merely wrong (clock, replay, settings) is not counted. Four planted faults in the new logic are each caught, including one that only differs in whether the body is read. Refs #12521. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YLT5K1QVuzZjfWGFhXSSNF
…claude/pm-sync-limit
The laptop's report now names the commit its console was started from, and the edge repeats it in /console/health as hostVersion. Whether a merge has reached the laptop can then be seen from anywhere, without reaching the laptop: on 2026-11-22 it stopped deploying merges for two hours and nothing outside it could tell. 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 51 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. |
dezren39
pushed a commit
that referenced
this pull request
Nov 23, 2026
… seconds, and the Worker runtime is tried before every deploy Running the bundle in the real Worker runtime (scripts/edge-smoke.ts) showed what no test under bun could: since the report-limit change (#12715), a report signed with a key the edge had not seen yet was never answered. The edge asked for the key without reading the upload, the Worker then sent the same upload to the state a second time from a second copy of the stream, and in the Worker runtime a first copy left unread holds the second back. The laptop gave up after twenty seconds; the key had been learned by then, so the next report went through. It happens on first contact and after a change of key, so it was one slow report, but the same code before that change answered at once. The first copy is now read to its end before the key is asked for. It is read at most once in the key-fetch interval and only up to a report's size, so it is no way to make the edge read at will; every other refusal is still made unread. The deploy now runs the bundle in the Worker runtime against a host on the runner and makes the smoke checks before it releases anything. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YLT5K1QVuzZjfWGFhXSSNF
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.
What changes
Reports are refused unread once an address has sent too many bad ones (#12521, first item)
/console/edge/syncis open to anyone, because the laptop cannot sign in, and the edge read every body (up to 8 MB) before checking who sent it. Now:The edge says which commit the laptop is running
The laptop's report names the commit its console was started from;
/console/healthrepeats it ashostVersion. Whether a merge has reached the laptop can then be checked from anywhere. On 2026-11-22 the laptop stopped deploying merges for two hours and nothing outside it could tell.Checks
bun test: 143 pass. New: twenty forged reports are each read and refused; the next from that address is refused before anything is read, shown with a body that fails the moment it is touched, and the same for a report the host itself signed; another address and the host's own report are unaffected; the address may try again a minute later; 25 signed-but-stale reports never trip it. The keyed limiter's own windows and table bound. The commit shows in health, survives an edge restart, and anything that is not a commit's name is not repeated.bun run src/server.ts --checkpasses.Refs #12521.
https://claude.ai/code/session_01YLT5K1QVuzZjfWGFhXSSNF
Generated by Claude Code