Repository navigation
refactor(id-worlds): split world/mod.rs into world::journal (#10430) - #10451
Conversation
…ords (#10430) world/mod.rs was 2559 production lines, over the 2500 production-line limit (F11.10 guard #1411, split family #8588-#8594; this file had no grandfather entry). Extract the durable journal surface into world::journal: JournalEntry and its admin-history window, the coordinator journal entries, JournalSignedMove, the trust-gate records, every JOURNAL_VERSION* constant with journal_version_required_by, the WorldJournal trait, and JournalSnapshot/JournalSnapshotSource. mod.rs re-exports every moved item, so all crate::world::* public paths are unchanged (JournalAdminHistory stays pub(crate)). The moved text is a byte-for-byte move; the only edits are mechanical: JournalAdminHistory is pub inside the private journal module (effective visibility unchanged, and a pub(crate) item referenced by a public enum field across the new module boundary would trigger private_interfaces), one anyhow::Result -> Result with the now-redundant local Context import dropped, and the WorldCore::restore intra-doc link repointed to its full path. No behavior change. world/mod.rs: 2559 -> 1599 production lines; world/journal.rs: 988. production-line-guard green for both files. cargo test -p id-worlds: 674 passed, 0 failed.
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 11 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 findings disposition (queue worker lane code-c, task 17354): The Codex code review for this PR failed to run — the summary comment states the review could not be completed and the follow-up comment states Codex usage limits for code reviews have been reached. There are no substantive Codex findings on this PR: verified fresh — zero inline PR review comments and zero submitted reviews on PR #10451. Disposition: nothing to fix or rebut; the failure is a reviewer-availability limit, not a code finding. Merge proceeds on the verified evidence in the PR body plus a fresh local re-run: production-line guard shows world/mod.rs at 1,599 production lines (under the 2,500 limit) and cargo test -p id-worlds passes 674/674. |
Summary
Splits
pkgs/id/crates/id-worlds/src/world/mod.rs(#10430) by extracting theworld journal records into a new
world::journalsubmodule.world/mod.rswas 2,559 production lines (over the 2,500 limit) andproduction-line-guardwas red onmainfor it. It has no grandfather entry,so the split is the fix.
What moved
New file
pkgs/id/crates/id-worlds/src/world/journal.rsholds the durablejournal-format surface:
JournalEntry(all variants),JournalAdminHistoryCoordinatorJournalEntryJournalSignedMove(+from_record/to_record)TrustBasis,TrustDecisionJOURNAL_VERSION*constant,MAX_JOURNAL_VERSION,journal_version_required_by(the journal upgrade/refusal contract, Define rollback compatibility for world profile journal entries #227)WorldJournaltraitJournalSnapshot,JournalSnapshotSourceCapabilityDenied/is_capability_denieddeliberately stayed inmod.rs:they are capability-authorization types, not journal records.
No behavior change / public paths unchanged
mod.rsdeclaresmod journal;and re-exports every moved item, socrate::world::JournalEntry,crate::world::WorldJournal,crate::world::JOURNAL_VERSION, … are all unchanged.JournalAdminHistorykeeps its
pub(crate)reachability through its re-export.region against
origin/main). The only edits are mechanical:pub(crate) struct JournalAdminHistorybecamepubinside the privatejournalmodule to keep theprivate_interfaceswarning from appearingacross the module boundary (its effective visibility is unchanged — the
module is private and the re-export is
pub(crate)), oneanyhow::Resultto
Result/ dropped a redundant localuse anyhow::Context as _, and theintra-doc link
WorldCore::restore→crate::world::WorldCore::restorenow that it crosses the module boundary.
Guard evidence
Before (branch point
origin/main@73ae4d58dc):After, counting this worktree's two files with the same script (LIMIT lowered
to 0 in a scratch copy so it prints every count):
mod.rs: 2,559 -> 1,599 production lines. With the real limit restored andonly these two files in scope the guard is green:
Full-tree run on this worktree no longer lists
world/mod.rs; the tworemaining
OVER LIMITlines in the full run (atlas-search/server.rs2509,fleet-search/server.rs2501) are pre-existing onmainat this branch pointand are not touched here.
Tests
cargo test -p id-worlds(full crate suite), run through~/tools/fleet-build-lock:No test or fixture was modified.
Closes #10430
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.