Repository navigation
feat(id): note access boundary at checkpoint time (#3819 Phase 3 slice 3) - #10846
Conversation
Codex Review Summary: ❌ FailedThis 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. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
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 31 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. |
What
Refs #3819 — Phase 3 slice 3 of 4 (access boundary). Slices 1–2 landed in PR #10808 (checkpoint core) and PR #10831 (WS wiring). This slice enforces Drew's recorded answers on #2048 at checkpoint time:
id-store
note_checkpoints— the policy + enforcement core:NoteAccess(Publicdefault |Scoped(Vec<NoteGrant>)),NoteGrantoverNotePrincipal::{User, Group}with the Q3 ladderNoteRole::{Read, Write, Admin}. The note layer's ladder is deliberately its own (id-store depends on id-core only); a group resolver maps group roles onto it (Read→Read, Write/Manage→Write, Admin→Admin).effective_role/may_read/may_appendevaluate owner → public → user grants → group grants via theGroupRolesresolver (a closure seam;GroupRoles::none()knows no groups).checkpoint_checked/checkpoint_on_heads_checked/merge_checkedrefuse with the newCheckpointError::NotAuthorizedand record nothing.set_accesstakes Admin (owner or admin grant). The raw graph appends stay as the fold primitivesfrom_eventsrebuilds through.set_access— stated in the module docs, not hidden.id-web
collab— the wiring:CollabStatecarries aGroupRolesresolver (with_note_group_rolesbuilder; default none) and aset_note_accessdelegate.publish_note_checkpointnow publishes throughcheckpoint_on_heads_checked, so a scoped note refuses a non-grant author's publication — including at session end, where a refusal is already logged, never fatal (slice 2's shape).Tests
cargo test -p id-storegreen (234 + 12).test_publish_note_checkpoint_enforces_the_access_boundary(owner scopes → granted author chains, stranger refused with nothing recorded, write-grant holder cannot re-open). Collab suite 46 passed.Deliberately not in this slice
GroupRolesresolver over the folded groups projection inid-web/src/groups.rs(the seam is installed; the default resolver knows no groups, so group grants take effect once a host wires its projection in).Part of queue task 5826.
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.