Skip to content

llm codec tests: F25 REHOME rows 107 and 109 at 1.5.5 (stacked on #857) - #884

Merged
MattJackson merged 7 commits into
predevfrom
lane-llm-codec-rehome-rf
Oct 15, 2026
Merged

MattJackson merged 7 commits into
predevfrom
lane-llm-codec-rehome-rf

Conversation

@MattJackson

Copy link
Copy Markdown
Collaborator

Stacked on #857. This branch contains #857's commit, 9d86513, which restores 1.5.5's response_format drop on a default Anthropic lane. Its own change is the one test commit on top. Once #857 lands, the diff shrinks to that commit.

What. These two F25 coverage-map v2 REHOME rows depend on #857:

  • Row 107, legacy crates/busbar-llm/src/engine/tests/egress_dropped_controls_audit_tests.rs:26. The legacy test pinned the synthetic busbar_response_format forced tool, which was post-1.5.5 drift. The ARCHITECT ruling of 2026-10-13 is that 1.5.5 wins, so it is ported at 1.5.5. Test anthropic/tests/ir_mapping_q57_tests.rs::openai_json_object_onto_a_default_anthropic_lane_is_dropped_and_reported: the body forwards non-empty, with no response_format, tool_choice or tools, and response_format appears in the lane's dropped controls. 1.5.5 source: crates/busbar/src/proto/anthropic/writer.rs:343-347. The map row is marked COVERED-at-1.5.5.
  • Row 109, legacy egress_dropped_controls_audit_tests.rs:146. Test codec/tests/drops_tests.rs::egress_dropped_controls_reports_the_right_controls_per_dialect, through the chat handle:
    • Anthropic default lane: ["response_format"]. That is 1.5.5; the legacy test expected [], pinning the forced tool.
    • Bedrock: ["response_format", "tool_choice=none"].
    • OpenAI: [].
    • Anthropic native lane: ["response_format"].

Tests only; not $.

…ni stop scan, candidates count, tool ids, transcription usage, Anthropic response_format)

- Responses: a translated stream stamped created_at 0 (1970); it stamps the host's wall clock
  again, as 1.5.5 stamped now_unix_secs() (v1.5.5 proto/openai_responses/writer.rs:479).
- Gemini/Cohere: the relay's stop-reason scan is structural (member at a container depth), so a
  model-written tool `args` object holding "finishReason":"MALFORMED_FUNCTION_CALL" no longer
  faults a shared lane.
- Gemini: candidatesTokenCount is the whole output again, with no thoughtsTokenCount
  (v1.5.5 proto/gemini/writer.rs:962-964); streamed tool ids after text count the text block as
  1.5.5 did (v1.5.5 proto/gemini/reader.rs:895), matching the buffered ids; a duration-billed
  transcription writes no invented usageMetadata.audioDurationSeconds (v1.5.5 handlers/gemini.rs:259-265).
- Anthropic: a lane without native structured outputs drops response_format again (v1.5.5
  proto/anthropic/writer.rs:343-347) instead of a synthetic forced tool that overwrote the
  caller's tool_choice and streamed back as a tool call.
Unit goldens resp_r2g_reasoning.json returns to its pre-971e2b6508 bytes.
…rted to their codec homes

Each legacy busbar-llm engine test is ported at equal strength (its literal figures) onto the
served codec path its F25 v2 row names: Bedrock tool_choice none forwards and reports the drop
(108); a native-structured-output Anthropic lane rides output_config.format and reports a
schema-less json_object (110); an Anthropic tool id reaches an OpenAI client remapped and unleaked
(350); the router shim keys strip per egress and the model survives strip-then-rewrite, with the
same-dialect relay sending the caller bytes (504, 505); the Cohere stop-sequence cap clamps six to
five and forwards five whole (613, 614).
…d on #857)

Row 107 (egress_dropped_controls_audit_tests.rs:26) pinned the post-1.5.5 synthetic
busbar_response_format forced tool; per ARCHITECT it is ported at 1.5.5: an OpenAI json_object onto
a default Anthropic lane forwards with no response_format, tool_choice or tools and reports the
dropped control response_format (v1.5.5 proto/anthropic/writer.rs:343-347). Row 109
(egress_dropped_controls_audit_tests.rs:146) ports the per-dialect dropped-control lists with the
Anthropic default lane at 1.5.5 (response_format), Bedrock response_format + tool_choice=none,
OpenAI none, and a native lane response_format.
…h sides appended tests at the same file ends; kept both
@MattJackson

Copy link
Copy Markdown
Collaborator Author

Rule 20 note from #1031 (row 155, draft): disjoint hunks in the gemini/responses writers (a per-stream translate_cap replaces the contract reader), proto_codec.rs (ProtocolWriter::set_translate_cap) and a few tests. A test merge is clean.

…onse_format drop in busbar-llm's audit tests, the tool-args stop test)

- gemini/handler.rs write_transcription_response: the single-arm `match` is an `if let`
  (clippy::single_match). It writes the same bytes.
- busbar-llm engine/tests/egress_dropped_controls_audit_tests.rs: the two tests that pinned the
  post-1.5.5 `busbar_response_format` forced tool now hold 1.5.5 (v1.5.5
  crates/busbar/src/proto/anthropic/writer.rs:343-347; ARCHITECT ruling 2026-10-13, F25 rows
  107/109, as #884 ports them).
  - openai_to_anthropic_response_format_forwards_dropped_and_audited: the default Anthropic lane
    forwards with no response_format, tool_choice or tools, and records the
    `response_format on anthropic` degraded audit event.
  - egress_dropped_controls_reports_the_right_controls_per_dialect: the default Anthropic lane
    reports ["response_format"].
- gemini tests a_finish_reason_inside_tool_args_is_not_the_stop_reason: the raw scan reads the
  candidate's own `STOP` (EndTurn), never the args' MALFORMED_FUNCTION_CALL (Error). The test had
  also compared it to read_response's stop reason, which promotes a tool-call STOP to ToolUse from
  the content; a token-only scan cannot see that, and the fault check does not need it. The test
  now asserts each side for what it is.
@MattJackson
MattJackson merged commit 3537d50 into predev Oct 15, 2026
1 check was pending
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant