Skip to content

docs(id): comms abuse controls investigation — blocks, rate limits, per-counterparty budgets (#2032) - #2243

Merged
dezren39 merged 2 commits into
mainfrom
queue/3347-2032-comms-abuse-controls
Oct 30, 2026
Merged

dezren39 merged 2 commits into
mainfrom
queue/3347-2032-comms-abuse-controls

Conversation

@dezren39

@dezren39 dezren39 commented Oct 29, 2026 •

Copy link
Copy Markdown
Member

Investigation deliverable for #2032 (LIST 8, ID platform expansion #2056), feeding the synthesis in #2033.

What this adds

One dated record: doc/2026-10-29T10-55-00Z_investigation_comms_abuse_controls/.

  • Control inventory of every limiter that exists in pkgs/id today, with defaults and file:line: frame cap 1 MiB, world chat 50/10 s, WorldLimits, web save 5 s, directory-auth resend/nonce limits.
  • What is absent: no per-peer counters, no byte accounting, no block list of any kind, no Retry-After/429 on any path, no config keys for abuse controls (ServerConfig holds only users/groups/create/policy).
  • Proposed control set with defaults, in four layers: L1 token buckets at the frame boundary (60 frames/s, burst 180, 512 KiB/s), L2 operator block list by public key / IP / topic-tag, L3 budgets (app-wide, per IP, per ID, and per-specific-counterparty overrides), L4 listener IP deny + list import.
  • Composition with the accept-all-signed-objects trust model (id: investigate: trust/visibility model — servers accept all signed objects; views count only allowed writers #2030): blocks change serving/subscribing/rendering, never acceptance of already-signed objects; refusals carry a reason class.
  • Operator UX for the "quick button", and a P0/P1/P2 shipping order answering "we don't need everything — start along this path".

Notes


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

@dezren39
dezren39 requested a review from a team as a code owner October 29, 2026 10:49
@coderabbitai

coderabbitai Bot commented Oct 29, 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 58 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: 14bc6bdf-a3cb-4b91-af73-23932f2e14a4
Commits

Reviewing files that changed from the base of the PR and between 24901e7 and 006aaa6.

Files selected for processing: 1
  • doc/2026-10-29T10-55-00Z_investigation_comms_abuse_controls/2026-10-29T10-55-00Z_investigation_comms_abuse_controls.md
  • 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

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Codex Review Summary

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-29T10:58:55.485615Z 006aaa6 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.

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

Copy link
Copy Markdown

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: 699e1f0cb4

ℹ️ 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".

Comment on lines +99 to +101
- **No byte accounting at all.** There is no counter of bytes or frames per peer, per
connection or app-wide, so "max MB per window" cannot be evaluated today. This is the
single hardest prerequisite in the issue.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Include existing event-sync accounting in the control inventory

The production /id-sync/1 path already has byte accounting and an enforced session budget: commands/serve.rs:961-965 registers EventSyncProtocol, event_store/sync.rs:343-381 charges reconciliation reads before buffering or decoding, and Outcome records control/data bytes. The default reconciliation budget is 64 MiB (event_store/range.rs:47-52). These are not rolling per-peer budgets, but they contradict the claim that no per-connection accounting exists and materially change the proposed prerequisite work. Include this active transport and its existing protections in the inventory, distinguishing reusable session accounting from the missing cross-session aggregation.

Useful? React with 👍 / 👎.

Comment on lines +102 to +103
- **No `Retry-After`.** #2 and #5 refuse with prose. There is no structured retry value
and no `429` on any web route. A client cannot back off correctly, so it retries.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Distinguish missing retry metadata from existing HTTP 429 responses

The inspected baseline already returns HTTP 429: web/routes.rs:1202-1215 returns StatusCode::TOO_MANY_REQUESTS when the save cooldown fires, and web/world_ws.rs:209 maps Refusal::RateLimited to the same status. The missing Retry-After metadata is a valid gap, but describing HTTP 429 as entirely absent misstates the existing behavior and the HTTP work required by the proposed shipping plan. Correct this distinction here and in the summary table.

Useful? React with 👍 / 👎.


| Key kind | Semantics | Enforced at | Notes |
|----------|-----------|-------------|-------|
| **Public key** (`Key`, the endpoint ID) | *Permanent*: refuse to open sessions, serve blobs, accept gossip or render their objects | `connectivity.rs` accept path + every frame entry + view filter | The reliable one. Rotation is possible but costs the abuser their reputation and petname |

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Separate account-author blocks from transport-endpoint blocks

When an account's signed objects arrive through another node, blocking its transport endpoint cannot implement the promised account-level rendering block. groups/mod.rs defines Key as an account key, whereas artifact.rs:146-163 separately models the endpoints hosting an account's artifacts; envelope_net.rs:1-7 explicitly trusts the payload signature rather than the delivering node. Petnames also belong to accounts (petname.rs:34-37), so changing transport endpoints need not sacrifice them. Distinguish endpoint denies used for connection control from account/author blocks used for rendering and identity-scoped policy, rather than treating both identities as the same key.

Useful? React with 👍 / 👎.

…sites, allow-list, unwired gates, collab gap (#2032)

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

Copy link
Copy Markdown

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: 006aaa68ec

ℹ️ 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".

Comment on lines +66 to +67
live-document path and it has neither a size cap nor a rate limit**: the upgrade at
`web/collab.rs:632` sets no `max_message_size`, and nothing counts `STEPS`/`CURSOR`.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Account for the collaboration socket's inherited size limits

The collaboration handler uses Axum's default WebSocket configuration, which already limits inbound messages to 64 MiB and frames to 16 MiB; omitting an explicit max_message_size(...) call does not disable those limits. These defaults are documented in the Axum documentation. The proposed 1 MiB limit and missing rate limiter remain valid work, but describe this as tightening an existing framework cap rather than closing an unlimited-message path, including in L1 and the P0 shipping rationale.

Useful? React with 👍 / 👎.

Comment on lines +145 to +147
- **`PullPolicy` { Open (default), Members } / `PullGate`** —
([`pull_policy.rs:30-80`](../../../pkgs/id/src/pull_policy.rs)); `id serve` does not read
it and no session builds a gate from it (`:17-19`).

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Distinguish the active pull gate from missing configuration wiring

The production event-sync path already constructs and checks a PullGate: event_sync.rs:68-69,92-95 creates an open gate, its accepting handler passes that gate into sync_session, and event_store/sync.rs:439-441 checks it before sending events. This handler is registered by commands/serve.rs:961-965. The missing work is selecting an operator-configured policy instead of the hard-coded open policy, not wiring a designed-but-unused gate into sessions. Correct this distinction here and in the shipping plan so the synthesis can reuse the existing enforcement path.

Useful? React with 👍 / 👎.

@dezren39
dezren39 added this pull request to the merge queue Oct 30, 2026
Merged via the queue into main with commit 0c10ee8 Oct 30, 2026
3 checks passed
@dezren39
dezren39 deleted the queue/3347-2032-comms-abuse-controls branch October 30, 2026 01:00
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.

1 participant