GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — feat(id): chat v1 core remainder — store wiring, membership/history enforcement, rate admission (#3950) by dezren39 · Pull Request #3965 · developing-today/code Conversation
|
|
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. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
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. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Here are some automated review suggestions for this pull request.
Reviewed commit: 72d54bd489
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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".
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
🤖 Agent note (task 5893, lane C): this PR is parked in the queue on the Codex findings gate — three undispositioned P2 findings (comments 4437276309, 4437276319, 4437276331). Resume: fix or reply-disposition each, re-verify tests, then merge. Details on issue #3950. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
🤖 Agent note · parked (task 5893, queue worker lane F): re-verified this shift — head 72d54bd, no CI pending, merge gate unchanged: the three accepted Codex P2 findings (4437276309, 4437276319, 4437276331) still need in-PR fixes. Parked 30 min because fresh laptop load (62.82 / 92.45 / 94.44) blocks test-validated Rust work. Resume condition recorded on task 5893 and issue #3950. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Here are some automated review suggestions for this pull request.
Reviewed commit: 990bab5caa
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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".
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| let ext = &event.header.extensions; | ||
| if ext.kind != CHAT_MESSAGE_KIND || ext.group != Some(*group) { | ||
| continue; | ||
| } |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Enforce chat author membership on received events
A non-member can sign a chat.message.v1 event with the channel's group ID, sequence zero, and the group's create event in after, then deliver it through EventStore::ingest or sync. The new send_chat membership check only protects the local sending API: resolve::content_applies returns true without checking membership whenever all parents are applied, so this outsider's event enters APPLIED and passes this timeline filter. Consequently, legitimate members see unauthorized messages in their channel. Enforce the author's membership at the event's causal position on the receiving/resolution path, rather than relying on cooperative senders.
Useful? React with 👍 / 👎.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Disposition (queue worker lane code-v, task 13371): fixed in the port of this PR onto current main (branch queue/13371-3950-chat-v1-port, pushed to this PR). content_applies in pkgs/id/src/event_store/resolve.rs now membership-gates every chat.message.v1 event at its causal position — not only content naming a voided event: a chat event applies only when its author was a member of the event's group there (Membership::is_member_at, with the author's backlink included in the position, since a member's first message may name the group only through it). Regression coverage: test_chat_from_a_non_member_does_not_apply in pkgs/id/src/event_store/chat.rs — an outsider-signed chat event naming the channel group with the create in its past does not apply and never reaches a member's timeline.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
🤖 Agent note · parked
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
…nforcement, rate admission (#3950) ChainExt gains a chat field (mirrors document): a chat.message.v1 event carries its ChatMessage in the signed header, validated by ChainExt::validate (chat body required for the chat kind, refused for every other kind, message checked). Events without a chat body keep their exact wire encoding. EventStore (new event_store/chat.rs): - chat_records(group): the record conversion — applied chat events of the group become ChatRecords with after from the extension and the backlink from the header, the shape the causal projection consumes. - group_policy(group): the group's policy record from the resolved fold. - chat_timeline(group, reader): the policy-enforcing read — a non-member is refused (StoreError::NotMember); a member gets the projected timeline cut by the policy history rule via chat::visible_history. FromJoin shows only records causally following the reader's join event; Recent/Causal are narrowed conservatively to that set (their message-level meaning is deferred in the design, as in the encryption history layer). LocalEvents::send_chat: write admission — the message is checked, the node's key must be on the group roster, and a sliding-window SendRate (world-chat starting configuration, 50 per 10 seconds, with a ChatRateConfig seam) must admit the send before anything is signed. Tests: two independent members exchange signed chat events through two stores with duplicate and out-of-order delivery and project identical timelines; non-member writes refused at admission and non-member reads refused; rate burst/refusal at both the limiter and the send path; conversion binds records to their group. Full lib suite on the laptop: 1491 passed, 1 pre-existing failure (store_traits sqlite lock test — sqlx/sqlx-macros-core gained sqlx-sqlite edges in the lock with the sqlx 0.9.0 update, PR #632; this diff touches no manifest or lock). Queue task 5893.
…stors + P1 membership gate - chain.rs: header text chunking for chat text over the 512-byte CBOR string limit (P2 4437276309, carried from PR branch merge bd403f5) - chat.rs: NFC-normalize message text and link hints at construction, refuse non-NFC at validation (P2 4437276319) - event_store/chat.rs: preserve causal chat ancestors across non-chat events in chat_records (P2 4437276331) - event_store/resolve.rs: membership-gate chat.message.v1 at its causal position on the receiving path (P1 4471198623); membership layer now fed full causal graph (after + backlink) - ChainExt chat field added to remaining initializers across src/tests
990bab5 to
e6ac552
Compare
|
🤖 Agent note · ported onto current main
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Here are some automated review suggestions for this pull request.
Reviewed commit: e6ac5525db
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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".
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| return layer | ||
| .is_member_at(node.author, group, &position) | ||
| .map_err(|err| corrupt(format!("the membership layer: {err}"))); |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Require write access before accepting chat messages
When a channel member has only Access::read() or Access::pull(), this check still accepts their signed chat events: Membership::is_member_at returns true for any access level. Those messages enter APPLIED and appear in legitimate members' timelines even though the chat design explicitly requires Write for sending (doc/2026-11-01_design_id2051.md:60). Local send_chat likewise checks only roster inclusion. Require write-or-higher access at the event's causal position on receipt, and enforce the corresponding permission at local admission.
Useful? React with 👍 / 👎.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| if !resolve::roster_of(&resolved, group).contains(reader) { | ||
| return Err(StoreError::NotMember); | ||
| } |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Require read access before returning plaintext chat history
For a member granted only Access::pull(), roster inclusion passes this gate and the method returns plaintext messages. Pull is explicitly the ciphertext-replication role without keys (groups/mod.rs), while the chat design reserves receiving/decrypting for Read (doc/2026-11-01_design_id2051.md:60). The policy-enforcing timeline API should check read-or-higher access rather than treating every roster member as authorized to read message contents.
Useful? React with 👍 / 👎.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| None, | ||
| None, | ||
| Some(message), | ||
| &[], |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Preserve membership evidence when bounding the chat frontier
When the store has more than 32 other authors, a member sending their first event can pass the roster check but have their chat rejected locally. Passing no required heads lets bounded_after retain only the first 32 author heads; if the channel's create or membership grant is reachable only through an omitted head, the message has neither that membership evidence in after nor a backlink establishing it. The new receiving gate then finds no membership at the message's causal position, persists it as voided, and send_chat returns an error. Reserve a frontier head that establishes the sender's channel membership instead of allowing unrelated authors to displace it.
Useful? React with 👍 / 👎.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
id(chat): chat v1 core remainder — membership/history enforcement, store integration, rate admission (follow-on of #3799)
There was an error while loading. Please reload this page.