refactor!: API cleanup and renames (MERGE LAST — mechanical, conflicts expected) - #105
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (69)
💤 Files with no reviewable changes (6)
📝 WalkthroughWalkthroughThis PR renames the in-memory repository implementation from HashMapRepository/HashMapOutboxStore to InMemoryRepository/InMemoryOutboxStore across the crate, CLI generator, documentation, and full test suite. Separately, it relocates LocalEvent into the emitter module, removes the Committable and Event traits, restricts Entity::set_replaying visibility, renames the rabbit_bus module to rabbitmq_bus, removes the HandlerBuilder alias, and trims several crate-root public re-export lists. ChangesRepository Rename: HashMapRepository → InMemoryRepository
Entity/Emitter Trait Restructuring
RabbitMQ Bus Module Rename
Public Export Trimming and HandlerBuilder Removal
Estimated code review effort: 3 (Moderate) | ~30 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
Re-derived on current main (all other review PRs merged) rather than rebasing the stale diff, since these mechanical renames touch symbols the other PRs restructured. Squashed from the original 7 commits (see PR #105 history). Pre-release: no compat shims left behind. - Delete dead `Committable` trait (zero callers; pre-CommitBatch fossil). - Delete `HandlerBuilder` type alias (use `RouteBuilder`). - Complete emitter opt-in: delete the `Event` trait; move `LocalEvent` into `src/emitter/` behind the feature (now `distributed::emitter::LocalEvent`). - Rename `HashMapRepository`/`HashMapOutboxStore` -> `InMemoryRepository`/ `InMemoryOutboxStore`, module `hashmap_repo` -> `in_memory_repo`, and `tests/hashmap_repository_conformance` -> `tests/in_memory_repository_conformance`, matching every other in-memory default. Includes the CLI scaffold template. - Rename `src/bus/rabbit_bus.rs` -> `src/bus/rabbitmq_bus.rs` to match the `rabbitmq` feature and `rabbitmq.rs` sibling. - Prune adapter plumbing from the crate root (quick-start API at root, plumbing under module path): outbox adapter constants (SOURCED_METADATA_PREFIX, DEFAULT_OUTBOX_SOURCE_*) now only under `distributed::outbox_worker::*`; read_model load-graph/query plumbing (ReadModelLoadGraph/Request, ReadModelQueryCapabilities, ReadModelWorkspace, ReadModelIncludeRows, ReadModelLoadBuilder) now only under `distributed::read_model::*`. Kept `RelationalReadModelIncludes` at root (the ReadModel derive expands to it). Left #109's `table::` root surface as-is (its deliberate decision, out of scope here). - `Entity::set_replaying` -> pub(crate) (ReplayGuard covers internal use). Skipped #![warn(missing_docs)]: surfaces 518 warnings (mechanical-pass infeasible), as in the original PR. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DzYSVLas93c7LbgHJWsW7n
263d040 to
5a714e2
Compare
MERGE ORDER: LAST
This PR is part of a batch of 11 parallel PRs and intentionally conflicts with the other 10. Every change here is purely mechanical (deletes, renames, re-export moves — no behavior change). Merge all other PRs first, then resolve conflicts in this one by re-applying the mechanical rename/delete on top of the merged code (one commit per item makes each rename easy to re-apply or cherry-pick).
Changes (one commit per item)
refactor!:Delete deadCommittabletrait — zero callers anywhere (src, tests, macros, CLI); a fossil of the pre-CommitBatchAPI.refactor!:DeleteHandlerBuilderbackwards-compat alias —RouteBuilderis the real name; pre-release, no compat promises.refactor!:Complete the emitter opt-in — verified theEventtrait was a two-method string-accessor trait with a single impl and no trait-method callers; deleted it.LocalEvent(used only by the emitter feature) moved fromsrc/entity/tosrc/emitter/behind theemitterfeature (distributed::emitter::LocalEvent).refactor!:HashMapRepository→InMemoryRepository,HashMapOutboxStore→InMemoryOutboxStore, modulehashmap_repo→in_memory_repo,tests/hashmap_repository_conformance→tests/in_memory_repository_conformance. Pure textual rename across src, tests, docs, README, CLI templates — matchesInMemoryBus,InMemoryLockManager,InMemoryReadModelStore,InMemorySnapshotStore.refactor:rabbit_bus.rs→rabbitmq_bus.rs— file/mod rename only, aligning withrabbitmq.rsand therabbitmqfeature. Type names (RabbitBus,RabbitBusConnect, …) left unchanged: they appear across tests/docs/README, so renaming the type would ripple widely.refactor!:Prune adapter plumbing from the crate root, per the existing intent comments in lib.rs:SOURCED_METADATA_PREFIX,DEFAULT_OUTBOX_SOURCE_BATCH,DEFAULT_OUTBOX_SOURCE_LEASE) →distributed::outbox_worker::*only.ColumnDef,ColumnType,RowMutationfamily,ReadModelSchema*family, capabilities, load plans,ReadModelWorkspace,ReadModelWritePlan, …) →distributed::read_model::*only.ReadModel,RelationalReadModel,ReadModelError,InMemoryReadModelStore,ReadModelWorkspaceExt,ReadModelWritePlanBuilder,RowKey,RowValue,Versioned. Macro expansions now emit module paths for moved types.chore:Entity::set_replaying→pub(crate)— all callers are in-crate (hydration + emitter ext). Skipped#![warn(missing_docs)]: enabling it surfaces 518 warnings — far beyond a mechanical pass.Test output
Full suite with all features (in-memory, sqlite, postgres via
review_apiDB on the batch container, rabbitmq/nats/kafka env unchanged):Verified after every individual commit (fmt + clippy + full test suite).
🤖 Generated with Claude Code
https://claude.ai/code/session_01DzYSVLas93c7LbgHJWsW7n
Summary by CodeRabbit
New Features
Bug Fixes
Documentation
Tests