Repository navigation
feat(id-worlds): public construction path for JournalAdminHistory (#13421) - #13516
Merged
Merged
Conversation
…3421) JournalAdminHistory's fields were pub(crate) with no public constructor, so code outside id-worlds — benches, integration tests, downstream tooling — could not build a current-form checkpoint's admin history and had to fall back to the legacy inline form (admin_history: None). - Add JournalAdminHistory::new(events, complete) plus events(), is_complete() and into_events() accessors; fields stay crate-private so the window is only ever set whole. - Re-export the type publicly from world/mod.rs; the id facade re-exports world wholesale, so id::world::JournalAdminHistory is the facade path. - Add pkgs/id/tests/journal_admin_history.rs: an external-crate test that builds a current-form checkpoint through the facade only and round-trips it through the journal line format. - Drop the now-false limitation claim from the stress_join bench header (bench behaviour unchanged).
Clippy (missing_const_for_fn) on the new accessors from the previous commit; SessionId::new in the same module is already const, so match it.
|
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 58 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 was referenced Nov 23, 2026
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.
Closes #13421
What
JournalAdminHistory(crates/id-worlds) hadpub(crate)fields and no public constructor, and was only re-exportedpub(crate)fromworld/mod.rs— so benches, integration tests and downstream tooling outsideid-worldscould not build a current-form checkpoint's admin history at all. Thestress_joinbench fixtures (#13084) had to use the legacy inline form (admin_history: None) and disclosed the limitation in the bench header.world/journal.rs: addJournalAdminHistory::new(events, complete)(const) plusevents(),is_complete()(const) andinto_events()accessors. Fields stay crate-private, so the window is only ever set whole — here or by the journal writer itself.world/mod.rs: re-export the type publicly. Theidfacade re-exportsworldwholesale, so the facade path isid::world::JournalAdminHistory.pkgs/id/tests/journal_admin_history.rs(new): external-crate test using only the facade surface — builds a current-formJournalEntry::Checkpointwith the constructor and round-trips it through the journal's on-disk line format; a second test pins the incomplete-history round-trip.benches/world_bench.rs: drop the now-false limitation claim from thestress_joinfixture header. Bench behaviour is unchanged (the legacy form stays a deliberate choice there: restore supports it explicitly and the retained window is the term the bench measures).Verification (laptop,
nix developin pkgs/id, private target dir, sccache disabled per #13367)cargo test --test journal_admin_history— 2 passed, exit 0 (the named oracle: external construction through the facade only).cargo test -p id-worlds --lib checkpoint— 41 passed, exit 0.cargo test -p id-worlds --lib admin_history— 10 passed, exit 0.cargo check --benches -p id— exit 0.cargo clippy -p id-worlds --lib --no-deps— exit 0. (Full clippy with deps stops inid-storeon 9 pre-existingexpect_usederrors incrates/id-store/src/admission.rs, untouched by this change.)Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.