Skip to content

fix(pm-console): refuse bad reports unread, and say which commit the laptop runs - #12715

Merged
dezren39 merged 3 commits into
mainfrom
claude/pm-sync-limit
Nov 22, 2026
Merged

dezren39 merged 3 commits into
mainfrom
claude/pm-sync-limit

Conversation

@dezren39

@dezren39 dezren39 commented Nov 22, 2026 •

Copy link
Copy Markdown
Member

What changes

Reports are refused unread once an address has sent too many bad ones (#12521, first item)

/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, and 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 until the minute is out.
  • A report the laptop signed that is merely wrong (old clock, replay, unusable settings) is not counted: that is the laptop's to hear about, not a reason to shut it out.

The edge says which commit the laptop is running

The laptop's report names the commit its console was started from; /console/health repeats it as hostVersion. 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.
  • Four planted faults in the refusal logic (never blocks, never counts, counts the host's own mistakes, reads before the shape check) are each caught.
  • bun run src/server.ts --check passes.

Refs #12521.

https://claude.ai/code/session_01YLT5K1QVuzZjfWGFhXSSNF


Generated by Claude Code

…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
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
@dezren39
dezren39 requested a review from a team as a code owner November 22, 2026 23:52
@coderabbitai

coderabbitai Bot commented Nov 22, 2026

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 51 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: d912bd49-647d-4900-a780-e029e40e9933
Commits

Reviewing files that changed from the base of the PR and between 0f0df46 and 7a58365.

Files selected for processing: 8

  • pm-stack/console/edge/README.md
  • pm-stack/console/edge/src/edge.ts
  • pm-stack/console/src/devices.ts
  • pm-stack/console/src/edge-proto.ts
  • pm-stack/console/src/server.ts
  • pm-stack/console/src/sync.ts
  • pm-stack/console/test/devices.test.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

@chatgpt-codex-connector

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

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-22T23:54:01.121179Z 7a58365 PR opened
ℹ️ 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.

@dezren39
dezren39 merged commit 56ad4c4 into main Nov 22, 2026
2 checks passed
@dezren39
dezren39 deleted the claude/pm-sync-limit branch November 22, 2026 23:57
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants