feat: atomic social local writes, remote review enrichment
SocialCommand methods take events. Local follow ops = one FollowCommand::apply tx (rows + events). k_ap path (remote, block/unblock): best-effort publish in CompositeSocialAdapter after k_ap write; not atomic, k_ap owns tx. save_remote_review takes events, enqueued in same tx via sqlite::persistence::enqueue_events. Deps drop event_publisher: social command, ReviewObjectHandler. Remaining .publish( sites: announce-only: users/delete_account UserDeleted, person/get + get_credits PersonEnrichmentRequested, jobs/enrichment_staleness, http-axum search, ImageStored (sync_poster, poster_sync_handler, image-converter backfill, update_profile; object storage), federation_event_bridge (handler reaction), nats relay (transport). non-atomic by necessity: CompositeSocialAdapter::announce (k_ap-owned write). Everything else rides its write.
This commit is contained in:
@@ -14,6 +14,7 @@ impl SocialCommand for Stub {
|
||||
&self,
|
||||
_: &domain::value_objects::UserId,
|
||||
_: &domain::value_objects::FollowTarget,
|
||||
_: &[domain::events::DomainEvent],
|
||||
) -> Result<(), DomainError> {
|
||||
Ok(())
|
||||
}
|
||||
@@ -21,6 +22,7 @@ impl SocialCommand for Stub {
|
||||
&self,
|
||||
_: &domain::value_objects::UserId,
|
||||
_: &domain::value_objects::SocialIdentity,
|
||||
_: &[domain::events::DomainEvent],
|
||||
) -> Result<(), DomainError> {
|
||||
Ok(())
|
||||
}
|
||||
@@ -28,6 +30,7 @@ impl SocialCommand for Stub {
|
||||
&self,
|
||||
_: &domain::value_objects::UserId,
|
||||
_: &domain::value_objects::SocialIdentity,
|
||||
_: &[domain::events::DomainEvent],
|
||||
) -> Result<(), DomainError> {
|
||||
Ok(())
|
||||
}
|
||||
@@ -35,6 +38,7 @@ impl SocialCommand for Stub {
|
||||
&self,
|
||||
_: &domain::value_objects::UserId,
|
||||
_: &domain::value_objects::SocialIdentity,
|
||||
_: &[domain::events::DomainEvent],
|
||||
) -> Result<(), DomainError> {
|
||||
Ok(())
|
||||
}
|
||||
@@ -42,6 +46,7 @@ impl SocialCommand for Stub {
|
||||
&self,
|
||||
_: &domain::value_objects::UserId,
|
||||
_: &domain::value_objects::SocialIdentity,
|
||||
_: &[domain::events::DomainEvent],
|
||||
) -> Result<(), DomainError> {
|
||||
Ok(())
|
||||
}
|
||||
@@ -49,6 +54,7 @@ impl SocialCommand for Stub {
|
||||
&self,
|
||||
_: &domain::value_objects::UserId,
|
||||
_: &domain::value_objects::SocialIdentity,
|
||||
_: &[domain::events::DomainEvent],
|
||||
) -> Result<(), DomainError> {
|
||||
Ok(())
|
||||
}
|
||||
@@ -56,6 +62,7 @@ impl SocialCommand for Stub {
|
||||
&self,
|
||||
_: &domain::value_objects::UserId,
|
||||
_: &domain::value_objects::SocialIdentity,
|
||||
_: &[domain::events::DomainEvent],
|
||||
) -> Result<(), DomainError> {
|
||||
Ok(())
|
||||
}
|
||||
@@ -145,6 +152,7 @@ impl ResolvedFollow for Stub {
|
||||
&self,
|
||||
_: &domain::value_objects::UserId,
|
||||
_: &SocialIdentity,
|
||||
_: &[domain::events::DomainEvent],
|
||||
) -> Result<(), DomainError> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user