-
Notifications
You must be signed in to change notification settings - Fork 3.5k
v0.9.4: extract Responses dialect policy behind a conformance harness #5093
Copy link
Copy link
Open
Labels
agent-readySelf-contained for a fresh-clone cloud agent; implement in a tested PR with no live credentialsSelf-contained for a fresh-clone cloud agent; implement in a tested PR with no live credentialsenhancementNew feature or requestNew feature or requestreliabilityReliability, flaky behavior, retries, fallbacks, and robustnessReliability, flaky behavior, retries, fallbacks, and robustnessresponses-apiResponses API integration, streaming, or provider protocol issuesResponses API integration, streaming, or provider protocol issuestuiTerminal UI behavior, rendering, or interactionTerminal UI behavior, rendering, or interactionv0.9.4Targeting v0.9.4Targeting v0.9.4
Milestone
Description
Metadata
Metadata
Assignees
Labels
agent-readySelf-contained for a fresh-clone cloud agent; implement in a tested PR with no live credentialsSelf-contained for a fresh-clone cloud agent; implement in a tested PR with no live credentialsenhancementNew feature or requestNew feature or requestreliabilityReliability, flaky behavior, retries, fallbacks, and robustnessReliability, flaky behavior, retries, fallbacks, and robustnessresponses-apiResponses API integration, streaming, or provider protocol issuesResponses API integration, streaming, or provider protocol issuestuiTerminal UI behavior, rendering, or interactionTerminal UI behavior, rendering, or interactionv0.9.4Targeting v0.9.4Targeting v0.9.4
Projects
StatusShow more project fields
Backlog
Problem
The Responses bridge already covers substantial request construction, streaming, tool calls, and usage handling, but provider-specific branches are embedded in the adapter and exercised as individual cases. Adding custom Responses routes without a table-driven dialect contract would make regressions likely in tool loops, reasoning, caching, and normalized usage.
v0.9.4 needs a typed dialect-policy seam backed by deterministic conformance fixtures. Both built-in and custom Responses routes should share one normalized runtime contract while declaring their wire differences explicitly.
Current evidence
crates/tui/src/client/responses.rsowns Responses request construction, SSE event parsing, function-call assembly, and usage extraction.build_responses_body_for_providercurrently receives anApiProviderand contains provider-specific request branches.crates/tui/src/client.rs::prepare_outbound_requestis the shared no-I/O preparation seam used by execution and request preview.crates/tui/src/client/prepared.rsprovides a typed prepared-request boundary suitable for snapshot and contract tests.Scope
ResponsesDialectProfile(name may vary) that owns declared differences in:storeandincludebehaviorstoreandincludebehaviorTests must use loopback or in-process fixtures only; no live provider traffic.
Key files
crates/tui/src/client/responses.rscrates/tui/src/client.rscrates/tui/src/client/prepared.rscrates/tui/src/models.rscrates/tui/src/client/cost_status.rsAcceptance criteria
Verification
cargo fmt --all -- --checkcargo test -p codewhale-tui client::responsescargo test -p codewhale-tui client::preparedcargo test -p codewhale-tui cache_guardcargo clippy -p codewhale-tui --all-targets -- -D warningsOut of scope
Related
Triage note
Milestone: v0.9.4. This is the adapter-extraction and offline proof slice for the parent architecture issue.