Skip to content

pkgs/id crate split step 2b-2: extract id-events (#4405) - #8664

Merged
dezren39 merged 1 commit into
mainfrom
crate-split-step2b-id-events
Nov 11, 2026
Merged

dezren39 merged 1 commit into
mainfrom
crate-split-step2b-id-events

Conversation

@dezren39

@dezren39 dezren39 commented Nov 11, 2026 •

Copy link
Copy Markdown
Member

Step 2b-2 of the pkgs/id crate split (#3447 umbrella, #4405), stacked on step 2b-1 (PR #8656, merged b8be94f): move the event-store family into the id-events crate created there. Implementation now lives only in id-events; the facade re-exports id::event_store, id::local_events, id::event_sync, id::attestation at their historical paths, and id::store_traits::SharedEventStore keeps pinning the same concrete store (the EventStoreBackend impl moved with EventStore).

Moved: event_store (mod, ingest, resolve, claims, chat, documents, range, sync, waiting_rows, writer_set), local_events, event_sync, attestation.

Adaptations (relocation/visibility only, no behaviour or API change):

  • crate::* paths in the moved modules now resolve to the owning lower crates (id_core::*, id_store::*) or to id_events itself; the fold/model/idset/pull-policy seams were already resolved downward by 2b-1.
  • event_store::sync::{RangeStore, sync_on_streams} and event_sync::CLOSE_WAIT are pub (were pub(crate)): the facade's log_sync/artifact name them, as they did when all lived in one crate. Inside id-events, sync.rs pins Shared = SharedEventStore<super::EventStore> for its RangeStore impl — the same pin the facade alias names.
  • One test (event_sync's ALPN distinctness) compares against the literal handshake ALPN /id-sync/1 instead of naming the facade's log_sync::SYNC_ALPN, which sits above this crate; the constant asserted is unchanged.
  • Doc links to facade-only modules (log_sync, abuse, server_config) became plain references.

Verification (protocol of steps 1/2a):

  • Baseline on unmodified main @a3cc79eb8a: 66 suites / 3,676 passed / 1 failed / 33 ignored; the one failure is the pre-existing frames::tests::byte_refusal_... (pkgs/id: frames byte_refusal test fails deterministically on main (RequestTooLarge vs BudgetExhausted) #8620).
  • This step's tree (2b-1 + this PR, pre-rebase): 68 suites / 3,676 passed / 1 failed (same frames test) / 33 ignored — parity. The branch was then rebased onto current main (drift confined to web/*.ts, world_dev.rs, tests/toolchain_pin.rs); the rebased tree is re-verified before merge and the result posted as a PR comment.
  • Fuel canary: sha256sum pkgs/id/src/sandbox.rs identical (db88ec8d52e961702353c97a407b77badadef1bd7e0a610a6075267e175d80b5); print_fuel_baseline output byte-identical (72 lines) on both 2b-1 and this tree.
  • Nix: nix build ./pkgs/id#id-lib — check-phase result posted as a PR comment (main's own check phase fails on the same single frames test: 2,490 passed / 1 failed).
  • Note: cargo check -p id --no-default-features fails identically on unmodified main and on this tree (pre-existing world_compile → world_cache/world_session feature-gating errors, untouched by this split).
  • Completeness: no event_store/local_events/event_sync/attestation implementation remains in facade src (only pub use re-exports in lib.rs).

Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

@dezren39
dezren39 requested a review from a team as a code owner November 11, 2026 12:10
@coderabbitai

coderabbitai Bot commented Nov 11, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You'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 53 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 5b1e70e3-ea62-4718-abae-f089d6c8a42f
Commits

Reviewing files that changed from the base of the PR and between b8be94f and 746cb28.

Files ignored due to path filters: 1

  • pkgs/id/Cargo.lock is excluded by !**/*.lock
Files selected for processing: 16

  • pkgs/id/crates/id-events/Cargo.toml
  • pkgs/id/crates/id-events/src/attestation.rs
  • pkgs/id/crates/id-events/src/event_store/chat.rs
  • pkgs/id/crates/id-events/src/event_store/claims.rs
  • pkgs/id/crates/id-events/src/event_store/documents.rs
  • pkgs/id/crates/id-events/src/event_store/ingest.rs
  • pkgs/id/crates/id-events/src/event_store/mod.rs
  • pkgs/id/crates/id-events/src/event_store/range.rs
  • pkgs/id/crates/id-events/src/event_store/resolve.rs
  • pkgs/id/crates/id-events/src/event_store/sync.rs
  • pkgs/id/crates/id-events/src/event_store/waiting_rows.rs
  • pkgs/id/crates/id-events/src/event_store/writer_set.rs
  • pkgs/id/crates/id-events/src/event_sync.rs
  • pkgs/id/crates/id-events/src/lib.rs
  • pkgs/id/crates/id-events/src/local_events.rs
  • pkgs/id/src/lib.rs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

Share

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-11T12:12:43.672079Z 746cb28 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@dezren39

Copy link
Copy Markdown
Member Author

Rebased-tree verification (this branch rebased onto current main after 2b-1 merged; drift since the original base was confined to web/*.ts, src/world_dev.rs, tests/toolchain_pin.rs):

  • Full workspace cargo test --no-fail-fast on the rebased tree @746cb281b3: 68 suites / 3,688 passed / 1 failed / 33 ignored. The one failure is the pre-existing frames::tests::byte_refusal_does_not_spend_a_frame_token_or_increment_counters (pkgs/id: frames byte_refusal test fails deterministically on main (RequestTooLarge vs BudgetExhausted) #8620). Baseline on the original base was 3,676 passed / 1 failed; the +12 passed are tests that landed on main with the drift (world_dev / toolchain_pin), not split changes — no test lost, no new failure. Facade lib: 2,215 passed / 1 failed.
  • Fuel canary on the final tree: sandbox.rs sha256 db88ec8d52e961702353c97a407b77badadef1bd7e0a610a6075267e175d80b5 (identical), print_fuel_baseline byte-identical (72 lines).
  • Nix nix build ./pkgs/id#id-lib on the rebased tree: check phase fails on exactly the same pre-existing frames test, facade lib 2,215 passed / 1 failed / 4 ignored in the Nix sandbox. Main's own Nix check phase, measured directly: 2,490 passed / 1 failed, same single failure — parity (the delta is the relocated suites). Merging on local parity, as steps 1, 2a and 2b-1 did (repo CI is failing wholesale for unrelated infra reasons).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant