Repository navigation
Conversation
Implements the #5678 read-resolution order (object -> user default -> server config -> public) as a shared, tested resolver in id-store::read_authority, so the journal/database/outline/graph projections and transclusion rendering apply one order instead of re-deriving it. Unknown notes are denied (no existence leak, invariant 6); a known note with no recorded policy falls through the defaults. NoteCheckpoints::effective_role now delegates to the shared grant logic; recorded_access exposes the object level without the public default. Refs #12751
role_for matches on NotePrincipal in non-test code; the import was left in the test module only, so id-store failed to compile.
…e observable A plain create() inserted a Public policy entry, which made recorded_access() report Some(Public) for a note with no policy set and stopped the #5678 resolution order at the object level — the user and server defaults were unreachable. create() now records no policy: the note reads as Public (the Q3 default) through access(), while recorded_access() stays None so read_authority falls the note through to the user default, then the server default, before public. The policies map now holds only recorded policies, so a log rebuilt from its events agrees with the live log on what is recorded. Refs #12751
Merged main brought #12637, whose policies() snapshots the effective policy of every note — including a Public record for a note with no recorded policy. After this slice's create() fix, that re-states a phantom Public entry on rebuild and makes 'no policy set' unobservable again, closing the #5678 fall-through (user default, then server default) after a restart. policies() now snapshots only recorded policies; a note with none contributes no record and still reads as Public through access(). Updated the #12637 tests that assumed a Public record per note (seed refusal, restored-owner, snapshot-file restart, seed-before- events) and added: test_policies_snapshots_only_recorded_policies and test_a_rebuild_keeps_a_note_with_no_policy_falling_through. Refs #12751
|
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 38 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. |
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. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements the #5678 read-resolution order (object -> user default -> server config -> public) as a shared, tested resolver in id-store::read_authority, so the journal/database/outline/graph projections and transclusion rendering apply one order instead of re-deriving it. Unknown notes are denied (no existence leak, invariant 6); a known note with no recorded policy falls through the defaults.
Two fixes on the way to green:
Refs #12751
Test evidence (local, ~/tools/bin/cargo)
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.