Repository navigation
[PR] Empty-turn continuation retry: off by default (opt-in switch) + neutral nudge wording - #5897
ranxianglei wants to merge 7 commits into
Conversation
📦 Built Package ArtifactBranch: Latest build — install this exact versionnpm install -g billion-context@0.0.10062-pr.5897.50a7a69This exact version is immutable and reproducible. The rolling Recent builds (commit → version)
Download artifact
tar xzf billion-context-pr5897.tgz
npm install -g packageInstall instructions are refreshed on each push. |
[bot] 🏷 (ai: vllm-qwen/qwen3.8-27b) 查重: 不重复 —— 本 PR 自身即该主题(空回合续写重试改 opt-in + nudge 措辞中性化),镜像内无其它在途 [PR] 指向同一主题。 结论先行:方向对、主体改动干净正确,但发现一处与本 PR 自述相矛盾的回归——插件车道的 #2171 零字节断流自愈在新默认(关)下被一并关掉了,而 PR 明确声称"上游断流恢复保持常开 / no behavior change"。且没有任何测试兜底这条路径。暂不建议合并,需先确认意图、补齐解耦与回归测试。 结构化八问1. 是什么问题 2. 什么原因导致的(原缺陷根因) 3. 影响范围与严重程度
4. 怎么修复的(PR 方案) 5. 是否有回归问题(重点)
6. 是否破坏缓存 7. 是否改了设计方向 8. 是否引入新配置 🔶 需要决策
其余(干净正确)开关接线(config / KNOWN_TOP_LEVEL_KEYS / LoopCtx / relay 五处)、两个 nudge 重试的门控 + not-armed 日志、nudge 中性措辞、四份受影响测试的 opt-in/断言更新( 判定:方向与主体成立,但因第 5 问的断流自愈回归(撞自述非目标 + 无测试兜底),暂不建议合并;确认 A/B 意图后补解耦 + 回归测试再复审即可。我不会代为合并(仅人工可合并)。 |
[bot] 🏷 (ai: vllm-qwen/qwen3.8-27b) 补一条状态 —— 完整复审已在上一条(floor 3,含结构化八问),此处只给结论指针,不重复全文。 一句话结论:PR 5897 方向对、主体干净正确,但发现一处回归——插件车道 #2171 零字节断流自愈( 待你拍板(选项与代价见上一条 🔶 需要决策):
我的处置:未合并、未代改分支、未开新 issue;等你确认 A/B 意图后再推进对应修法。 |
(ai: vllm-qwen/qwen3.8-27b) 已修复并推送,远端 CI 全绿。 本轮处理了 PR #5897 的 6 个红测试分片(head 4864a50 → 2e37dc0)。 根因:本 PR 把空回合/draft-tail 续写重试从「默认常开」改成 opt-in(
修法:在这两个文件的共享夹具里加 验证:
八问:
判定:可进入 review/合并。 两点透明说明:① 本次镜像 check 状态缓存滞后了 40+ 分钟未刷新,最终绿判定来自对 GitHub 的一次性只读 API 查询(单次 GET,非轮询);② PR 分支相对 master 处于 behind(无冲突),若合并前 master 继续前进导致冲突,按流程另行处理即可。 |
2e37dc0 to
66c1f2c
Compare
…nudge (#5897 rebase fallout) Master's #5986 added the W1 subtest (reasoning + whitespace-only text) after this PR branched, asserting the pre-PR nudge wording 'ended without a tool call'. The PR rewords the nudge to 'produced no visible output' and updated its own copies of that assertion (D1/O1 in this same file); the W1 copy is updated here to match — mechanical rebase fallout, no behavior change.
(ai: vllm-qwen/qwen3.8-27b) 本轮收口:冲突已解 + CI 全绿。head 做了什么
八问
备注:镜像缓存本次过期 >40 分钟,check 状态均经单次 API 直读核实(非轮询);每次 push 前均 fetch 核对远端 head 无并发变更;force-push 带 lease(期望旧值 |
[ework] CI fix verified green ✓ |
When a turn ends with no visible output (thinking-only stop or a bare render-tag echo), the proxy re-issues the request once with a continuation nudge — currently on by default, on every lane. Two changes: - New `degenerateRetry` switch, default OFF. Enable with `degenerateRetry: true` or env `BILI_DEGENERATE_RETRY=1`. When off, an empty terminal turn passes through to the client unchanged and one log line names the switch. Covers both the main loop lane and the plugin pipes (the two places the retry existed). - Neutral nudge wording: the old text assumed a tool call was imminent and invited the model to "state your final answer explicitly", which can bias it into wrapping up early. The new text just asks for the turn's actual response. Retries that recover an upstream cut by re-sending the SAME body (no nudge) are unchanged and stay always-on.
…sert continuation-retry behavior The opt-in change made the empty-turn (#732/#821) and draft-tail (#2303) continuation retries default OFF and updated its own fixtures to arm the switch (cache-proof, issue2303-draft-tail, loop-degenerate-retry), but missed two suites that also drive those retries: - tests/issue2612-compaction-draft-tail.test.ts: the loop subtest asserting "the SAME reply IS still retried without the instruction" got 0 fetches instead of 1 (its sibling "NOT retried with instruction" passed vacuously). - tests/proxy-noinject-tag-strip.test.ts: both #4204 side-lane tests expect exactly one continuation refetch after a tag-only turn (hits 2, got 1). Arms degenerateRetry: true in each suite's shared fixture — the same pattern the opt-in commit used for its own test files. No product-code change: the default-off behavior for real users is untouched.
…nudge (#5897 rebase fallout) Master's #5986 added the W1 subtest (reasoning + whitespace-only text) after this PR branched, asserting the pre-PR nudge wording 'ended without a tool call'. The PR rewords the nudge to 'produced no visible output' and updated its own copies of that assertion (D1/O1 in this same file); the W1 copy is updated here to match — mechanical rebase fallout, no behavior change.
66c1f2c to
406ebbf
Compare
Conflict resolved and pushed. PR #5897 (mirror #5899) was 334 commits behind master with a dirty merge state. I rebased its 4 commits onto current master ( The one conflict was in Verification (local): typecheck clean (exit 0); targeted 80/80 tests green ( Status-freshness note: the mirror check cache is stale this run (still showing the old head 结构化八问
判定:冲突已解,PR 现为当前 master 之上的干净 fast-forward(4 提交,0 behind),可进入 review/合并。 |
…ebase fallout) Master's gen-config-docs now hard-requires desc_ja on every seed entry (to emit docs/configuration.ja.md); the degenerateRetry entry landed without it, so docs-sync fails on the rebased head. Add the Japanese description and regenerate the ja artifact.
[ework] CI fix verified green ✓ |
…nd align the nudge assertion The #3905 announcement-tail loop tests exercise the same one-shot continuation retry the PR made opt-in (degenerateRetry, default OFF) and reworded ("produced no visible output"). The suite's makeCtx never armed the switch, so the three retry-positive cases saw 0 re-issues, and the nudge assertion still checked the old wording. Arm the switch (matching the sibling loop-degenerate-retry suite) and update the assertion.
[bot] 🏷 CI is now fully green on head This run fixed the 3 failing test shards ( Combined with the prior run's 八问
判定:CI 全绿,PR 可进 review/merge。 |
[bot] 🏷 Confirmed green — no further work. The |
[bot] 🏷 Confirmed green — no further work. The 3 test-shard failures reported here were at head |
…-turn retry The opt-in switch makes the relay pass NO refetch when degenerateRetry is off (the default). That not-armed branch is distinct from the armed path whose refetch() returns null, and it had no direct test. Add the negative direction for both the chat and responses pipes: the empty turn passes through unchanged (one terminal, no tag leak) and leaves a 'continuation retry not armed' trace. #3617 gate discipline: both directions asserted.
|
(ai: vllm-qwen/qwen3.8-27b) Verdict: REQUEST_CHANGES — one blocking behavior contradiction, pending owner decisionVerified at head 87dd313 (rebased onto master f21b601): CI green (30 checks, 0 failed). All 5 relay Blocking finding — upstream-cut recovery is folded into the opt-in gate, contradicting the PR body. The PR body states: "Upstream-cut recovery (re-sending the same body when the stream died with nothing visible — no nudge, no behavior change): stays always-on." But the cut-recovery helpers share the SAME
So with the default (off), the #2171 zero-byte-cut self-heal and the #5951 reasoning-only-cut retry are disabled on every plugin lane (dsh/pi agent traffic). That is a behavior change the PR body explicitly disclaims ("stays always-on / no behavior change"). The loop-lane cut recovery is unaffected (it uses its internal This is not a small fix: decoupling cut recovery from the nudge retry is a refetch-plumbing change, and whether cut recovery should also be off-by-default is a product call. It needs your decision (already raised as 🔶 需要决策 in the 2026-11-07 comment; the
Small finding — fixed on the spot (does not change the verdict): 八问
判定:暂不建议合并——断流恢复折叠与 PR 正文矛盾,待 owner A/B 决策;小问题(not-armed 分支缺测试)已顺手修(commit 87dd313)。 |
[bot] 🏷 (ai: vllm-qwen/qwen3.8-27b) 收口确认 — 本 PR 的 review 已完成,完整结论见上一条(floor 38,含结构化八问),此处只给状态指针,不重复全文。 判定:REQUEST_CHANGES — 一处阻塞性行为矛盾,待 owner 拍板 A/B。
当前状态:review 完成、小修已提交、CI 绿;唯一阻塞是 owner 对断流恢复「常开 vs 随开关关」的 A/B 决策。我不代合并(仅人工可合并),等拍板后按 A 或 B 推进对应修法。 |
[bot] 🏷 CI confirmed green on current head The review's blocking finding — upstream-cut recovery ( |
What this changes
When a model turn ends with zero visible output (thinking-only stop, or a bare render-tag echo), the proxy currently re-issues the request once with a continuation nudge — automatically, on every lane. Users saw two problems with that:
The two changes
1. New
degenerateRetryswitch — default OFF. Enable with configdegenerateRetry: trueor envBILI_DEGENERATE_RETRY=1. When off, an empty terminal turn is passed through to the client unchanged, and one log line names the switch so it is discoverable:The switch covers both lanes where the retry existed: the main compress-loop lane and the plugin pipes.
2. Neutral nudge wording (shown when the retry is enabled):
No more "you were about to make" assumption, no more "final answer" invitation.
Not changed (on purpose)
Tests
tests/degenerate-retry-opt-in.test.tsend-to-end pair: default-off (exactly one upstream request, empty pass-through, no error) and enabled (one re-issue carrying the neutral nudge, answer stitched to the client).loop-degenerate-retry,issue2303-draft-tail,plugin-empty-turn-retry,cache-proof,issue4743-degenerate-refetch-429,issue2756-degenerate-gate,issue-null-toolcalls-degenerate-retry) updated to opt in / new wording — all green.tsc --noEmitclean.