Skip to content

Expect Codex's plain-text form of a text-only tool result in the native function stream test - #147

Merged
SaladDay merged 1 commit into
mainfrom
codex/native-function-stream-test
Sep 26, 2026
Merged

SaladDay merged 1 commit into
mainfrom
codex/native-function-stream-test

Conversation

@SaladDay

@SaladDay SaladDay commented Sep 26, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

This is a test-only fix. TestNativePublicFunctionStreamHelper expected the model to receive the text-only setup tool result as a one-item array. Pinned Codex 0.153.4 deliberately turns a result made of exactly one input_text item into plain text (function_tool_response in codex-rs/core/src/tools/context.rs, asserted by Codex's own function_payloads_remain_function_outputs). Both forms are valid Responses input: the pinned SDK types function_call_output.output as a string or a list. Public history still keeps the array, and the test's SDK script checks that. The fake model server now expects the string, with a one-line comment explaining why.

Verification

  • Native run with the daemon built from the branch, pinned Codex 0.153.4 and the official SDK. It failed before the fix ("complete result changed: setup complete") and passes after it in 5.4 s. The other three native tests that use the fake model server also pass.
  • Full local server gate on dc7f5663: passed. The Playwright browser cases were skipped on the server (Chrome unavailable; approved skip). Main has since moved only by Show the command that connects a self-hosted executor host #143, a Web-only change that doesn't touch this file.
  • Review: self-review, because the change is test-only (2 lines).

View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith with what you need. Autofix is disabled.

…per test

Pinned Codex 0.153.4 sends a function result made of exactly one input_text
item as a plain string output (function_tool_response in
codex-rs/core/src/tools/context.rs, covered by its own tests). The daemon
forwards the submitted content items unchanged and public history keeps the
array, so only the synthetic model expectation changes.
@SaladDay
SaladDay merged commit 754de53 into main Sep 26, 2026
3 checks passed
@SaladDay
SaladDay deleted the codex/native-function-stream-test branch October 7, 2026 06:38
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