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:
@@ -149,6 +149,9 @@ async def test_publishes_cluster_result_on_bus(monkeypatch, repo):
|
||||
identities_merged=[
|
||||
{"winner_uuid": "id-1", "loser_uuid": "id-2"},
|
||||
],
|
||||
identities_unmerged=[
|
||||
{"resurrected_uuid": "id-2", "former_winner_uuid": "id-1"},
|
||||
],
|
||||
)
|
||||
clusterer = _FakeClusterer(results=[result])
|
||||
|
||||
@@ -169,6 +172,7 @@ async def test_publishes_cluster_result_on_bus(monkeypatch, repo):
|
||||
assert _topics.identity(_topics.IDENTITY_FORMED) in topics_seen
|
||||
assert _topics.identity(_topics.IDENTITY_OBSERVATION_LINKED) in topics_seen
|
||||
assert _topics.identity(_topics.IDENTITY_MERGED) in topics_seen
|
||||
assert _topics.identity(_topics.IDENTITY_UNMERGED) in topics_seen
|
||||
|
||||
|
||||
@pytest.mark.anyio
|
||||
|
||||
Reference in New Issue
Block a user