Repository navigation
feat(id): persist server-config provisioning into live serving state (#5119 slice 3) - #8356
Conversation
…5119 slice 3) Provisioned::from_parts builds provisioning from a journaled Directory plus the serve groups log events; GroupLog::record_preformed seeds already-formed events by ID (skip if held). serve starts the config via start_server_config_persisted: accounts journal beside the groups log, group events into the groups log itself, so a restart loads them back and reports zero creations. Tests: record_preformed seeds-once-then-skips; persisted start survives a restart.
|
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 9 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. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3be224385c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
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".
#5119 slice 3, Codex P2s) Provisioned::apply now completes a partially recorded group with exactly its missing events instead of skipping on the create ID, so a crash mid-group no longer leaves memberships permanently missing (an admin-removed member is not resurrected: its add event is still recorded, hence not missing). start_server_config_persisted seeds only the suffix this start added, so a restart no longer rescans the whole groups log. New test: test_an_interrupted_group_is_completed_by_the_next_apply.
|
🤖 Agent note · parked (another session actively owns this PR)
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 19b2f4408e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
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".
| fn server_config_directory_path(groups_log: &Path) -> PathBuf { | ||
| groups_log.with_file_name("directory.jsonl") |
There was a problem hiding this comment.
Persist configured accounts into the live world's directory
When serving a durable world with --server-config and the default groups-log path, this writes configured accounts to ./directory.jsonl, but ServeWorlds::open_world loads .id-worlds/<name>/directory.jsonl through world_store::open_world (world_store.rs:540–545). The provisioned directory is never passed into that live world. Consequently, startup reports successful account provisioning, yet those accounts remain absent from the live directory and directory_view.rs:68–71 treats their keys as anonymous. Resolve provisioning against the directory actually used by the serving world, or explicitly wire the provisioned directory into its state.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Confirmed and fixed in PR #8413: slice 3 persisted configured accounts beside the groups log, but the live world loads .id-worlds//directory.jsonl. cmd_serve now seeds the default (startup) world directory from the loaded config via the extracted Provisioned::apply_users, idempotently; regression test seed_world_directory_provisions_configured_accounts covers it (serve suite 47/47, server_config suite 57/57 locally).
Slice 3 of #5119 (queue task 14074): startup provisioning now lands in the live serving state instead of a throwaway in-memory value.
What changed
groups::log::GroupLog::record_preformed— records an already-formed event keeping its ID and chain place; an event whose ID the log already holds is skipped, so seeding is a no-op after the first start.server_config::Provisioned::from_parts— builds provisioning state from persisted parts (a journaled Directory + already-recorded group events);applyalready skips what exists, so a restart creates nothing.serve::start_server_config_persisted— serve now starts the config from persisted state: accounts into the journaled directory (directory.jsonlbeside the groups log, the world-directory layout), preformed group events into the serve groups log itself — the same state live serving folds and replays.cmd_servecalls the persisted start;--server-configabsent = unchanged behavior, and the slice-1 in-memorystart_server_configremains for its existing tests/callers.Acceptance mapping (#5119)
start_server_config_persisted_survives_a_restart(second start reportsReport::default(), accounts resolvable, events loaded back).--server-configis given.Tests
groups::logtest_record_preformed_seeds_once_and_then_skips;commands::servestart_server_config_persisted_survives_a_restart.Still remaining for #5119 (not this PR)
Refs #5119
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.