fix(runtime): avoid OpenAI tool_search name collision - #3958
Conversation
|
I reviewed this PR at exact head Spec: NO-GO — 2×P1 + 1×P2
Other aspects (resolved-adapter gating for Standards: 2×P3 + 1 judgment-only P2
Title/branch conventions pass and the adapter boundary conforms to Other checks: What I did not check: full local suite beyond the checks noted. Gate: exact head has P1/P2 findings and therefore cannot be approved or merged until the alias bijectivity, prompt/projection, and regression-test issues are fixed and the template/AI disclosure is completed.
|
81d8946 to
84e3ee8
Compare
|
Thanks for the exact-head review. I addressed the in-scope findings in the updated head 84e3ee8: (1) maka_tool_search is now reserved at the Runtime catalog boundary, so the provider alias mapping remains bijective; (2) provider-facing system text and replayed text/tool result content are projected to the alias, while Runtime persistence/UI names remain ool_search; streamed provider tool calls and provider-executed results both map back to the internal name; (3) the regression now exercises the real @ai-sdk/openai Responses converter with openai-codex/gpt-5.6-sol and asserts the emitted wire body. I also restored the required PR template sections, selected substantive AI use, added the Generated-by: Codex trailer, and checked the test/format items. The PR is ready for a fresh exact-head review; there are no inline threads to resolve. |
|
The reviewed findings are now addressed in head 84e3ee8: alias collision is rejected at the Runtime catalog boundary; provider-facing system text, replayed text/tool results, repair callbacks, and streamed provider calls/results all use a consistent transport-only alias; and the regression uses the real @ai-sdk/openai Responses converter with the openai-codex/gpt-5.6-sol path. The required PR template, AI-use declaration, and Generated-by: Codex trailer are also present. CI will rerun for this head. There are no inline threads to resolve. |
84e3ee8 to
21e10bf
Compare
|
Follow-up after the review pass: head is now 21e10bf. I additionally made the text projection token-aware so an existing maka_tool_search string is not double-prefixed, and the real Responses wire test now covers that case. The provider-result mapping is exercised through the streamed provider-result path, and the alias reservation test prevents shadowing. Local affected tests: 20 passed; runtime build and Biome pass. |
Generated-by: Codex
21e10bf to
166204c
Compare
|
Rebased the completed fix onto current |
Summary
Fixes #3939
Maka's deferred-tool connector keeps the internal name
tool_search, but the provider-bound OpenAI Responses request uses the collision-free aliasmaka_tool_search. Provider-facing system text, replayed tool call/result names, repair callbacks, and streamed provider tool results are mapped consistently at the adapter boundary. The alias is reserved so a real tool cannot shadow it.Verification
npm --workspace @maka/core run buildnpm --workspace @maka/storage run buildnpm --workspace @maka/mcp run buildnpm --workspace @maka/computer-use run buildnpm --workspace @maka/runtime run buildnode --test "packages/runtime/dist/__tests__/deferred-tools-wire.test.js" "packages/runtime/dist/__tests__/responses-wire-contract.test.js"(20 passed)The Responses wire regression uses the real
openai-codex/gpt-5.6-soladapter and@ai-sdk/openaiconverter. It proves the historical{ activated: [...] }result is sent as a generic function output undermaka_tool_search, and that provider tool calls/results map back to Maka's internaltool_searchidentity.Review focus
The provider alias is a transport-only projection. Runtime persistence, UI copy, activation payloads, and existing history remain on the internal name. A real
maka_tool_searchtool is rejected at catalog construction to preserve bijective mapping.AI use
Select exactly one:
Tool(s) and scope: Codex authored the implementation, tests, and review follow-up; the human contributor reviewed the changes and owns the submission.
Checklist
Does this PR entail a change in behavior?