# BR-STREAM-02

Quand un morceau ouvre un jeton (« << ») sans le fermer, alors tout est retenu jusqu'à la fermeture, puis le jeton entier est restauré une seule fois.

Défini dans [Afficher une réponse au fil de l'eau](https://docs.piighost.dev/fr/domain/processes/show-a-streamed-reply/#br-stream-02).

## Où vit la règle

- [`_held_length()`](https://github.com/Athroniaeth/piighost/blob/master/src/piighost/components/placeholder/streaming.py#L84)
- [`_split_buffer()`](https://github.com/Athroniaeth/piighost/blob/master/src/piighost/components/placeholder/streaming.py#L106)

## Tests directs

Aucun test n'appelle ce code directement.

## Tests indirects

- [`tests/components/placeholder/test_streaming_async.py::TestCustomDelimiters::test_custom_delimiters_are_recognized_across_chunks`](https://github.com/Athroniaeth/piighost/blob/master/tests/components/placeholder/test_streaming_async.py#L193)
- [`tests/components/placeholder/test_streaming_async.py::TestCustomDelimiters::test_default_delimiters_ignore_a_different_grammar`](https://github.com/Athroniaeth/piighost/blob/master/tests/components/placeholder/test_streaming_async.py#L203)
- [`tests/components/placeholder/test_streaming_async.py::TestFeed::test_feeding_then_flushing_yields_expected_text`](https://github.com/Athroniaeth/piighost/blob/master/tests/components/placeholder/test_streaming_async.py#L109)
- [`tests/components/placeholder/test_streaming_async.py::TestFromFactory::test_factory_builds_a_matching_async_decoder`](https://github.com/Athroniaeth/piighost/blob/master/tests/components/placeholder/test_streaming_async.py#L210)
- [`tests/components/placeholder/test_streaming_async.py::TestInventedToken::test_a_token_the_callback_keeps_is_emitted_unchanged`](https://github.com/Athroniaeth/piighost/blob/master/tests/components/placeholder/test_streaming_async.py#L162)
- [`tests/components/placeholder/test_streaming_async.py::TestReplaceContract::test_replace_is_awaited_once_per_completed_token`](https://github.com/Athroniaeth/piighost/blob/master/tests/components/placeholder/test_streaming_async.py#L146)
- [`tests/components/placeholder/test_streaming_async.py::TestReplaceContract::test_replace_is_not_awaited_for_plain_text`](https://github.com/Athroniaeth/piighost/blob/master/tests/components/placeholder/test_streaming_async.py#L153)
- [`tests/components/placeholder/test_streaming_async.py::TestStreamInvariance::test_char_by_char_reconstructs_every_token`](https://github.com/Athroniaeth/piighost/blob/master/tests/components/placeholder/test_streaming_async.py#L138)
- [`tests/components/placeholder/test_streaming_async.py::TestStreamInvariance::test_output_is_independent_of_chunk_size`](https://github.com/Athroniaeth/piighost/blob/master/tests/components/placeholder/test_streaming_async.py#L132)
- [`tests/components/placeholder/test_streaming.py::TestFeed::test_feeding_then_flushing_yields_expected_text`](https://github.com/Athroniaeth/piighost/blob/master/tests/components/placeholder/test_streaming.py#L46)
- [`tests/components/placeholder/test_streaming.py::TestFeed::test_split_delimiter_is_held`](https://github.com/Athroniaeth/piighost/blob/master/tests/components/placeholder/test_streaming.py#L53)
- [`tests/components/placeholder/test_streaming.py::TestFromFactory::test_factory_builds_a_matching_decoder`](https://github.com/Athroniaeth/piighost/blob/master/tests/components/placeholder/test_streaming.py#L81)

## Utilisé par

- [`AsyncPlaceholderStreamDecoder.feed()`](https://github.com/Athroniaeth/piighost/blob/master/src/piighost/components/placeholder/streaming.py#L221)
- [`PlaceholderStreamDecoder.feed()`](https://github.com/Athroniaeth/piighost/blob/master/src/piighost/components/placeholder/streaming.py#L171)

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