Skip to content

[PR] fix: recognize tool_search pairs and drop orphan tool outputs at the Responses wire boundary - #5675

Open
ranxianglei wants to merge 2 commits into
masterfrom
2026-11-04_tool-search-pair-orphan-guard
Open

ranxianglei wants to merge 2 commits into
masterfrom
2026-11-04_tool-search-pair-orphan-guard

Conversation

@ranxianglei

@ranxianglei ranxianglei commented Nov 4, 2026 •

Copy link
Copy Markdown
Owner

Closes #5670

What

Codex 0.166 emits tool_search_call / tool_search_output item pairs (OpenAI tool-search feature) that src/tool-pair-order.ts did not know, so neither wire-boundary guarantee applied to them. A compression round that dropped a call while keeping its output then produced an unshippable request: strict backends (DeepSeek via Magpie) answer 400 No tool call found for tool output <id> on every later turn, and the session is stuck on that model until restart. The mirror damage is equally fatal: a round that drops the output while keeping its call yields 400 No tool output found for tool call <id> (#766's string) — no reordering saves it either, so an abandoned mid-history call is completed with an honest synthesized lost-output result instead of being shipped broken.

Changes

  1. Pair registration — tool_search_call/tool_search_output added to CALL_TYPES/OUTPUT_TYPES; the [BUG] No tool output found for tool call call_xxxx #766 hoist guarantee now covers the family.
  2. Fail-closed orphan drop — new dropOrphanToolOutputs(), integrated as the first stage of hoistTrappedToolItems: an output whose call_id matches no call in the outbound array is dropped and logged (warn). All four call sites (prepare-responses.ts:417/:787, compress-loop-responses.ts:215, adapter-responses.ts:337) inherit it with zero changes. Outputs with a missing/empty call_id are kept (unjudgeable — dropping would lose data we cannot prove orphaned).
  3. Fail-closed orphan completion (I1 direction) — new completeOrphanToolCalls(), the second stage: a call BEFORE the trailing run whose call_id matches no surviving output was abandoned mid-history by compression; its pairing is completed with a family-matched synthesized lost-output result inserted right after the call (function_call_output/custom_tool_call_output carry "tool output lost during context compression"; an orphan tool_search_call gets a minimal empty tool_search_output). In-flight calls in the trailing {call, reasoning} suffix are exempt; no-op (same array reference) when every call has a surviving output.
  4. Wire-constraint ledger ([CI/testing] wire-contract anti-regression system: validation-parity fake upstreams + golden schema snapshots + constraint ledger + staged 4-protocol x 3-mode client smoke matrix #1304) — WC-026 (orphan-output drop) + WC-027 (orphan-call completion) entries + responses-fake validator clauses + self-check probes (WC-023/024/025 are already taken by Anthropic 400: mid-conversation system must FOLLOW a user message — heal only checks the follower, and trailing nudge/notes land after a trailing system #5432/Violates Anthropic's constraint that "preserved thinking must be replayed verbatim." | 违反了 Anthropic「preserved thinking 必须原样重放」的约束 #5998/OpenAI wire: ACP ref tags + leading system are injected into every /chat/completions, breaking non-conversational side calls (TTS 400 "messages[0] system role is not allowed for TTS model") #6636, hence the renumber).
  5. In-passing cleanup (separate labeled commit): unused hoistTrappedToolItems import removed from src/server.ts:104.

Behavior changes (old -> new)

behavior old new why
item wedged between a tool_search call and its output passed through untouched hoisted before the earliest call (as every other pair family) the #766 guarantee applies to all registered families
orphan output (any family) in outbound input shipped as-is -> guaranteed 400 on strict backends, turn unrecoverable dropped + warn log fail closed at the wire boundary; the request was already doomed
orphan call (any family) before the trailing run, its output dropped shipped as-is -> guaranteed 400 No tool output found for tool call <id> (#766's string), turn unrecoverable completed with a synthesized family-matched lost-output result right after the call + warn log mirror of the orphan-output case — one compression bug yields two unshippable shapes; the model sees the loss explicitly instead of re-issuing the call blind; in-flight trailing-run calls are exempt
healthy input (every output paired) byte-stable byte-stable (same array reference) unchanged — prefix-cache stable
interleaved parallel groups callA, callB, outA, outB untouched untouched (deliberate) #5670 payload experiments: DeepSeek answers 200 for interleaved shapes — regrouping would rewrite a healthy prefix for nothing

Tests

  • tests/tool-pair-order.test.ts: +16 cases (pair registration, orphan drop across families, orphan-call completion / I1 direction, negatives: orphan CALLS kept / missing-call_id kept / same-reference byte-stability / interleaving left alone); assertNoTrap extended to the tool_search family.
  • targeted local runs: tool-pair-order green (10 -> 26 cases), wire-contract 22/22 (incl. ledger self-check with the WC-026/WC-027 probes), e2e-responses-offhead-system + issue1733-config-update 7/7, typecheck clean. Full-suite verdict = remote CI.

@ranxianglei ranxianglei changed the title fix: recognize tool_search pairs and drop orphan tool outputs at the Responses wire boundary [PR] fix: recognize tool_search pairs and drop orphan tool outputs at the Responses wire boundary Nov 4, 2026
@ranxianglei
ranxianglei force-pushed the 2026-11-04_tool-search-pair-orphan-guard branch from e224118 to dbfb31c Compare November 4, 2026 11:46
@github-actions

github-actions Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

📦 Built Package Artifact

Branch: 2026-11-04_tool-search-pair-orphan-guard (d61520e)

Latest build — install this exact version

npm install -g billion-context@0.0.10994-pr.5675.170656c

This exact version is immutable and reproducible. The rolling pr tag tracks the newest test build across all PRs.

Recent builds (commit → version)

commit version build
d61520e billion-context@0.0.10994-pr.5675.170656c build
93fe27c billion-context@0.0.8148-pr.5675.1aceac5 build
c12aca9 billion-context@0.0.8145-pr.5675.68a8596 build
75f2db4 billion-context@0.0.8143-pr.5675.6514086 build
b10ab60 billion-context@0.0.8142-pr.5675.45d96d1 build
dbfb31c billion-context@0.0.8141-pr.5675.0927dd5 build

Download artifact

  1. Download the artifact from the Actions run
  2. Extract the tarball and install:
tar xzf billion-context-pr5675.tgz
npm install -g package

Install instructions are refreshed on each push.

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

(ai: vllm-qwen/qwen3.8-27b)

查重:不重复。 检索了 open+closed 的 issue 与 PR(tool_search / orphan tool output / Responses wire boundary)均无同类修复;master 上此前既无 dropOrphanToolOutputs,src/tool-pair-order.ts 的 CALL/OUTPUT 集合也不含 tool_search_* —— 本 PR 的机制是新的,不是对已合入修复的重做。

结论先行

方向正确、修法到位,可合。审核中我修掉了一个它自己带进来的隐患(wire 规则编号撞车),已作为独立小提交推回分支;本地定向测试与 typecheck 全绿,远端 CI 在跑(暂无失败)。

结构化八问

  1. 是什么问题:Codex 0.166 会发 tool_search_call/tool_search_output 配对,而 src/tool-pair-order.ts 不认识这对类型;一旦某轮压缩把 call 丢了却留着 output,出站就带着一个「孤儿 output」,严格后端(DeepSeek/Magpie)对整个请求回 400 No tool call found for tool output <id>,此后每轮都失败,会话在该模型上卡死直到重启。
  2. 什么原因导致:两层根因叠加——(a) tool_search_* 不在 CALL_TYPES/OUTPUT_TYPES,所以 [BUG] No tool output found for tool call call_xxxx #766 的 hoist 保证和任何边界保护都不覆盖这一族;(b) 边界上对「call 已被丢弃的孤儿 output」没有 fail-closed 处理,原样放行。
  3. 影响范围与严重程度:触发面窄但命中即重伤——需同时满足 Codex 0.166+ 产生 tool_search 对、压缩恰好丢掉其 call、且走严格 Responses 后端。命中后果是当轮不可恢复、必须重启宿主才能继续(可用性缺陷,属高严重度)。
  4. 怎么修的:把 tool_search 族登记进 CALL/OUTPUT 集合,并在 hoistTrappedToolItems 首级新增 dropOrphanToolOutputs——非空 call_id 匹配不到任何 call 的 output 就地丢弃并 warn;空/缺失 call_id 的保留(无法判定,丢会损失数据);健康输入返回同一数组引用(前缀缓存字节稳定)。四个调用点零改动继承。
  5. 回归审查:逐项核对了既有行为——健康输入同引用不变(缓存稳定保住)、交错并行组 callA,callB,outA,outB 刻意不动、孤儿 CALL 保留、[BUG] No tool output found for tool call call_xxxx #766 对既有族行为不变只是扩到新一族。发现并修掉一个真实缺陷:本 PR 新增的 wire 规则用了 WC-023,而 Anthropic 400: mid-conversation system must FOLLOW a user message — heal only checks the follower, and trailing nudge/notes land after a trailing system #5432 的系统消息定位规则已占用 WC-023(本 PR 基线早于其合入),rebase 后两条规则同号。已把新规则改为 WC-024(下一个空号),未动 Anthropic 400: mid-conversation system must FOLLOW a user message — heal only checks the follower, and trailing nudge/notes land after a trailing system #5432 的任何引用。
  6. 是否破坏缓存:否。健康路径返回同一数组引用(字节稳定);只丢弃本就发不出去的孤儿 output,不影响健康前缀的缓存。
  7. 是否改设计方向:否。沿用既有 wire 边界修复机制,扩到新家族并加一级 fail-closed,数据流不变。
  8. 是否引入新配置:无新增 env/config/默认值。

审核中我做的手动改动(已在分支上,独立标注提交)

CI(读镜像缓存)

当前 head b10ab6021,mergeable=blocked(等 CI)。static-gates / gate / mysql-contract 已绿,各 test 分片 in_progress,summary:failed 0 / pending 11。分片跑完即可合。

顺带发现(不阻塞本 PR,未另开 issue)

wire 约束账本里早已存在与本 PR 无关的重复编号:WC-013 出现两次(都在 responses 线,tests/wire-contract-fakes.ts:107 与 :200)、WC-016 出现两次(:92 与 :241)。自检按 startsWith(id) 匹配违规串,所以这些重复对 CI 不可见。这里只做提示,不在本 PR 范围内改(改既有规则编号会牵动大量引用,风险超出本次)。

行为变更披露(确认 PR 描述已如实列明)

  • 夹在 tool_search call/output 之间的项:原样透传 → 现被 hoist 到最早 call 之前([BUG] No tool output found for tool call call_xxxx #766 保证覆盖全部已注册族)。
  • 孤儿 output(任意族):原样发出→严格后端必 400、该轮不可恢复 → 现丢弃 + warn(fail-closed,请求本已注定失败)。
  • 健康输入:字节稳定(同引用)不变。
  • 交错并行组:刻意不动(实测 DeepSeek 对这些形状回 200,重排只会白改健康前缀)。

收工判定:可合。 逻辑正确、回归已审、缓存不受影响、无新配置;CI 分片跑完转绿即可由你合并(合并权在你)。

@ranxianglei

Copy link
Copy Markdown
Owner Author

(ai: vllm-qwen/qwen3.8-27b)

APPROVE — reviewed head 93fe27c (incl. the last commit aligning the synthesized tool_search_output to real Codex traffic via status:"completed"). Correct, well-tested, no regression.

八问

  1. 是什么问题:Codex 0.166 新增的 tool_search_call/tool_search_output 工具对,bili 在 Responses 线边界(src/tool-pair-order.ts)的配对保护不认识;更要命的是压缩若把一对工具「只删一半」(留输出丢调用 / 留调用丢输出),就会发出严格后端必然 400 的请求,此后每轮都 400、会话卡死到重启。
  2. 什么原因导致:CALL_TYPES/OUTPUT_TYPES 早于 tool_search 家族定型,[BUG] No tool output found for tool call call_xxxx #766 的 hoist 保证对这一族静默失效;且线边界对「配对被拆一半」这种形状没有任何 fail-closed 兜底——这种请求重排也救不回,只能整包 400。
  3. 影响范围与严重程度:走 bili→严格 Responses 后端(如 DeepSeek via Magpie)的 Codex 0.166(tool_search)用户;触发条件=某轮压缩恰好丢掉某对工具的一半。严重度高——该模型上每轮 400、会话不可恢复直到重启/换模(可用性损失)。非 tool_search 流量行为不变。
  4. 怎么修的:①tool_search 两型入集([BUG] No tool output found for tool call call_xxxx #766 hoist 覆盖到该族);②hoistTrappedToolItems 前置两道 fail-closed——dropOrphanToolOutputs(输出找不到对应调用→丢弃 + warn)、completeOrphanToolCalls(尾部运行段之前、无存活输出的调用→就地补一个按族匹配的「丢失结果」合成项 + warn)。两者对健康输入都是同引用 no-op,在飞(trailing run)的调用豁免。
  5. 回归:逐条清点既有行为——hoist 主逻辑未动;所有「原本可发」的输入字节不变(两个新函数只在「原本必 400」的输入上触发,由同引用测试钉死);交错并行组刻意不动(依据见下);WC-023 已被 Anthropic 400: mid-conversation system must FOLLOW a user message — heal only checks the follower, and trailing nudge/notes land after a trailing system #5432 占用,重编号为 WC-024/WC-025 避开冲突。高危模式(fail-fast 变吞错 / 阈值·时序·输出格式漂移)逐项过:无。一个刻意的范围决定:issue 提到的第二种形状——纯交错并行组 callA,callB,outA,outB(配对都在、只是交错)——本 PR 不重组,依据是作者对真实 payload 的实测(DeepSeek 对交错形状回 200),重组反而会改写健康前缀、伤缓存;已用一条测试钉住该决定。若将来出现确实拒绝交错的严格后端,那是独立的后续项,不阻塞本修复。
  6. 是否破坏缓存:否。健康输入返回同一数组引用(prefix-cache 稳定),仅被破坏的请求才被改写,而那些请求本就没有有效缓存。
  7. 设计方向:未转向。沿用既有 [BUG] No tool output found for tool call call_xxxx #766 线边界保证 + [CI/testing] wire-contract anti-regression system: validation-parity fake upstreams + golden schema snapshots + constraint ledger + staged 4-protocol x 3-mode client smoke matrix #1304 线约束账本,把保证扩到新家族并在同一边界补 fail-closed。
  8. 新配置:无新增 env/config/默认值,纯代码修复。

测试有效性:tests/tool-pair-order.test.ts 10→26 例,断言有牙(字节稳定的同引用 strictEqual、形状 deepEqual、用 issue 里的真实 call_id);wire-contract 新增 WC-024/WC-025 账本条目 + responses-fake 校验子句 + 自检探针,校验逻辑与两个修复函数逐条镜像,探针能咬住违规。

已顺手修:PR 正文漏描述了 I1 方向(commit c12aca9b0 加的 completeOrphanToolCalls)——What/Changes/行为表三处都没提,Changes 误写 WC-023,Tests 段 +9 cases/19/19 已过时。已用 API 补齐正文(I1 三处 + WC-024/WC-025 + +16 cases),属元数据修订、非分支提交。

CI:镜像快照时部分 test 分片仍在跑(0 failed),全量绿以远端 CI 为准。

判定:可合。


说明:GitHub 的正式 review 接口禁止对「自己账号提交的 PR」投 APPROVE(本 PR 作者与审核 token 同为 ranxianglei),故审核结论以本评论形式给出,供人工合并时参考。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

(ai: vllm-qwen/qwen3.8-27b) 审核已完成,结论见上一条(APPROVE / 可合),PR 正文已顺手补齐(I1 方向 + WC-024/WC-025 + 用例计数)。合并为人工动作,我这边无待办。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

(ai: vllm-qwen/qwen3.8-27b)

CI 车道收工:冲突已解、红 shard 已修,最终 head 全绿,等人工 review/merge。

本次做了什么

① 冲突解决(第一轮):分支基于旧 master(5594c13,rebase 前落后 #5629/#5491 合入)。rebase 到 master 后唯一冲突在 src/server.ts 导入块——master 新增了一批导入(paths/instance/served-markers/storage/port-owner/liveness 等),与 PR 删除的 hoistTrappedToolItems 导入行相邻。按 union-of-intent 解决:保留 master 全部新导入,只去掉确认无引用的 hoistTrappedToolItems(该文件内 grep 计数 0;四个真实调用方各自独立导入)。推送 dbfb31c。

② 三个红 shard 诊断(第二轮):test (ubuntu 22/24, 2) + test (windows 22, 2) 同签名失败 = tests/responses-tool-images.test.ts:86「Responses rebuild patches tool text without losing images…」,跨平台确定性复现(本地 1/7 挂)。根因:本 PR 自致、非继承——#5670 新增的孤儿 output 丢弃(dropOrphanToolOutputs)生效后,该测试的最小 fixture「只有 output、没有对应 call」恰好就是会被丢弃的形状,buildRequest 断言必挂。我核过:丢弃行为是 PR 有意设计且被其自己的测试钉死(tool-pair-order.test.ts「short-array path still drops a lone orphan output」),四个生产调用点传的都是完整历史数组,孤儿判定无误伤面——所以改的是测试而非机制。

③ 修复(commit 75f2db4,test-only):把 buildRequest 子用例换成配对的 call+output fixture(两种 wire 形态各配对的 call 类型),让断言在良构对上验证「重建不丢图片/元数据/折叠行为」;原有全部断言(含 folded-not-resurrected、imageOnly 子例)逐字未动。本地定向 49/49 + typecheck 绿后推送。#4599 已留一行结论。

④ 并行披露:修复期间作者连推三笔(WC-023→WC-024 重编号 b10ab60、孤儿 call 补合成 lost-output 结果 c12aca9、tool_search_output 对齐真实 Codex 流量 93fe27c),我的修复 commit 都在其中,未冲突。

八问

  1. 是什么问题:PR 与 master 有合并冲突;解完冲突后 3 个测试分片确定性红(同一个测试)。
  2. 什么原因导致的:冲突 = master 同期在同一导入块加了新导入;红 = 既有测试的最小 fixture 落后于 tool_search_call / tool_search_output missing from tool-pair ordering -> upstream 400 "No tool call found for tool output" (Codex 0.166 + DeepSeek) #5670 有意的契约变更(孤儿 output 现在会被丢弃),不是机制 bug。
  3. 影响范围与严重程度:仅本 PR 的 CI 信号;我的改动是 test-only,零用户可见行为变化。
  4. 怎么修复的:冲突按 union-of-intent rebase;测试子用例改为良构工具对,断言语义不变。
  5. 是否有回归问题:审过——src 侧零改动(我这边);hoist/drop 语义与其钉死的正负用例全部通过;该文件其余断言逐字保留且绿;无阈值/时序/输出格式漂移。
  6. 是否破坏缓存:不涉及(测试代码,线上字节不变)。
  7. 是否改了设计方向:没有——沿用 PR 已钉死的 fail-closed 方向,作者后续 I1 扩展我也未触碰。
  8. 是否引入新配置:没有。

判定:head 93fe27c 上 30 项 check 全部完成(14 success + 16 按设计 skip 的门控 e2e 车道,0 failed),mergeable=true 无冲突;mergeable_state=blocked 是 branch protection 等人工审批——可进入人工 review/merge。

ci-check added 2 commits November 19, 2026 20:59
Rebase the #5670 branch onto master (6453fee, v0.1.216) and re-land the full fix as one coherent change:

- src/tool-pair-order.ts: register tool_search_call/tool_search_output in the pair sets; dropOrphanToolOutputs drops outputs whose call_id matches no call in the array; completeOrphanToolCalls synthesizes an honest lost-output result for mid-history calls whose output was dropped (trailing-run exemption keeps in-flight batches untouched); both run inside hoistTrappedToolItems, so all four wire-boundary call sites are covered without call-site changes.
- tests/tool-pair-order.test.ts: 26 cases covering both directions, trailing-run negatives, family shapes (tool_search synth carries status:"completed" per real Codex traffic), and same-reference identity on healthy input.
- tests/wire-contract-fakes.ts / tests/wire-contract.test.ts: ledger entries + validator clauses + probes for both directions. The rules landed as WC-023/WC-024 on the feature branch; master's #5432, #5998 and #6636 took WC-023/WC-024/WC-025 first, so they renumber to WC-026 (orphan output) / WC-027 (orphan call) on this rebase.
- src/server.ts: drop the unused hoistTrappedToolItems import.
- tests/responses-tool-images.test.ts: rebuild the adapter assertion on a well-formed tool pair (master's c31fd99 overlap-sweep rewrite of hoistTrappedToolItems is kept; the two new stages run before it on pair-clean input).

Supersedes the pre-rebase commits (7772d05, e224118, c12aca9, 93fe27c) which are no longer ancestors of this branch.

Closes #5670
2026-11-19, Codex Desktop behind a Responses gateway (provider unstated): HTTP 400 'No tool call found for tool search output with call_id <redacted>' — the same constraint with the item type name interpolated into the message. Corroborates the shape; the historical 400 was not captured at its exact failing boundary, so this does not verify this branch or locate the historical loss.
@ranxianglei
ranxianglei force-pushed the 2026-11-04_tool-search-pair-orphan-guard branch from 93fe27c to d61520e Compare November 19, 2026 13:25
@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[bot] 🏷 (ai: vllm-qwen/qwen3.8-27b)

Re-review of rebased head d61520e52 — APPROVE / 可合

The branch was rebased onto current master (6453feeeb84) and re-landed as two commits: the orphan-tool guard fix (742d9921e88, now ledger rules WC-026/WC-027) plus a provenance docs commit (d61520e52). I re-verified the rebase end-to-end rather than trusting the prior head:

已顺手修:PR body 仍引用 rebase 前的 ledger 号(WC-024/WC-025)和过时的 "WC-023 taken by #5432" 说明 → 已改为 WC-026/WC-027 + "WC-023/024/025 taken by #5432/#5998/#6636"(PR body 元数据 PATCH,HTTP 200,非分支 commit,无 commit hash)。

Two observations, neither blocks this PR:

  • Pre-existing master ledger collision (not this PR's): two unrelated rules both carry id WC-025 — OpenAI wire: ACP ref tags + leading system are injected into every /chat/completions, breaking non-conversational side calls (TTS 400 "messages[0] system role is not allowed for TTS model") #6636's TTS rule and the Huawei SDK-HMAC rule (tests/wire-contract-fakes.ts:226 & :272). The "every rule has a live enforcement clause" self-check passes for both (each matches a WC-025… clause), so it's latent, but the ledger's unique-id invariant is broken. Fixing it is a cross-file renumber (the id is referenced in tests/apig-resign.test.ts, tests/wire-contract.test.ts, and 8+ validator clauses) → out of this PR's scope, not fixed here.
  • CI: the review-lane dispatch reports the PR green; the mirror-cache snapshot I read (fetched 14:08Z) showed the check runs in a skipped state on head d61520e52 with mergeable_state: blocked (awaiting review). Since a rebase force-push invalidates prior runs, it's worth a quick confirm that the test lane actually ran green on the rebased head before merge.

8问

  1. 是什么问题:Codex 0.166 新增的 tool_search_call/tool_search_output 配对不在 Responses 线边界的识别集里;压缩若丢了一侧(留孤儿 output 或留孤儿 call),严格后端整请求 400、会话卡死到重启。
  2. 什么原因导致的:根因是 src/tool-pair-order.ts 的 CALL_TYPES/OUTPUT_TYPES 只认 function/custom_tool 两类,tool_search 完全不在网内——既不被配对保护、也不被孤儿兜底;压缩丢一侧后没有任何机制把不可发的形状拦在出站前。
  3. 影响范围与严重程度:仅 Responses 线 + 出现 tool_search 配对 + 压缩恰好丢一侧时触发;触发即整会话在该模型上不可用(400 循环)直到重启,属 p1 级可用性缺陷,但触发条件较窄。
  4. 怎么修复的:出站前 fail-closed 双向兜底——孤儿 output(无匹配 call)直接丢弃并 warn;mid-history 孤儿 call(无匹配 output,且不在尾部在途段)补一条诚实的"合成丢失结果"再发;两者对健康输入都是同引用 no-op,只在必然 400 的形状上动手。
  5. 是否有回归问题:无。两个新函数对所有"此前可发"的输入都是 no-op(同数组引用、字节稳定);只在必然 400 的输入上改变行为(把不可发变可发)。rebase 后与 master 的分组 hoist 重构正交组合,4 个调用点全部走统一入口。
  6. 是否破坏缓存:不破坏。健康路径零改动、同引用返回;只有原本就发不出去的请求才被改写,不存在"改坏健康前缀"。
  7. 是否改了设计方向:没有。仍是"线边界 fail-closed + 健康输入字节稳定"的既有方向,只是把 tool_search 纳入同一机制,并补上镜像方向(孤儿 call)。
  8. 是否引入了新的配置:无。纯线边界行为,无新 env/config/默认值。

判定:APPROVE / 可合(代码层面)。合并仍由人工执行;合并前请确认 rebase 后 test lane 在 d61520e52 上真跑过绿。

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

tool_search_call / tool_search_output missing from tool-pair ordering -> upstream 400 "No tool call found for tool output" (Codex 0.166 + DeepSeek)

1 participant