Skip to content

id-web: resolve note group grants against the group log (#3819) - #11732

Merged
dezren39 merged 1 commit into
mainfrom
feat/3819-note-group-roles
Nov 18, 2026
Merged

dezren39 merged 1 commit into
mainfrom
feat/3819-note-group-roles

Conversation

@dezren39

@dezren39 dezren39 commented Nov 18, 2026 •

Copy link
Copy Markdown
Member

Before: a shared note granted to a group never reached the group's members. The access check asked a group-role resolver, but the running server never installed one, so every group grant came back as "no access".

After: the server checks group grants against its own group log. Members get note access matching their group role, and a member who is removed loses it at the next checkpoint, with no restart.

How: groups::note_role_in maps a member's group role onto the note ladder (Read to Read, Write and Manage to Write, Admin to Admin; Pull, inactive groups and non-members get nothing). groups::note_group_roles wraps that in a GroupRoles that folds the log on each check, which only runs when a checkpoint is published. An unreadable log logs a warning and fails closed for group grants only. web_routers_with_surface installs it before the state is cloned into the routers. Two new tests cover the role mapping and revocation through the live resolver.

Part of #3819 (still open: keeping note policies and seeding across restarts, and wire-level tests).


Generated by Claude Code


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

Note checkpoints scoped to a group checked membership through
GroupRoles, but production never set a resolver, so every group grant
resolved to no role. web_routers_with_surface now installs one that
folds the node's group log on each check: Read maps to Read, Write and
Manage to Write, Admin to Admin, and Pull or an inactive group grants
nothing. An unreadable log fails closed for group grants only.

Part of #3819.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@dezren39
dezren39 marked this pull request as ready for review November 18, 2026 07:47
@dezren39
dezren39 requested a review from a team as a code owner November 18, 2026 07:47
@coderabbitai

coderabbitai Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

Explain Change →

Caution

Review failed

The pull request is closed.

  • 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 18, 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-18T07:48:56.314771Z 3e02547 Draft marked ready
ℹ️ 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.

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