Skip to content

[PR] test(loop): pin faithful forwarding of model-emitted calls after acp_status continuation - #6544

Merged
ranxianglei merged 1 commit into
ranxianglei:masterfrom
sx4im:2026-11-13_phantom-read-forwarding
Nov 15, 2026
Merged

ranxianglei merged 1 commit into
ranxianglei:masterfrom
sx4im:2026-11-13_phantom-read-forwarding

Conversation

@sx4im

@sx4im sx4im commented Nov 13, 2026

Copy link
Copy Markdown
Contributor

Related to #5950.

The phantom Read in #5950 is model-emitted: the proxy forwards it byte-exact, and a text-only continuation carries no tool call at all. This PR pins that contract with a regression test so a future change cannot silently start filtering or fabricating calls in the continuation path.

What changed

  • tests/issue5950-phantom-read-forwarding.test.ts: mock-upstream replay of the incident turn (round 1 reasoning + acp_status, round 2 text-only vs Read). Both directions asserted: no call fabricated, model-emitted Read forwarded byte-exact and once, and the round-2 request body replays the acp_status pair with matching ids plus the round-1 reasoning.

How verified

This test documents the correct behavior; it does not fix the model-side hallucination behind #5950.

…status continuation

A mock upstream replays the ranxianglei#5950 turn shape: round 1 carries reasoning
plus the acp_status call, round 2 answers in text or emits the Read for
the nonexistent path. Both directions asserted, per the gate discipline
(ranxianglei#3617): a text-only round 2 reaches the client with no tool_call frame
(the proxy fabricates nothing), and a model-emitted Read reaches the
client byte-exact, once, with its id and arguments verbatim (the proxy
suppresses and rewrites nothing). The round-2 request body is asserted
too: the acp_status call/result pair replays with matching ids and the
round-1 reasoning intact.

Related to ranxianglei#5950. This test documents and locks in the correct behavior;
it does not fix the model-side hallucination behind the report.
@ranxianglei ranxianglei changed the title test(loop): pin faithful forwarding of model-emitted calls after acp_status continuation [PR] test(loop): pin faithful forwarding of model-emitted calls after acp_status continuation Nov 13, 2026
@ranxianglei

Copy link
Copy Markdown
Owner

🤖 Powered by ework · qwen3.8-27b

[bot] 🏷

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

Duplicate screening: Not a duplicate. This PR pins the faithful-forwarding contract for the acp_status server-side continuation path (related to #5950). The cited neighbors #4466 (adapter empty-tool_calls misclassification) and #2303 (draft-tail continuation retry) cover different layers; no existing test pins "the continuation path neither fabricates nor filters model-emitted tool calls." This fills a real gap.

Review verdict: A valid regression test with teeth. Verified:

CI status (important): The PR's CI is RED (5 test shards fail), but not because of this PR. All failures are in tests/notice-registry.test.ts — the visibleNotices test expects storage-sqlite-default in the visible notices, but src/notices.ts on master (and ci-fixes) does not define it. This is a pre-existing master-level test/code desync. The PR's new test file is green. I confirmed the failing test is unrelated to the added file.

Verdict: The test is correct and has teeth. It's a valid regression test that fills a real gap. Hold for merge until the master red (notice-registry) is cleared — it's not this PR's fault, and merging now would just inherit the red. The author can rebase onto a green master once the notice-registry desync is fixed.

8问 (for the human reviewer):

  1. 是什么问题: [Bug][scope/wiring] Phantom Read tool_call for a nonexistent path appears in the model response after server-side acp_status continuation | acp_status 服务端续写后,模型响应中出现无来源的幽灵 Read 工具调用(指向不存在路径) #5950 的幽灵 Read 是模型侧幻觉,proxy 只是忠实转发。本 PR 用一个回归测试把「续写路径不伪造、不吞没工具调用」这个契约钉死,防止未来改动悄悄破坏它。
  2. 什么原因导致的: 不涉及(测试 PR,非 bug 修复)。[Bug][scope/wiring] Phantom Read tool_call for a nonexistent path appears in the model response after server-side acp_status continuation | acp_status 服务端续写后,模型响应中出现无来源的幽灵 Read 工具调用(指向不存在路径) #5950 的根因在模型侧(模型在续写时无 reasoning 地发出了 Read),proxy 侧行为是正确的。
  3. 影响范围与严重程度: 纯增量(只加一个测试文件),不改任何生产代码。锁定的契约是:acp_status 服务端续写后,模型发出的工具调用必须逐字节转发、不重复、不重写;纯文本续写不得出现 tool_call 帧。
  4. 怎么修复的: mock upstream 重放事故轮(round 1 reasoning + acp_status,round 2 纯文本 vs Read),双向断言。round-2 请求体断言 acp_status 调用/结果对以匹配 id 重放、round-1 reasoning 完整保留。
  5. 是否有回归问题: 无。纯增量测试。本地 2/2 过、与邻居 OpenAI adapter drops all content when upstream sends an empty tool_calls array #4466/DSH native mode: assistant text ending with </summary> is treated as a completed step, so the turn silently stops (149 samples from session transcripts) #2303 共 19/19 过、typecheck 干净。
  6. 是否破坏缓存: 不涉及。
  7. 是否改了设计方向: 不涉及。
  8. 是否引入了新的配置: 不涉及。

CI 红说明: 5 个 test shard 红,全部来自 tests/notice-registry.test.ts 的 visibleNotices 用例(期望 storage-sqlite-default 在可见通知里,但 master 和 ci-fixes 的 src/notices.ts 都没定义它)——master 级测试/代码失步,与本 PR 无关。本 PR 新增的测试文件是绿的。

@ranxianglei
ranxianglei merged commit a827683 into ranxianglei:master Nov 15, 2026
43 of 48 checks passed
@ranxianglei

Copy link
Copy Markdown
Owner

Superseded by #6765 (merged to master as a827683).

Your commit 03c6915 is in master verbatim — same content, same authorship, only the object ID changed (the batch used a real git merge, no rebase or cherry-pick rewrite). Merged under a different branch name, so GitHub does not flip this PR by itself.

Thanks for the fix — it is live in master from a827683 onward.

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.

2 participants