# BR-CONV-10

Quand plusieurs instances du service partagent la même mémoire Redis, alors elles donnent le même jeton à la même valeur d'une conversation, et chacune restaure les jetons émis par l'autre.

Défini dans [Suivre une conversation et restaurer la réponse](https://docs.piighost.dev/fr/domain/processes/follow-a-conversation/#br-conv-10).

## Où vit la règle

- [`src/piighost/conversation_memory/redis_backend.py`](https://github.com/Athroniaeth/piighost/blob/master/src/piighost/conversation_memory/redis_backend.py)

## Tests directs

Aucun test n'appelle ce code directement.

## Tests indirects

- [`tests/acceptance/test_ops.py::TestSharedMemory::test_two_instances_agree_on_a_thread`](https://github.com/Athroniaeth/piighost/blob/master/tests/acceptance/test_ops.py#L59)
- [`tests/conversation_memory/test_redis.py::TestAtRestProtection::test_detections_are_encrypted_at_rest`](https://github.com/Athroniaeth/piighost/blob/master/tests/conversation_memory/test_redis.py#L159)
- [`tests/conversation_memory/test_redis.py::TestAtRestProtection::test_message_text_is_not_stored_in_any_key`](https://github.com/Athroniaeth/piighost/blob/master/tests/conversation_memory/test_redis.py#L148)
- [`tests/conversation_memory/test_redis.py::TestBatchingAndAtomicity::test_concurrent_identical_remembers_do_not_duplicate`](https://github.com/Athroniaeth/piighost/blob/master/tests/conversation_memory/test_redis.py#L64)
- [`tests/conversation_memory/test_redis.py::TestBatchingAndAtomicity::test_union_reads_in_a_single_mget`](https://github.com/Athroniaeth/piighost/blob/master/tests/conversation_memory/test_redis.py#L46)
- [`tests/conversation_memory/test_redis.py::TestConformance::test_satisfies_the_port`](https://github.com/Athroniaeth/piighost/blob/master/tests/conversation_memory/test_redis.py#L37)
- [`tests/conversation_memory/test_redis.py::TestForget::test_forget_leaves_other_threads`](https://github.com/Athroniaeth/piighost/blob/master/tests/conversation_memory/test_redis.py#L137)
- [`tests/conversation_memory/test_redis.py::TestForget::test_forget_purges_and_reports`](https://github.com/Athroniaeth/piighost/blob/master/tests/conversation_memory/test_redis.py#L124)
- [`tests/conversation_memory/test_redis.py::TestForget::test_forget_unknown_thread_reports_nothing`](https://github.com/Athroniaeth/piighost/blob/master/tests/conversation_memory/test_redis.py#L132)
- [`tests/conversation_memory/test_redis.py::TestGetDetections::test_clean_message_is_a_hit_with_no_detections`](https://github.com/Athroniaeth/piighost/blob/master/tests/conversation_memory/test_redis.py#L89)
- [`tests/conversation_memory/test_redis.py::TestGetDetections::test_overwriting_a_message_does_not_duplicate_in_union`](https://github.com/Athroniaeth/piighost/blob/master/tests/conversation_memory/test_redis.py#L103)
- [`tests/conversation_memory/test_redis.py::TestGetDetections::test_round_trip_for_a_message`](https://github.com/Athroniaeth/piighost/blob/master/tests/conversation_memory/test_redis.py#L77)
- [`tests/conversation_memory/test_redis.py::TestGetDetections::test_union_in_first_seen_order`](https://github.com/Athroniaeth/piighost/blob/master/tests/conversation_memory/test_redis.py#L95)
- [`tests/conversation_memory/test_redis.py::TestGetDetections::test_unknown_message_is_a_miss`](https://github.com/Athroniaeth/piighost/blob/master/tests/conversation_memory/test_redis.py#L84)
- [`tests/conversation_memory/test_redis.py::TestProvenance::test_default_role_is_user`](https://github.com/Athroniaeth/piighost/blob/master/tests/conversation_memory/test_redis.py#L180)
- [`tests/conversation_memory/test_redis.py::TestProvenance::test_records_first_occurrence_role`](https://github.com/Athroniaeth/piighost/blob/master/tests/conversation_memory/test_redis.py#L171)
- [`tests/conversation_memory/test_redis.py::TestProvenance::test_unknown_thread_has_no_provenance`](https://github.com/Athroniaeth/piighost/blob/master/tests/conversation_memory/test_redis.py#L186)
- [`tests/conversation_memory/test_redis.py::TestRedisPlaintext::test_exactly_one_of_hasher_cipher_is_refused`](https://github.com/Athroniaeth/piighost/blob/master/tests/conversation_memory/test_redis.py#L207)
- [`tests/conversation_memory/test_redis.py::TestRedisPlaintext::test_round_trips_without_crypto`](https://github.com/Athroniaeth/piighost/blob/master/tests/conversation_memory/test_redis.py#L193)
- [`tests/conversation_memory/test_redis.py::TestThreadIsolation::test_threads_do_not_leak`](https://github.com/Athroniaeth/piighost/blob/master/tests/conversation_memory/test_redis.py#L113)

## Utilisé par

Aucun appelant trouvé.

Lu dans le graphe du code que construit graphify, aux emplacements que donne la documentation métier.
