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 — id(world): validate event authors on journal restore (#2894) by dezren39 · Pull Request #4518 · 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 32 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: 82bd8e62fc
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.
| self.effective_scopes(participant_id) | ||
| .is_some_and(|scopes| scopes.contains(scope)), |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Validate historical scopes without consulting directory state
When a friend-delegated participant has committed an Input or Chat event, this check rejects its valid journal and prevents the world from reopening, including from a checkpoint retaining that event. restore starts with an empty directory, while open_world loads the persisted directory only after restoration (world_store.rs:386-392). Consequently, effective_scopes finds no friendship between the differing parent/child subjects and returns zero scopes (core.rs:1057-1062). Historical scope validation should use the recorded capability chain rather than mutable directory permissions; merely loading the directory earlier would still reject previously valid events after the friendship ends.
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.
Fixed in 44a985a (this PR, rebased onto current main as 6d505cf first).
You were right: validate_restored_event_author consulted effective_scopes, which intersects directory ceilings and returns zero scopes when a participant subject differs from its parent subject without a recorded friendship — and restore runs before open_world loads the directory, so a friend-delegated participant valid historical Input/Chat events were rejected and the world could not reopen (checkpoint-retained events hit the same path).
Fix: restore-time scope validation now uses a new journaled_scopes helper — the intersection of the issued scopes recorded along the capability chain in the journal itself — with no directory consultation. Live paths (viewer_scopes and the other effective_scopes callers) are unchanged and still apply current directory state.
Regression coverage: restore_accepts_friend_delegated_history_without_directory_state (cross-subject delegation; committed Input+Chat and checkpoint-retained Input). Oracle check: with the pre-fix effective_scopes call restored, the new test fails with exactly the predicted error (journal event at sequence 1 uses participant 2 without INPUT scope); with the fix, it and all 51 restore-filtered tests pass (cargo test --lib restore, laptop run).
CodeRabbit left no findings on this PR (its only comment is a review-limit notice), so there is nothing to address there.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
…ty chain Codex P1 on PR #4518: validate_restored_event_author used effective_scopes, which consults the world directory (friendship and ceilings). Restore runs before the directory loads, so a friend-delegated participant had zero effective scopes and its valid journal was rejected on reopen. Historical validation now intersects the issued scopes recorded along the capability chain (journaled_scopes); live paths such as viewer_scopes keep using effective_scopes. Adds restore_accepts_friend_delegated_history_without_directory_state, which fails with the pre-fix call (participant without INPUT scope) and passes now; the checkpoint_event test helper gains the admin_history/lease/open_presence fields main added to the Checkpoint entry.
82bd8e6 to
44a985a
Compare
…re-event-author-validation
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(world): journal restore never validates Committed/Checkpoint event authors — inputs and chat from never-issued participants restore, replay, and project
There was an error while loading. Please reload this page.