diff --git a/crates/manager-core/src/users_service.rs b/crates/manager-core/src/users_service.rs index 51846a7..b4f82a5 100644 --- a/crates/manager-core/src/users_service.rs +++ b/crates/manager-core/src/users_service.rs @@ -302,6 +302,19 @@ impl UsersServiceImpl { Ok(self.roles.list_for_user(app_id, user_id).await?) } + /// Emit a `users` lifecycle event. + /// + /// **Currently inert, and deliberately so.** `triggers.kind` has no `users` + /// value, so `outbox_event_emitter::plan()` has no arm for this source and + /// drops the event. These calls exist so the plumbing is already in place if + /// a users trigger kind lands. + /// + /// **If you add one, do NOT wire it up here.** This is the non-transactional + /// write-then-emit shape that audit #6 removed from every other stateful + /// service: the row commits, and if the outbox insert then fails the trigger + /// silently never fires (note the `let _ =` — this one does not even log). + /// Route it through a `crate::atomic_write` writer instead, so the row and + /// its fan-out commit together. See the write-path invariant in CLAUDE.md. async fn emit(&self, cx: &SdkCallCx, op: &'static str, user_id: AppUserId) { let _ = self .events