fabro/lib/components/fabro-llm/tests/it/wire/snapshots
Bryan Helmkamp e1d0b1af4f
refactor(llm): make StreamStart a universal liveness edge
`StreamStart` was supposed to mean "the provider is responding", but
each decoder decided for itself when to emit it, so it meant something
different per dialect:

  anthropic       on the `message_start` frame
  bedrock         on the `messageStart` frame
  openai_responses  latched on the first SSE event
  gemini          latched on the first chunk
  openai_compatible  never — Chat Completions has no opening frame

A consumer could not rely on it, which is why the inference-bracket
work keyed its first-output edge on content kind instead.

Ownership moves to the two loops that drive decoders — the shared SSE
loop in `transport.rs` and the AWS event-stream loop in the bedrock
provider — each emitting exactly one `StreamStart` immediately before
handing over the first framed event. The invariant is now structural:
it cannot depend on a dialect having a particular opening frame,
because no decoder is involved in producing it. `StreamDecoder`
documents that decoders must not emit it, and the four that did no
longer do.

Only `openai_compatible` changes observably, gaining the event it never
had; the other three dialects' snapshots are byte-identical, because
their opening frame was already the first framed event. The six
updated `openai_compatible` snapshots each differ by exactly one
leading `stream_start` and nothing else.

Each dialect also gets an explicit `stream_opens_with_stream_start`
assertion. The snapshots already cover this, but a snapshot can be
re-accepted silently, and this is the one event a liveness consumer
needs to hold for every provider.

No behavior change to the agent's inference bracket:
`first_output_kind()` maps `StreamStart` to `None`, so the bracket
still opens on observed content and keeps reporting which kind
arrived. The point of this change is that a content-agnostic edge now
exists at all — the one-shot coverage follow-up needs it, and it is
strictly earlier than first content.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-07-24 22:05:26 -04:00
..
it__wire__anthropic__count_tokens_wire_shape.snap refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
it__wire__anthropic__custom_named_stream_error_identity.snap refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
it__wire__anthropic__custom_named_stream_identity.snap refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
it__wire__anthropic__custom_named_stream_route.snap refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
it__wire__anthropic__decode_max_tokens_stop_reason.snap refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
it__wire__anthropic__decode_thinking_and_redacted_thinking.snap refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
it__wire__anthropic__decode_tool_use_stop_reason.snap refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
it__wire__anthropic__encode_audio_attachment.snap refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
it__wire__anthropic__encode_bad_file_path_attachments_dropped.snap refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
it__wire__anthropic__encode_inline_attachments.snap refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
it__wire__anthropic__encode_multi_turn.snap refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
it__wire__anthropic__encode_prompt_cache_with_catalog.snap refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
it__wire__anthropic__encode_provider_options_anthropic_namespace.snap refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
it__wire__anthropic__encode_reasoning_effort_with_levels_catalog.snap refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
it__wire__anthropic__encode_response_format_json_object.snap refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
it__wire__anthropic__encode_response_format_json_schema.snap refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
it__wire__anthropic__encode_sampling_params.snap refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
it__wire__anthropic__encode_thinking_round_trip.snap refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
it__wire__anthropic__encode_tool_choice_auto.snap refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
it__wire__anthropic__encode_tool_choice_named.snap refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
it__wire__anthropic__encode_tool_choice_none.snap refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
it__wire__anthropic__encode_tool_choice_required.snap refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
it__wire__anthropic__encode_tool_round_trip.snap refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
it__wire__anthropic__encode_url_attachments.snap refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
it__wire__anthropic__stream_error_event_mid_stream.snap refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
it__wire__anthropic__stream_text_happy_path_events.snap refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
it__wire__anthropic__stream_text_happy_path_request.snap refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
it__wire__anthropic__stream_thinking_with_signature_delta.snap refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
it__wire__anthropic__stream_tool_call_deltas.snap refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
it__wire__anthropic__stream_without_message_stop_emits_no_finish.snap refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
it__wire__anthropic__system_and_tools_decode.snap refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
it__wire__anthropic__system_and_tools_encode.snap refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
it__wire__gemini__count_tokens_wire_shape.snap refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
it__wire__gemini__custom_named_http_error_identity.snap refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
it__wire__gemini__custom_named_stream_identity.snap refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
it__wire__gemini__decode_function_call_with_thought_signature.snap refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
it__wire__gemini__decode_max_tokens_finish_reason.snap refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
it__wire__gemini__decode_safety_finish_reason.snap refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
it__wire__gemini__decode_thought_parts.snap refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
it__wire__gemini__decode_usage_arithmetic.snap refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
it__wire__gemini__encode_audio_attachment.snap refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
it__wire__gemini__encode_bad_file_path_attachments_dropped.snap refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
it__wire__gemini__encode_inline_attachments.snap refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
it__wire__gemini__encode_multi_turn.snap refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
it__wire__gemini__encode_provider_options_can_override_safety_settings.snap refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
it__wire__gemini__encode_provider_options_gemini_namespace.snap refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
it__wire__gemini__encode_reasoning_effort_with_levels_catalog.snap refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
it__wire__gemini__encode_response_format_json_object.snap refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
it__wire__gemini__encode_response_format_json_schema.snap refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
it__wire__gemini__encode_sampling_params.snap refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
it__wire__gemini__encode_thinking_round_trip.snap refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
it__wire__gemini__encode_tool_choice_auto.snap refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
it__wire__gemini__encode_tool_choice_named.snap refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
it__wire__gemini__encode_tool_choice_none.snap refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
it__wire__gemini__encode_tool_choice_required.snap refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
it__wire__gemini__encode_tool_round_trip.snap refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
it__wire__gemini__encode_url_attachments.snap refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
it__wire__gemini__stream_end_synthesizes_finish_without_finish_reason.snap refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
it__wire__gemini__stream_function_call.snap refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
it__wire__gemini__stream_text_happy_path_events.snap refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
it__wire__gemini__stream_text_happy_path_request.snap refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
it__wire__gemini__stream_thought_parts.snap refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
it__wire__gemini__system_and_tools_decode.snap refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
it__wire__gemini__system_and_tools_encode.snap refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
it__wire__openai_compatible__decode_reasoning_content_as_thinking.snap refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
it__wire__openai_compatible__decode_tool_calls_with_string_arguments.snap refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
it__wire__openai_compatible__decode_usage_openrouter_cost_and_cache_write.snap refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
it__wire__openai_compatible__decode_usage_parses_token_details.snap refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
it__wire__openai_compatible__encode_audio_attachment.snap refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
it__wire__openai_compatible__encode_bad_file_path_attachments.snap refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
it__wire__openai_compatible__encode_inline_attachments.snap refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
it__wire__openai_compatible__encode_multi_turn.snap refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
it__wire__openai_compatible__encode_provider_options_keyed_by_adapter_name.snap refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
it__wire__openai_compatible__encode_provider_options_other_namespace_ignored.snap refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
it__wire__openai_compatible__encode_response_format_json_object.snap refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
it__wire__openai_compatible__encode_response_format_json_schema.snap refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
it__wire__openai_compatible__encode_sampling_params.snap refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
it__wire__openai_compatible__encode_thinking_round_trip_as_reasoning_content.snap refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
it__wire__openai_compatible__encode_tool_choice_auto.snap refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
it__wire__openai_compatible__encode_tool_choice_named.snap refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
it__wire__openai_compatible__encode_tool_choice_none.snap refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
it__wire__openai_compatible__encode_tool_choice_required.snap refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
it__wire__openai_compatible__encode_tool_round_trip.snap refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
it__wire__openai_compatible__encode_url_attachments.snap refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
it__wire__openai_compatible__stream_reasoning_deltas.snap refactor(llm): make StreamStart a universal liveness edge 2026-07-24 22:05:26 -04:00
it__wire__openai_compatible__stream_text_happy_path_events.snap refactor(llm): make StreamStart a universal liveness edge 2026-07-24 22:05:26 -04:00
it__wire__openai_compatible__stream_text_happy_path_request.snap fix(llm): request streaming usage on openai_compatible providers 2026-07-24 16:21:00 -04:00
it__wire__openai_compatible__stream_tool_call_deltas.snap refactor(llm): make StreamStart a universal liveness edge 2026-07-24 22:05:26 -04:00
it__wire__openai_compatible__stream_usage_openrouter_cost.snap refactor(llm): make StreamStart a universal liveness edge 2026-07-24 22:05:26 -04:00
it__wire__openai_compatible__stream_without_done_or_content_synthesizes_nothing.snap refactor(llm): make StreamStart a universal liveness edge 2026-07-24 22:05:26 -04:00
it__wire__openai_compatible__stream_without_done_synthesizes_finish_when_content_started.snap refactor(llm): make StreamStart a universal liveness edge 2026-07-24 22:05:26 -04:00
it__wire__openai_compatible__system_and_tools_decode.snap refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
it__wire__openai_compatible__system_and_tools_encode.snap refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
it__wire__openai_responses__count_tokens_wire_shape.snap refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
it__wire__openai_responses__custom_named_stream_failed_event_identity.snap refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
it__wire__openai_responses__decode_incomplete_status_maps_to_length.snap refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
it__wire__openai_responses__decode_reasoning_and_function_call_items.snap refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
it__wire__openai_responses__decode_usage_subtracts_cached_and_reasoning.snap refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
it__wire__openai_responses__encode_audio_attachment.snap refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
it__wire__openai_responses__encode_bad_file_path_attachments_dropped.snap refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
it__wire__openai_responses__encode_codex_mode_forces_streaming_and_omits_params.snap refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
it__wire__openai_responses__encode_dual_id_tool_round_trip.snap refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
it__wire__openai_responses__encode_inline_attachments.snap refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
it__wire__openai_responses__encode_multi_turn.snap refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
it__wire__openai_responses__encode_opaque_items_round_trip.snap refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
it__wire__openai_responses__encode_provider_options_openai_namespace.snap refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
it__wire__openai_responses__encode_reasoning_effort_with_levels_catalog.snap refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
it__wire__openai_responses__encode_response_format_json_object.snap refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
it__wire__openai_responses__encode_response_format_json_schema.snap refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
it__wire__openai_responses__encode_sampling_params.snap refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
it__wire__openai_responses__encode_thinking_round_trip.snap refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
it__wire__openai_responses__encode_tool_choice_auto.snap refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
it__wire__openai_responses__encode_tool_choice_named.snap refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
it__wire__openai_responses__encode_tool_choice_none.snap refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
it__wire__openai_responses__encode_tool_choice_required.snap refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
it__wire__openai_responses__encode_tool_round_trip.snap refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
it__wire__openai_responses__encode_url_attachments.snap refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
it__wire__openai_responses__stream_failed_event_maps_to_error.snap refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
it__wire__openai_responses__stream_incomplete_maps_to_length.snap refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
it__wire__openai_responses__stream_reasoning_summary_deltas.snap refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
it__wire__openai_responses__stream_text_happy_path_events.snap refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
it__wire__openai_responses__stream_text_happy_path_request.snap refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
it__wire__openai_responses__stream_tool_call_deltas.snap refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
it__wire__openai_responses__system_and_tools_decode.snap refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
it__wire__openai_responses__system_and_tools_encode.snap refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00