fix: more flake (#18006)

Stabilizes the Responses API proxy header test by splitting the coverage
at the right boundary:
- Core integration test now verifies parent/subagent identity headers
directly from captured `/responses` requests.
- Proxy dump unit test now verifies those identity headers are preserved
in dumped request JSON.
- Removes the flaky real proxy process + temp-file dump polling path
from the core test.
This commit is contained in:
jif-oai
2026-04-16 10:01:45 +01:00
committed by GitHub
parent f97be7dfff
commit b0324f9f05
2 changed files with 92 additions and 222 deletions

View File

@@ -231,6 +231,12 @@ mod tests {
Header::from_bytes(&b"Cookie"[..], &b"user-session=secret"[..]).expect("cookie header"),
Header::from_bytes(&b"Content-Type"[..], &b"application/json"[..])
.expect("content-type header"),
Header::from_bytes(&b"x-codex-window-id"[..], &b"thread-1:0"[..])
.expect("window id header"),
Header::from_bytes(&b"x-codex-parent-thread-id"[..], &b"parent-thread-1"[..])
.expect("parent thread id header"),
Header::from_bytes(&b"x-openai-subagent"[..], &b"collab_spawn"[..])
.expect("subagent header"),
];
let exchange_dump = dumper
@@ -262,6 +268,18 @@ mod tests {
{
"name": "Content-Type",
"value": "application/json"
},
{
"name": "x-codex-window-id",
"value": "thread-1:0"
},
{
"name": "x-codex-parent-thread-id",
"value": "parent-thread-1"
},
{
"name": "x-openai-subagent",
"value": "collab_spawn"
}
],
"body": {