mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#4467
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Niko1221/Strata/pull/3126
Author: @ctr-137
Created: 10/19/2026
Status: ❌ Closed
Base:
main← Head:serve/undeclared-call-3075📝 Commits (4)
1926588test+guard: a call for a tool the request never offered stays text (#3075) - the content state scanned for a call without gating on the declared tools, unlike its reasoning-state twin, so a request that declared none answered with tool_calls and empty content. The answer side of that case had no test anywhere; six subtests now cover tools absent, tools: [] and tool_choice none, streamed and not. Two existing expectations (serve/test_mcp.py:329, serve/test_parser_call_scan.py:56) assert the opposite and are left as they are pending a decision - see the comment on the issue.3fed9b1test: the two tests that pinned the content state's old behaviour follow the #3075 rule - a call for a tool the request never offered is text, so serve/test_mcp.py now expects stop and the call as content, and serve/test_parser_call_scan.py declares a tool because it measures the structural walk, not the no-tools rule669c6a7serve: keep the tools-less pass-through for Codex's compaction, not for every request7eadedatest: pin the two tools-less corners the passthrough review named📊 Changes
6 files changed (+82 additions, -18 deletions)
View changed files
📝
serve/frontend.py(+8 -2)📝
serve/server.py(+15 -8)📝
serve/test_mcp.py(+2 -1)📝
serve/test_parser_call_scan.py(+2 -1)📝
serve/test_responses.py(+27 -6)📝
serve/test_server.py(+28 -0)📄 Description
What it changes
serve/frontend.py— the content state's call scan is gated on the declared tools (#3075), the way the reasoning-state scan already is: a request that declared nothing gets the call back as text, not astool_callswith an emptycontent.serve/frontend.py/serve/server.py— one explicit exception.OutputParser(passthrough=False)andService.run/_run(passthrough=False); the responses route sets it only whenprompt_tools()actually returned the conversation's kept tools (shown is not tools), i.e. the Codex compaction request, whose prompt is rendered with kept tools while the request declares none (responses.py:361-373). Every other tools-less request follows #804's rule.serve/test_server.py—ForcedToolChoice.test_a_call_the_request_never_offered_stays_text: after</think>the model writes a complete, well-formed call for a tool the request never offered, checked fortoolsabsent,tools: []andtool_choice: "none", streamed and not (6 subtests). On the unpatched tree all 6 fail.serve/test_mcp.pyandserve/test_parser_call_scan.py— the two expectations that encoded the old behaviour. The MCP test now expectsstopand the call as content; the re-scan test declares the tool it writes, because it measures the structural walk, not the no-tools rule.serve/test_responses.py— the compaction test keeps its with-metadata half unchanged: the calls still come back asfunction_callitems, with no namespace/custom shape. Its without-metadata half now asserts the text the new rule produces, because without the metadata it is a plain tools-less request.What it leaves alone
The second gap in #3075 — a call naming a function outside a declared set — is not touched. As measured on review, a name check in
_finish_callis too late (_scan()has already emittedtool_start), andname in self.schemaswould reject Codex's flatmcp__server__toolspelling, whichresponses.py:271maps throughnames. That needs its own change.Validation
servesuite on Windows 11 / Python 3.14.7, CPU only: 849 tests — 1 failure and 1 error, both baseline (test_keepawake'swait_forandtest_winjob'stasklistreturningNone; both fail the same way on unmodifiedmainhere).test_responses' thread count, which is order-dependent, was green in this run. Nothing else changed.[("function_call", "multi_agent_v1.spawn_agent", None), ("function_call", "apply_patch", None)].🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.