pub fn format_event_line(envelope: &SessionEventEnvelope) -> Option<String>Expand description
Format the single stderr relay line emit writes for envelope, or None
if it cannot be serialised.
Why: the relay line is a cross-process wire format, and the session
manager’s harness-understanding doc tells an operator which prefix to look
for. Splitting formatting out of emit lets a test compare the REAL
emitted line against that doc instead of against a copy of the literal —
the divergence #5129 recorded was invisible precisely because every test
pinned a constant to itself.
What: returns EVENT_LINE_PREFIX concatenated with the compact JSON of the
envelope; None only on the (practically impossible) serde failure.
Test: events_tests::sm_harness_doc_documents_the_prefix_tcode_emits.