Repository navigation
Conversation
|
Independent adversarial review (Codex) of fix/139-spam-limits @ 3182ee21 VERDICT: PASS |
|
Decision: one Home can list at most 4 people in Discovery (proposed 2 on #139), so a Home with several accounts or guests still shows them. It's one constant, |
|
Decision (6 Oct): 4 Discovery listings per device, confirmed. Several accounts share one Home's device, and the relay still enforces its global cap of 64 (collaboration_discovery_runtime.rs:2248). |
|
Independent adversarial review (Codex) of fix/139-spam-limits @ a2625b2 VERDICT: PASS |
A Home's Carrier endpoint is its signing device, so the relay accepts a listing, query or contact request only from the device that signed it and refuses a call without an authenticated endpoint. Another Home cannot replay a withdrawn public listing to spend its owner's slots. One Home lists at most 4 people, and the relay stores at most 8 contact requests per sender Profile and 16 per Home. Renewals and resends of stored items stay free.
A Home sends at most 5 Community messages per Profile in 10 seconds, counted from its saved messages; the next gets HTTP 429 with Retry-After and Chat shows "Slow down" with the draft kept. Receiving Homes accept at most 10 per sender Profile in 10 seconds and keep at most 8 per sender waiting for Chat. A message refused by either limit is held and retried by the receiving Home itself, since its sender stops resending once any other Home accepts it, and other senders in the batch keep flowing. Held frames are bounded per sender and per Home; a full queue makes room from the largest holder or keeps the batch for a later retry, and never drops a fair sender's frame. Retries of a stored message, presence and direct messages are not counted.
The shipped Chat bundle is compiled from chat-room-ui and committed; the send-limit message changed only the source. Rebuilt with scripts/build-chat-room-ui.sh under a new cache version, and the product smoke now reads that version from the startup file instead of a hard-coded one.
a2625b2 to
b7d9054
Compare
|
Independent adversarial review (Codex) of fix/139-spam-limits @ b7d9054 VERDICT: PASS |
|
Receive limit (Anders, 8 Oct): keep the recorded 5 messages per 10 s per sender (#139), not 10. No fixed number avoids every bunching after delays, and held frames above the limit are dropped anyway (collaboration_rate_limit.rs:197-198); the held-message retry and Community catch-up recover them. A different burst policy needs a test and Anders's approval. |
#139 records 5 messages per 10 seconds per sender on the receiving side, the same as the send limit, and Anders confirmed it on #262 (8 Oct). No fixed number avoids every bunching after network delay; a receiving Home holds the bunched messages and lets them in as the window slides, and at most 5 per sender are held, so a flood beyond that is still dropped. With the limit below the per-sender Chat backlog (8), the rate binds first. The transport tests now name the limit that binds; the held-place test sets up an honest sender whose earlier messages Chat has not shown yet, so it still reaches the backlog while flooders fill the held queue; the capacity test spreads its messages over two windows to reach the backlog refusal.
|
Independent adversarial review (Codex) of fix/139-spam-limits @ 4c56679 VERDICT: PASS |
Takes the alpha.10 train. Only elastos/CHANGELOG.md conflicted: the spam-limits bullet stays under [Unreleased], above the new 0.8.0-alpha.10 notes.
|
@andersalm this one is done my side, should it be merged to #123? or just leave it here |
Spam limits for Chat and People, the "Spam limits" part of #139. It adds limits to the Discovery relay and to Community messages.
Why
#139 asks for a per-sender limit on Community messages with a clear "Slow down" message, and a per-person cap in the Discovery relay so one person cannot fill the list. Today one Home can fill the shared
Visible nowlist and the relay's request store, and one sender can flood the Community room for every Home.What changes
Discovery relay (
collaboration_discovery_runtime.rs)server_infra.rsgives the Carrier node and collaboration the same key. So another Home cannot replay a withdrawn public listing to use up its owner's slots.Community messages (
collaboration_rate_limit.rs,collaboration_core.rs,collaboration_transport.rs)Retry-After. Chat shows "Slow down. You can send another message in N seconds." and keeps the draft.Docs: a new "Spam Limits" section in
docs/PEOPLE_CONVERSATIONS.md, and a changelog entry.Not in this PR
elastos config set community_receive_limit <5-20>, built-in default 5) is written and tested on a local branch. Per Anders' 8 Oct decision, a different burst policy needs his approval first, so it is offered, not included. With the setting, a change needs only a Runtime restart, not a rebuild; only the build that ships it is needed once, because the code that reads it is new. A way to change it from the product (for example from Chat or System) may come later.Refused-case tests
query;Retry-Afteron the Chat route;Verification (local, macOS arm64, rebased on
develop34b2e5c5)just test-elastoson4c566791: 4,111 passed, 0 failed.cargo fmt --check, workspacecargo clippy --all-targets -D warningsand the Chat UI and IPFS provider clippy are clean.chat-room-product-behavior-smoke.mjs.developon this Mac: two tests inrelease-platform-input-test.pyand one Python 3.14 tarfile case inupdate-hop-compare-test.py.Independent adversarial review (#173)
Codex reviewed the branch over five rounds and found 9 real problems; all are fixed (PASS at
3182ee21, thena2625b29for the bundle). After the rebase ontodevelop34b2e5c5, Codex reviewed the new head for semantic conflicts with develop's changes (the newFileLock, update planner, components by CID) and confirmed the source changes matcha2625b29line for line:Independent adversarial review (Codex) of fix/139-spam-limits @ b7d9054a VERDICT: PASS.The rebase moved the changelog bullet under
[Unreleased](develop moved the old notes into alpha.9) and rebuilt the Chat bundle with develop's path-independent build script, under the new cache versionchat-room-ui-20261008a.The receive limit change to 5 was reviewed on its own:
Independent adversarial review (Codex) of fix/139-spam-limits @ 4c566791 VERDICT: PASS.This PR adds no new public route, approval type, or app/provider capability.