fix(proxy): protect exact Responses tool outputs during compression#1140
Open
ianks wants to merge 2 commits into
Open
fix(proxy): protect exact Responses tool outputs during compression#1140ianks wants to merge 2 commits into
ianks wants to merge 2 commits into
Conversation
Contributor
PR governanceThis PR does not yet satisfy the required template fields:
Please update the PR body, or move the PR back to draft while it is still in progress. |
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
JerrettDavis
requested changes
Jun 19, 2026
JerrettDavis
left a comment
Collaborator
There was a problem hiding this comment.
This PR is not merge-ready because CI is currently red: lint=FAILURE, commitlint=FAILURE. Please fix or rerun the failing checks after updating from current main.
Collaborator
|
Hi - can you help fix the conflicts for this? Thanks! |
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.
Description
Previously, the OpenAI Responses live-output compression path could compress exact file-tool outputs before applying Headroom's existing Read/Edit/Write-style exclusions. Responses output items only carry
call_id+output, so the compressor needs to resolve the originatingfunction_call.namebefore deciding whether an output is safe to rewrite.This patch builds a
call_id -> normalized tool namemap for Responses input items and protects exactness-sensitive outputs (read,edit,write,glob,grep, including namespaced names likefunctions.read). Other tool outputs, such as shell/build logs, still flow through the existing compression path.Type of Change
Changes Made
function_call.call_idback to tool names.function_call_outputitems before they enter the router.Testing
pytest)ruff check .)mypy headroom)Test Output
Real Behavior Proof
functions.readoutput and ashelloutput. The router compression function is patched to rewrite any output it receives.functions.readoutput remains byte-identical, while theshelloutput is passed to compression and rewritten.Review Readiness
Checklist
Screenshots (if applicable)
N/A
Additional Notes
No docs update; this is a small proxy bug fix. Changelog not updated.