Issue 069: Switchyard loses Responses refusal semantics - #25
Merged
Conversation
Checkpoint: defines buffered, streaming, control, and consumer-boundary evidence before implementation.
Checkpoint: records current-main and PR 623 buffered and streaming violations, same-dialect controls, consumer impact, and invariant replay coverage.
Checkpoint: updates the findings matrix, scoreboard, and generated repository counts.
Checkpoint: uses let-else for client JSON parsing without changing the invariant.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Finding
Claim
Switchyard loses the machine-readable OpenAI refusal type when translating an OpenAI Chat refusal to OpenAI Responses output, and pull request #623 preserves only the words as ordinary output text.
main7a23989cbe18f1c6c67ee03684ce76bd5901a27dand pull request #623 head2765f46972bf89a96beb5b2158b0fc56a3a72288, both reporting 0.2.0/v1/responses, buffered and streamingcaptured-modelopenai_chatbackend, passthrough route,max_retries=0Gate 1: correctness
Exact reproduction
refusalcontent part, or correlatedresponse.refusal.deltaandresponse.refusal.doneevents.output_textandresponse.output_text.delta.transcripts/069/switchyard-{main,pr623}-{responses,chat}-*.jsonl/v1/chat/completionsrequest Switchyard sent upstream./v1/chat/completionsto/v1/responseswhile keeping the same process, prompt, model, upstream path, and upstream refusal bytes.Control
message.refusalanddelta.refusalbyte-for-byte in 20/20 trials.False-positive checks
The reproducer checks a clean source tree, exact commit, reported version, compiler version, built binary SHA-256, exact translated request, exact canned upstream response, and monotonic exchange count before writing evidence. The upstream refusal shape is part of OpenAI's documented Chat schema and is independently present in pull request #623's live-provider evidence.
Gate 2: usefulness
Who gets bitten
message.refusalordelta.refusal; real-world refusal frequency was not measured.Observable consequence
Gate 3: upstream status
7a23989, pull request #6232765f46message.refusal,delta.refusal,response.refusal.delta,response.refusal.done,output_text,Responses refusal,refusalCHANGELOG.md, repository documentation, official OpenAI Chat and Responses referencesClassification:
Issue #622 and pull request #623 cover adjacent refusal-text loss on Chat to Anthropic output. No dedicated ticket or fix was found for Chat to Responses refusal typing. This PR freezes the separate type-loss defect, including the state after pull request #623.
Frozen invariant
issues/069-switchyard-responses-refusal/README.mdresponses_refusal_semantics_preservedValidation
python3 transcripts/069/reproduce.py ...on both pinned revisionscargo test --workspacecargo fmt --all -- --checkcargo clippy --workspace --all-targets -- -D warningspython3 tools/update-readme-counts.py --checkSecurity and scope
Author verdict
Independent review
Run
.github/agents/kairo-reproduction-reviewer.agent.mdagainst this pull request. Approval is blocked until the reviewer independently reruns the critical path and all three gates pass.Independent read-only rerun at stable commit
659d3ff: ACCEPT.discussed-no-ticketon 2026-09-05.