feat(bus): reserve identity.unmerged topic
Revocable merges (a contradiction-driven undo of identity.merged) ship in the clusterer work; this reserves the topic up-front so identity.> subscribers receive it day one without a re-subscribe. The clusterer worker's ClusterResult fan-out now publishes on identity.unmerged when populated. The skeleton clusterer never populates it; the revocable-merge commit will. Wiki update lives in wiki-checkout/Service-Bus.md (separate repo).
This commit is contained in:
@@ -148,9 +148,13 @@ async def _publish_result(bus: Optional[BaseBus], result: ClusterResult) -> None
|
||||
merged,
|
||||
event_type=_topics.IDENTITY_MERGED,
|
||||
)
|
||||
# identities_unmerged ships once IDENTITY_UNMERGED is reserved
|
||||
# (next commit). The field is already on ClusterResult so the
|
||||
# revocable-merge work doesn't reshape the dataclass.
|
||||
for unmerged in result.identities_unmerged:
|
||||
await publish_safely(
|
||||
bus,
|
||||
_topics.identity(_topics.IDENTITY_UNMERGED),
|
||||
unmerged,
|
||||
event_type=_topics.IDENTITY_UNMERGED,
|
||||
)
|
||||
|
||||
|
||||
async def _wake_on(bus: BaseBus, wake: asyncio.Event, pattern: str) -> None:
|
||||
|
||||
Reference in New Issue
Block a user