Skip to content

[PR] fix(kernel): keep compress pair visible when its predecessor is signed thinking - #5877

Open
ranxianglei wants to merge 4 commits into
masterfrom
2026-11-07_fix-signed-thinking-strand-on-compress-hide
Open

ranxianglei wants to merge 4 commits into
masterfrom
2026-11-07_fix-signed-thinking-strand-on-compress-hide

Conversation

@ranxianglei

@ranxianglei ranxianglei commented Nov 7, 2026 •

Copy link
Copy Markdown
Owner

Summary

Fixes #5864 — Anthropic rejects bili's outbound request with 400 messages.N: The final block in an assistant message cannot be thinking. right after a compress call whose assistant turn also carried a thinking block before the tool_use ([thinking, tool_use:mcp__bili__compress]).

Root cause

Two independent decisions about the SAME assistant turn were each locally correct but jointly illegal:

  1. planReasoningDrop (src/server.ts) returns an empty drop-set whenever ANY signed thinking block is in view ([bug] dropCompressReasoning (#651) strips inbound thinking from compress tool_use on Anthropic wire, triggering thinking-pair-violated warning (#684) #1658/[acp-loop] In-turn compress re-request edits the latest assistant message → Anthropic 400 "thinking blocks … cannot be modified" (session stays broken) #1960 doctrine: signed Anthropic thinking must round-trip with its tool_use sibling and can never be dropped). So the pre-compress reasoning survives.
  2. The kernel's hideConsumedCompressCalls removes an inactive compress call+result pair independently of what precedes it.

When both fire together the pair is hidden but the signed thinking block stays, collapsing the assistant message to [thinking] → upstream 400. On the Anthropic wire every extended-thinking block is signed, so this only bites on extended-thinking sessions where a fold boundary lands right after a [thinking, compress] turn (why only 5 of 27 such turns failed).

Fix

Add an optional host-injected predicate strandedProtectedPredecessor to the kernel Config (a function-typed port, uninterpreted by verif exactly like the existing isCompressTool). In hideConsumedCompressCalls, when the assistant-message run containing a would-be-hidden compress pair still holds a protected core — a signed thinking or redacted_thinking block anywhere earlier in that same run (an intervening text/tool core between the thinking and the call is common) — keep the pair visible instead of hiding it, so the signed block always round-trips with a tool_use sibling (#684 invariant). A run is the consecutive assistant-role cores that coreToAnthropic renders as one assistant message; the scan stops at the first non-assistant core. Wired to a signed-thinking check in src/config.ts (twin of hasSignedThinkingBlock). Unset predicate ⇒ byte-identical behavior, so non-Anthropic wires and other hosts are unaffected.

Behavior change (intentional)

  • Old: an inactive compress call+result pair was always hidden by hideConsumedCompressCalls, even when doing so stranded a signed thinking block as a thinking-final message (→ upstream 400).
  • New: such a pair is kept visible while its assistant-message run still holds a signed thinking / redacted_thinking block. Cost: one small compress tool_use+tool_result stays in the forwarded history on those turns instead of being removed — bounded, and far cheaper than a lost turn + 400. Once no protected block remains in the run (folded out / shifted across the run boundary) the pair hides normally again. (After review this supersedes the earlier immediate-predecessor-only form: [thinking, text, compress] also strands the sibling, so the guard scans the whole run.)

Tests

kernel-change: add optional strandedProtectedPredecessor host port to hideConsumedCompressCalls so a consumed compress pair is never hidden in a way that strands a signed thinking block as a thinking-final assistant message (upstream 400, #5864). Host-side cannot solve it: the pair-hiding happens inside the kernel processTurn, and dropping/relocating the signed thinking block is forbidden by the #1960 signature doctrine.

Fixes #5864

@ranxianglei ranxianglei changed the title fix(kernel): keep compress pair visible when its predecessor is signed thinking [PR] fix(kernel): keep compress pair visible when its predecessor is signed thinking Nov 7, 2026
@ranxianglei
ranxianglei force-pushed the 2026-11-07_fix-signed-thinking-strand-on-compress-hide branch from 4a52053 to ac33b42 Compare November 7, 2026 12:05
@github-actions

github-actions Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

📦 Built Package Artifact

Branch: 2026-11-07_fix-signed-thinking-strand-on-compress-hide (26b39ae)

Latest build — install this exact version

npm install -g billion-context@0.0.11018-pr.5877.d6c3658

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
26b39ae billion-context@0.0.11018-pr.5877.d6c3658 build
e37b57e billion-context@0.0.10119-pr.5877.3c5a627 build
2357a89 billion-context@0.0.9392-pr.5877.21fbaa9 build
754dfd9 billion-context@0.0.9314-pr.5877.c99df05 build
91cd2ba billion-context@0.0.8998-pr.5877.ad9dd59 build
c4f34fa billion-context@0.0.8966-pr.5877.de68b3c build
354e326 billion-context@0.0.8541-pr.5877.d8dcf83 build
d04d951 billion-context@0.0.8521-pr.5877.19404d2 build
493e51d billion-context@0.0.8516-pr.5877.29bdaa1 build
de7209e billion-context@0.0.8513-pr.5877.b0570f8 build

Download artifact

  1. Download the artifact from the Actions run
  2. Extract the tarball and install:
tar xzf billion-context-pr5877.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)

查重:不重复。 「signed thinking → Anthropic 400」家族里已有若干独立条目,但机制各不相同:#4885/#4886 是 fold 把 signed thinking 与其 tool_use 拆开;#4679/#4681/#4712 是 round≥2 重请求里签名未落盘;#5604/#5605 是 failed-compress recovery receipt 以 assistant 结尾。本 PR 修的是 hideConsumedCompressCalls 隐藏「已消费(inactive)」的 compress pair、把 signed thinking 单独留成 final block —— 生产者与代码路径都不同。全仓 open+closed 无其他 issue/PR 引用 #5864 或使用本 fix 的 strandedProtectedPredecessor 端口。判为独立修复,已并入处理。

审核结论:可合(待人工 review —— kernel 变更按边界规则必须人工审)。 机制成立、测试有牙、无回归;另补了一个被并发运行遗漏的 lock-sync(见下)。


八问:

  1. 是什么问题:某 assistant 回合先有 signed thinking 再调 compress([thinking, tool_use:compress])后,下一次出站请求被 Anthropic 拒:400 messages.N: The final block in an assistant message cannot be thinking. 丢一个回合(用户重发即恢复),不丢会话。仅在 extended-thinking 会话且折叠边界恰好落在 [thinking, compress] 之后才触发(报告里 27 个此类回合中 5 个命中)。
  2. 什么原因:同一回合上两个各自正确、合起来非法的决策叠加——① planReasoningDrop 只要视图里有任一 signed thinking 就返回空集([bug] dropCompressReasoning (#651) strips inbound thinking from compress tool_use on Anthropic wire, triggering thinking-pair-violated warning (#684) #1658/[acp-loop] In-turn compress re-request edits the latest assistant message → Anthropic 400 "thinking blocks … cannot be modified" (session stays broken) #1960 签名教义:signed thinking 必须原样往返、绝不 drop);② kernel 的 hideConsumedCompressCalls 对已消费的 compress call+result pair 无条件隐藏,不看它前面是什么。两者同时命中 → pair 被藏、signed thinking 留下 → 该 assistant 消息塌成 [thinking] → 400。根因 = 隐藏决策没考虑紧邻前驱。
  3. 影响范围与严重程度:仅 Anthropic wire 的 extended-thinking 会话(该线 thinking 恒带签名);触发条件如上。严重度 p2——丢一个回合、可恢复;非会话不可用、非数据丢失、非缓存泄露;条件化局部影响,非全 fleet 停摆(故不打 p1)。
  4. 怎么修:给 kernel Config 加一个可选宿主注入谓词端口 strandedProtectedPredecessor(函数型 port,verif 像现有 isCompressTool 一样不解释)。hideConsumedCompressCalls 里,当待隐藏 pair 的紧邻前驱 core 命中谓词时改为保留可见,使 thinking 永不当 final。宿主侧接到一个 signed-thinking 判定(src/config.ts,与 src/server.ts:2325-2328 hasSignedThinkingBlock 逐字段同构 twin,已核对一致)。谓词缺省 ⇒ 字节级不变,非 Anthropic 宿主不受影响。
  5. 是否有回归:逐项过相邻行为——unsigned 路径不受影响([Bug] MCP compress 未接入 reasoning 清理及未完成调用保护 #3222 drop 仍触发,控制用例钉住);非 Anthropic wire 不受影响(谓词缺省→字节一致);kernel 默认 () => false 使宿主不供谓词时行为完全不变。本地实测:bili 邻域套件 79/79、kernel 34/34 全绿,新回归测试 2/2、verif-subset-guard 2/2,tsc --noEmit 干净。未见语义漂移。(注:CI 的核心 test/static-gates 矩阵当前对本 PR 显示 skip,属定时后置回退模型;本地定向覆盖作为回归证据补充。)
  6. 是否破坏缓存:否。只是让特定回合上一小段已消费的 compress tool_use+tool_result 保留可见而非隐藏——有界、对转发历史纯增量,不动 summary/baseline/snapshot 锚点或前缀缓存键;一旦 thinking 不再是紧邻前驱,pair 照常隐藏。未触碰任何缓存失效机制。
  7. 是否改设计方向:否。只给 kernel 加一个窄函数端口(与既有 isCompressTool/isToolProtected 同模式),不改压缩模式、身份模型或数据流。
  8. 是否引入新配置:无新 env/config/knob;谓词在 src/config.ts 无条件接线(宿主恒供 signed-thinking twin),不是用户可见开关。

行为变更(有意,旧→新):

  • 旧:inactive 的 compress call+result pair 一律被隐藏,即便这样会把 signed thinking 留成 thinking-final(→上游 400)。
  • 新:当该 pair 紧邻前驱是 signed thinking 时保留可见。代价:这些回合上多留一小段 compress tool_use+result 在转发历史里(有界,远便宜于丢回合+400);thinking 不再紧邻前驱后自动恢复隐藏。

我做了什么 / 协调:

  • 独立复核机制:predicates twin 逐字段对照 hasSignedThinkingBlock;确认新测试走的是真实管线(planReasoningDrop→processTurn→stripKernelSummaries→applyReasoningDrop→coreToAnthropic)而非 mock,断言有牙(signed 用例钉 plan.size===0 + pair 保留可见 + 无 thinking-final;unsigned 控制用例钉 [Bug] MCP compress 未接入 reasoning 清理及未完成调用保护 #3222 drop 仍触发)。
  • 补了一个遗漏的 lock-sync:并发运行只同步了根 package-lock.json,漏了 kernel/package-lock.json(lock-sync 门禁两查之一会红)。我在其 commit 之上追加 lock-sync: sync kernel/package-lock.json to acp-kernel 0.0.185(commit d04d951),用与 CI 相同命令自校验,diff 仅 2 行版本字段。至此三处版本号在 d04d951 全部一致为 0.0.185,唯一红门 lock-sync 应转绿。

CI 实况(推送后,实时核过):head d04d951 正在重跑,暂无 failure(lock-sync 待完成);我已用 CI 同款命令本地自校验 lockfile 一致性。其余门禁此前已绿(kernel-guard / version-guard / unused-exports / config-surface-guard / lane-guard / test-import-graph / docs-* / mysql-contract)。

标签:[bug, p2, scope/kernel, claude-code] —— bug(修 400 缺陷)、p2(丢回合可恢复,非数据丢失/缓存泄露)、scope/kernel(核心改动在 kernel/hide-consumed)、claude-code(报告来自 Claude Code / Anthropic wire)。与我独立判定一致,无需改动。

判定:可合 —— 机制正确、回归测试到位、无回归、lock-sync 已补齐;剩人工 review(kernel 人工审门槛)+ 等 CI 重跑确认转绿。按规则我不执行合并。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

七问 — lock-sync 红灯处理完毕

  1. 是什么问题:PR [PR] fix(kernel): keep compress pair visible when its predecessor is signed thinking #5877 的 CI 门禁 lock-sync 红——kernel 自己的 lockfile(kernel/package-lock.json)记录的 acp-kernel 版本号(0.0.184)与 kernel/package.json(0.0.185)不一致。
  2. 什么原因导致的:这个 PR 改动了 kernel/src/**,按 Kernel Boundary 规则必须 bump kernel 版本;rebase 到 master 后版本落在 0.0.184→0.0.185,但两份 lockfile(root 的 package-lock.json 和 kernel 自己的那份,[PR] kernel: sync package-lock.json to 0.0.136 (lock left at 0.0.133 by the bump chain) #3782 起的独立门禁)都没有跟着同步——漂移从原提交就存在,原分支只改了 kernel/package.json 没动任何 lockfile。上一轮已修好 root lockfile(commit 493e51de75),本轮是门禁的第二段(kernel lockfile)浮出来。
  3. 影响范围与严重程度:纯 CI 门禁问题,零运行时影响、零用户面影响;仅阻塞本 PR 合并。
  4. 怎么修复的:本地跑与 CI 完全相同的命令(cd kernel && npm install --package-lock-only --ignore-scripts),产出最小 diff——只有两处版本号行 0.0.184→0.0.185,无任何其他 lock 漂移,独立标注 commit 推上 PR 分支。过程说明:我推 kernel lockfile 修复时发现同车道的并行 agent 已推了内容逐字节相同的 commit(d04d951c09,tree 完全一致);我没有抢分支,丢弃了自己的重复 commit、本地对齐到远端 head,未发生推送冲突、未 force-push。
  5. 是否有回归问题:无。全部改动清点:rebase 本身(冲突仅 kernel 版本号一行,解为 0.0.185,其余 7 个文件自动合并干净)+ 去掉一个只在本文件内使用的函数导出(行为不变)+ 两份 lockfile 共 3 行版本号。无 wire/配置/持久化/时序变化;既有行为逐项过:压缩行为、两模式语义、缓存策略均未触碰。
  6. 是否破坏缓存:不涉及——改动不触及任何缓存、重试、增量游标或去重键逻辑。
  7. 是否改了设计方向 / 引入新配置:都没有。

当前实况(镜像缓存实测,head d04d951c09):guard 层全绿(lock-sync、unused-exports 等 18 项 success/skipped,0 failed);核心测试矩阵 12 条腿 + static-gates 仍在跑(in_progress)。矩阵结果出来前不做绿/红断言;若矩阵有红会由后续唤醒继续跟进。收工判定:本次红灯(lock-sync)已修复并验证转绿,PR 分支干净、可等矩阵跑完后进人工 review(kernel 变更按规则保持 human-only 评审档)。

@ranxianglei
ranxianglei force-pushed the 2026-11-07_fix-signed-thinking-strand-on-compress-hide branch 2 times, most recently from dc67fb9 to 354e326 Compare November 7, 2026 15:21
@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

七问 — 再次接冲突完成(rebase 到新 master)

  1. 是什么问题:PR [PR] fix(kernel): keep compress pair visible when its predecessor is signed thinking #5877 又与 base 分支冲突(merge state dirty)。期间发生两件事:① master 前进了([PR] fix(#5199): network.throttle429Scope — model-scoped 429 holds for marker-less gateway bodies #5889/[PR] fix(storage): refs ledger diffs instead of full-replace per save (#5744) #5755/[PR] DSH gate: Out-of-window requests guaranteed to be rejected upstream are no longer sent as raw direct calls (calibrated e | dsh 闸门:必然被上游拒绝的超窗请求不再裸发直连(校准估算 + 每次直连留痕) #5875 等合入,含一次大规模整合重构,kernel 版本从 0.0.184 推进到 0.0.185);② PR 分支被同车道的并行 agent 重写为一个新单提交(dc67fb997b,改进版修复:hide-consumed.ts +26 行、测试扩到 161 行、标题改为 "don't strand signed thinking when hiding a consumed compress pair"),但该提交仍基于旧 base。
  2. 什么原因导致的:rebase 时唯一冲突是 kernel/package.json 版本号——PR 侧在旧 base 上 bump 到 0.0.182,master 侧已到 0.0.185,同一行两个值。其余 7 个文件(包括 master 大改过的 kernel/src/hide-consumed.ts/compress.ts/types.ts)全部自动合并干净。
  3. 影响范围与严重程度:纯合并状态问题,零运行时影响、零用户面影响;仅阻塞本 PR 合并。
  4. 怎么修复的:rebase 到 master 6945a354d4;唯一冲突解为 0.0.186(master 最新 0.0.185 + 1,遵循 Kernel Boundary「改 kernel/src 必须 bump」的版本纪律)。另外预先把两个必然复红的门禁一次修掉,各自独立标注 commit:① 重写后的提交没有同步 lockfile——用与 CI lock-sync 完全相同的命令重新生成 root + kernel 两份 lockfile(仅版本号行 0.0.185→0.0.186,无其他漂移);② 重写把上一轮已修的 isStrandedProtectedPredecessor 多余 export 带了回来(grep 证实仅本文件内引用)——按 unused-exports 门禁规则去掉 export,本地跑门禁确认 clean。force-push(--force-with-lease,push 前 fetch 确认远端 head 未变,无并发竞争)。
  5. 是否有回归问题:rebase 本身无回归——逐文件核对了自动合并结果:新增的 runHasStrandedProtectedPredecessor 辅助函数与守卫行落在 master 重构后的代码里位置一致、语义完整;config.ts→loop/core.ts→kernel Config.strandedProtectedPredecessor(可选字段,unset 即字节级不变)接线链完好;verif 子集守卫同步登记了新函数名。我的两个补充 commit 只动 lockfile 版本号和一个 export 关键字,无行为变化。全量矩阵以推送头 CI 为准,跑完前不断言绿。
  6. 是否破坏缓存:不涉及——不触及任何缓存/重试/游标逻辑。
  7. 是否改了设计方向 / 引入新配置:都没有(kernel 新字段为可选、默认关闭,属 PR 作者原有设计,非本次改动)。

当前实况(镜像缓存实测,head 354e326fde):新一轮 CI 已启动,0 failed,guard 层排队/运行中(19 项 pending)。矩阵结果出来前不做绿/红断言;若再红由后续唤醒跟进。收工判定:冲突已解决并验证推送成功,PR 分支干净,等本头 CI 全绿后进人工 review(kernel 变更保持 human-only 评审档)。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

补一条状态确认(本轮七问总结已发在上条评论):接冲突已完成——PR #5877 已 rebase 到 master 6945a354d4,唯一冲突(kernel 版本号)解为 0.0.186,并预先把两份 lockfile 同步和多余 export 两个必然复红的门禁修掉(独立标注 commit),force-push 成功,当前 head 354e326fde。

最新实况(镜像缓存实测,15:33):guard 层全部通过,0 failed;剩余 12 项为核心测试矩阵与 static-gates,排队/运行中。矩阵跑完前不断言绿;若再有红由后续唤醒跟进。收工判定:冲突已清、分支干净,等本头 CI 全绿后进人工 review。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

Fixed — PR #5899 (labels bug p2 dsh scope/wiring, merged onto current master, CI running on the pushed head).

What I verified against v0.1.212 (= current master)

Problem 2 (clamp never fires) — confirmed as reported. src/server/budget.ts wired the outgoing max_tokens clamp into the openai/responses/google prepare lanes only; the anthropic lane forwarded your requested 256K untouched. Fixed: the anthropic lane now runs the same clamp family, sized against the RAW native window exactly like the other lanes (#2096 semantics — nudge/preflight judge the headroom-adjusted window, egress guards the raw one). Your incident numbers through the new cap math: java/1 est 783,353 → cap 127,353 → total ≈928,675 < 1,048,576 ✓; java/2 est 779,619 → cap 131,744 → total ≤ ~934K ✓. Both requests would have forwarded under the wall instead of 400ing.

Problem 1 (fit check ignores system+tools) — does not hold on v0.1.212. The round estimate already includes wire overhead (system prompt + tool definitions): src/preflight.ts:2138 adds wireOverhead, fed from outboundPayloadBreakdown → estimateWireOverhead which counts parsed.system + parsed.tools JSON. Adding that mass again would double-count. The real reasons bili thought the folded payload fit:

  1. The optimistic chars/4 estimator undercounts DeepSeek's tokenizer ~19–20% end-to-end on code-heavy Java (est 647,172 vs real 801,322; est 779,619 vs real 934,146), and k̂ calibration never engages because DeepSeek sends no usage reports (your usage-baseline=none).
  2. A genuine defect found while reconstructing the timeline: after every successful fold, bili writes a baseline anchor from a fresh estimate of the rebuilt view; when that estimate measured slightly above the netted overflow-arm value (caliber delta between the two measurements), the write overwrote the overflow-arm evidence tag with an estimate-grade one — silently disarming the evidence floor that keeps an armed session folding instead of trusting optimistic estimates. The next turn fit-forwarded on the stale estimate until the 400 re-armed it: exactly your fold→forward→400 livelock. Fixed by extracting that write into applyPostRebuildBaselineAnchor() with an overflow-arm guard (same doctrine as armFailureShrink, relay.ts 超窗拒答以 5xx 返回时出现探测死循环;外部摘要链路三处静默/上限问题(含文件:行号与本地验证) #2484); unarmed and usage-grade behavior unchanged (preflight: one failed summarization call fails the whole turn with a non-retryable 502 and blocks the session #1987/arm emergency shrink on upstream failure to break relay-5xx deadlock #604).

Problem 3 (fold floor unreachable) — becomes moot once the clamp is wired. What actually binds is the input+output SUM, and the clamp now enforces it egress-side regardless of estimate error. Genuinely hopeless sessions hit the existing honest fail-fast ladder (a clear local refusal instead of 400 ping-pong).

Behavior changes (disclosed, old→new)

  • Post-preflight-fold: an ACTIVE overflow-arm tag is no longer overwritten by the estimate anchor (old: demoted whenever the rebuilt-view estimate exceeded the netted arm value). Meters/floors keep evidence grade across folds; unarmed sessions behave byte-for-byte as before.
  • Anthropic-wire requests: max_tokens may now be reduced when estimated input is close to the raw window (old: never clamped on this wire). No-op when the request fits; canonical Anthropic (separate input/output limits) is unaffected in practice since its requested budget already rides under the window. Operator-visible via the existing output budget clamped log line.

Tests: new tests/issue5880-anthropic-clamp-arm.test.ts — arm-guard unit pins (both directions) + hermetic e2e through /v1/messages: near-wall request clamped against the raw window (cap math asserted from the log line), fitting request passes through unchanged. Local targeted green: new suite 5/5, #2096 suite 4/4, preflight-window-clamp + lane-decisions-matrix 101/101, dsh-persona suites 15/15, typecheck clean; full-suite verdict = remote CI on the pushed head.

查重: 不重复 — #3738/#3739 (closed) cover headroom-reserved judging limits, #5291 covers openai-lane clamp sizing, #4950/#5841 are different mechanisms/lane shapes.


结构化八问

  1. 是什么问题:anthropic 线上(DeepSeek 这类把 completion 计入同一窗口的包装商),bili 估算认为放得下的会话仍按 input+output 超窗发请求,上游硬 400 CONTEXT_WINDOW_EXCEEDED,且每轮「折叠→放行→400→重新武装」死循环。
  2. 什么原因导致的:两个独立缺陷——①preflight 折叠成功后的基线锚点写入会把 active 的 overflow-arm 证据标签降级为 estimate(两种计量口径的差值让不等式每次折叠都成立),证据地板被静默拆除,下一轮拿陈旧乐观估算 fit-forward 过墙;②出站 max_tokens 钳制只接了 openai/responses/google 三条车道,anthropic 车道从未接线,客户端请求的 256K 原样出网。issue 里「fit 判定漏算 system+tools」不成立——v0.1.212 回合估算已含 wire overhead(系统提示+工具定义),照此改会重复计数。
  3. 影响范围与严重程度:所有走 anthropic 线的同墙计费包装商(DeepSeek 等)+ 贴近窗口上限的大会话;触发即完全无法继续(每轮 400),有绕行(modelOverrides 调小 maxTokens,你已验证)→ p2。canonical Anthropic 实际不受钳制影响。
  4. 怎么修复的:①锚点写入抽成 applyPostRebuildBaselineAnchor(),对 overflow-arm 标签加守卫(relay.ts armFailureShrink 同款教义),证据等级跨折叠保持;②anthropic 车道补上与其他车道同一族的出站钳制调用点,按 RAW 原生窗口定上限(clampOutgoingOutput sizes max_tokens against the raw native window while preflight enforces the reserve-adjusted one — up to 25% of slack the clamp never sees #2096 语义)。
  5. 是否有回归问题:审过既有行为——未武装会话锚点行为逐字节不变(preflight: one failed summarization call fails the whole turn with a non-retryable 502 and blocks the session #1987/arm emergency shrink on upstream failure to break relay-5xx deadlock #604 单测双向钉住);openai/responses/google 车道零改动(clampOutgoingOutput sizes max_tokens against the raw native window while preflight enforces the reserve-adjusted one — up to 25% of slack the clamp never sees #2096 套件 4/4);preflight-window-clamp + lane-decisions-matrix 101/101;dsh-persona 15/15;typecheck 干净。唯一有意变更即上面披露的两条。
  6. 是否破坏缓存:不涉及——不改消息内容、不改系统提示布局、不动前缀缓存路径;钳制只改出站 max_tokens 数值。
  7. 是否改了设计方向:没有——把既有钳制机制补到漏接的第四条车道,并把一处锚点写入对齐既有 arm 保护教义。
  8. 是否引入了新的配置:无新 env/config/默认值;退出开关沿用既有的 modelOverrides.maxTokens / compress.outputHeadroomMaxPct。

判定:可合(等 CI 绿)。合并后建议在你的 dsh+DeepSeek 环境实测一轮确认 400 不再出现。

@ranxianglei
ranxianglei force-pushed the 2026-11-07_fix-signed-thinking-strand-on-compress-hide branch from 354e326 to c4f34fa Compare November 10, 2026 15:56
@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

Conflict resolved again — PR #5877 rebased onto the new master and pushed.

What happened: while my previous head (354e326fde) sat fully green (30/30 checks, 0 failed), master advanced a61c55cff → 58a879622 (#5991/#5809/#5609 merged; kernel 0.0.185→0.0.192, bili 0.1.212→0.1.213, ~437 files changed), which dirtied the merge state. Rebase produced a single expected conflict (kernel version line) plus the two known follow-ups (lockfile sync, unneeded export). All handled as separate labeled commits; new head c4f34faf2. One process hiccup mid-run (an edit script left conflict markers in a commit) was caught, aborted, and redone cleanly via cherry-pick — final tree verified marker-free with a diff matching the original PR's 8 files exactly.

Live state (mirror cache, verified twice): head c4f34faf2, 30/30 checks completed, 0 failed, 0 pending (the 15 non-success entries are env-gated e2e/theorem lanes that skip normally on this lane). Merge state should be clean now; the PR awaits human review (kernel changes stay in the human-only tier).

七问

  1. 是什么问题:PR [PR] fix(kernel): keep compress pair visible when its predecessor is signed thinking #5877 再次与 base 分支冲突(merge state dirty)。原因是 master 在我上一轮 rebase 之后又前进了([PR] fix(hermes-plugin): restore routed process env on unload and watchdog exit (#4644 follow-up) #5991/[PR] fix: keep only CA certificates in combined-ca.pem (#5802) #5809/[PR] fix(resume): inherit timestamp ledger so resumed sessions re-render provider-cached tag bytes #5609 合入,kernel 版本 0.0.185→0.0.192,bili 0.1.212→0.1.213,约 437 文件大改动)。
  2. 什么原因导致的:PR 分支与 master 各自独立推进、同一行(kernel/package.json 版本号)双方都改——rebase 时唯一文本冲突就是它(master 0.0.192 vs PR 侧 0.0.186);其余 7 个文件全部自动合并干净。属周期性复发,非新机制。
  3. 影响范围与严重程度:纯合并状态问题,零运行时影响、零用户面影响;仅阻塞本 PR 合并。
  4. 怎么修复的:用 cherry-pick 把 3 个提交重建到新 master 58a879622 上(保证 commit 信息准确);唯一冲突解为 0.0.193(master 最新 0.0.192 + 1,Kernel Boundary「改 kernel/src 必须 bump」纪律);随后两个独立标注 commit:① 用与 CI lock-sync 完全相同的命令重新生成 root + kernel 两份 lockfile(仅版本号行 0.0.192→0.0.193,root 1 行、kernel 2 行);② 重新应用去掉多余 export(本地 unused-exports 门禁 clean)。force-push(--force-with-lease,push 前 fetch 确认远端 head 未变,无并发竞争)。
  5. 是否有回归问题:无。rebase 只换 base 与版本号,不改语义;逐文件核对了自动合并结果(hide-consumed.ts 新增的 runHasStrandedProtectedPredecessor 辅助函数与守卫行、types.ts 可选 Config 字段、config.ts/core.ts 接线、subset-guard 登记、161 行测试)落在新 master 代码里位置一致、语义完整。补充 commit 只动 lockfile 版本行和一个 export 关键字。全量矩阵已在本头跑完为绿(镜像缓存实测 30/30、0 failed)。
  6. 是否破坏缓存:不涉及——不触及任何缓存/重试/游标逻辑。
  7. 是否改了设计方向 / 引入新配置:都没有(kernel 新字段为可选、默认关闭,属 PR 作者原有设计)。

收工判定:冲突已清、分支干净、CI 全绿,等人工 review 合入即可。若 master 再前进导致再脏,后续唤醒按同样流程处理。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

收工确认 — PR #5877 已收敛,无遗留项。 上轮(16:20)已发完整七问,本轮只做最终状态核验,全部通过:

  • 分支干净:远端 head 与本地一致(c4f34faf2,ls-remote 实测),无并发推送漂移;master 未再前进(仍在 58a879622,是 head 的祖先)→ merge state 干净,无冲突。
  • CI 全绿(镜像缓存实测):head c4f34faf2 共 30 项 check,30/30 completed、0 failed、0 pending;15 项 skipped 均为环境门控的 e2e/theorem 车道(该车道正常跳过)。核心 test 矩阵 12 腿 + static-gates ×2 + mysql-contract + unused-exports + lock-sync 等 guard 层全部 success。
  • 内容:rebase 后 3 个提交——kernel 修复本体(strandedProtectedPredecessor 端口,修 [claude] 400 "final block in an assistant message cannot be thinking" after a compress call that follows a thinking block #5864 signed-thinking-final 400)+ lockfile 同步(kernel 0.0.193)+ 去掉多余 export;diff 与原 PR 的 8 文件完全一致,无语义变化。

剩余:仅人工 review(kernel 变更按 Kernel Boundary 保持 human-only 评审档)。按规则我不执行合并——请人工审后合入 #5877 。若 master 后续再前进导致冲突复发,按既有流程处理即可。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[bot] 进度汇报(会话曾被强制重启一次——一条全盘 find 命令挂起导致;已换用定向方式继续,无数据丢失):

已完成:PR #5877(上游号)端到端审核主体工作完毕。

  • 方向关/回归关/代码关均已独立审完:根因分析成立(planReasoningDrop 对 signed thinking 返回空集 × hideConsumedCompressCalls 独立隐藏 inactive 对 → assistant 消息塌缩为 [thinking] → Anthropic 400),修法打在隐藏决策点(疏而非堵),run 语义与 coreToAnthropic 的分组逐行核对一致,谓词与 server.ts hasSignedThinkingBlock 逻辑相同。
  • 本地定向验证全绿:新测试 5/5(且做了负向验证——把 kernel 三个文件回退到 base 后 4/5 失败,证明是真回归测试);kernel hide-consumed/orphan 家族 55/55;bili reasoning/verif 定向套件 64/64。CI 在 head c4f34fa 上全绿(镜像缓存读取)。
  • 发现 1 个非阻塞小问题(src/stream.ts:853 visibleSummaryStubs 扫描器未接新谓词,[严重]t2压缩被截断为200字 #2749 stub 重提防护在新角落漏采)——按规则顺手修,正在推 commit。

进行中:推顺手修 commit → 打 needs-decision 标签 → 发 GitHub findings-only review + 🔶 需要决策 评论(本 PR 触碰 kernel/,按硬规则不 approve,等 owner 人工批准档)。

ranxianglei pushed a commit that referenced this pull request Nov 10, 2026
… scan

visibleSummaryStubs (src/stream.ts) harvests the display stubs the model
can see via hideConsumedCompressCalls, but called it with default
predicates while the real outbound path (a) recognizes MCP-named compress
calls (#2970) and (b) keeps a consumed pair visible when a signed thinking
block leads its assistant run (#5864). Both divergences left exactly the
fragments the model can see un-harvested, so the exact-match
re-submission rejection missed them — most visibly for mcp__bili__compress
sessions, which the bare-name filter skipped entirely.

Pass isMcpBiliCompress + isStrandedProtectedPredecessor into the scan so
it mirrors the outbound hide decision. Read-only internal scan, try/catch
degrades to an empty set, rejection stays exact-match-only.

Reviewer drive-by fix for PR #5877 (findings review of #5864). Pinned by
tests/stub-resubmission-guard.test.ts and
tests/issue5864-signed-thinking-orphan.test.ts.

@ranxianglei ranxianglei left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Findings-only review — no approval posted. This PR touches kernel/; the human-only kernel tier gates the merge (Kernel Boundary rule 3). See the 🔶 需要决策 follow-up comment for the authorization request.

① Direction (original issue #5864) — correct. Verified against the reporter's data (5 fails / 27 thinking+compress turns vs 0 / 54 no-thinking): planReasoningDrop (src/server.ts:2400-2424) refuses to drop ANY signed thinking once one is present (gate at :2422, #1658/#1960 doctrine), while the kernel's hideConsumedCompressCalls hides the consumed pair independently. The two mechanisms never consult each other, so the assistant message collapses to [thinking] — which Anthropic rejects ("final block … cannot be thinking"). The fix lands at the PRODUcer of the illegal wire shape (the hide decision point), not a payload mask — 疏, not 堵. It also correctly rejects the issue's suggested alternative ("drop the orphaned thinking"), which would violate the #1960 signature-verification doctrine (signed thinking blocks are never rewritten or dropped from replayed history).

② Regression inventory — existing behaviors on touched paths, each judged:

  • No-predicate default path: byte-identical. Every pre-existing hideConsumedCompressCalls call site (all kernel/tests/*) passes no port; with the predicate unset the helper is a no-op. Confirmed by negative experiment (below).
  • #3769 swept orphans: the guard also applies to the sweptSet un-hide path, so a swept orphan sharing its assistant run with signed thinking is now kept visible instead of hidden. Judged SAFE: no wire illegality (a kept pair renders as [thinking, tool_use] + user-role result), no prefix-cache thrash (outbound bytes stable across turns until the thinking leaves the run — one-time change, same class as fold-driven changes), and it preserves #3769's stated observability goal (failure evidence stays visible; hiding it invites pi#9-style deterministic re-issue storms). Requires a rare triple conjunction (swept orphan + signed-thinking run + fold sweep).
  • Stub compaction of kept pairs: unchanged — kept calls get the live-range rewrite or the 200-char SUMMARY_STUB_CHARS stub; call args remain byte-exact user intent.
  • planReasoningDrop / makeFoldPointReasoningDroppable: untouched; signed-thinking drop-refusal semantics preserved.
  • Predicate scope: twin of hasSignedThinkingBlock (src/server.ts:2386-2390), reads only thinkingSignature / rawAnthropicBlock.type === "redacted_thinking"; per src/server.ts:2409-2411 only the Anthropic codec stamps these fields, so Gemini/OpenAI wires are structurally unaffected.
  • Kernel hygiene: version bump 0.0.192→0.0.193 + lockfile sync (7da9d44), unused-export cleanup (c4f34fa), verif subset-guard port registered (verif/subset-guard.ts GLOBAL_FNS += strandedProtectedPredecessor, pred), golden pins untouched, zero new deps.

③ Code review — the "run" scanned by runHasStrandedProtectedPredecessor (kernel/src/hide-consumed.ts:255-264, consecutive same-role cores ending at the call) exactly matches what coreToAnthropic renders as ONE assistant message (grouping at kernel/src/wire/anthropic.ts:540-545, flush on role change); tool-result cores are role user and terminate runs, matching the multi-compress expectation (test 3: c1 kept, c2 hidden). Guard direction is conservative — safe side only: worst case is bounded extra tokens, never an illegal shape. Wiring verified complete: loadOptions kernelConfig (src/config.ts:1805) → ccrLoopConfig spread (src/store.ts:94-99) → relay round-2 processTurn (src/server/relay.ts:2668) plus steady prepare paths, and the direct loop call (src/loop/core.ts:1587).

④ Test validity — true gate test, both directions asserted (#3617 discipline). Drives the REAL pipeline (planReasoningDrop → core.processTurn(loadOptions({}).kernelConfig) → stripKernelSummaries → applyReasoningDrop → coreToAnthropic); the signed cases assert pair visibility AND no thinking-final assistant anywhere on the wire AND byte-exact thinking text+signature round-trip; the UNSIGNED control asserts the #3222 drop still fires AND the pair is hidden. Negative check performed locally: reverting the three kernel files to base makes 4/5 cases fail (control passes) ⇒ genuine regression pin. Local targeted suites: kernel hide-consumed/orphan family 55/55, bili reasoning/verif family 64/64, typecheck clean. CI green at c4f34fa (mirror cache); my drive-by commit below re-triggers CI.

⑤/⑤b Diff cleanliness & code quality — clean and minimal (3 kernel files + 3 host files + 1 new test); intent-bearing names, comments explain why, style consistent with neighbors, no dead code, no magic literals. One finding found during review, fixed on spot below.

已顺手修:visibleSummaryStubs (#2749 stub re-submission guard) called hideConsumedCompressCalls with default predicates while the outbound path recognizes MCP-named calls (#2970) and keeps strand-guard pairs visible (#5864) — the scan's own contract ("exactly what the model can see right now") diverged from the render, leaving model-visible stubs un-harvested (worst for mcp__bili__compress sessions, skipped entirely by the bare-name filter). It now mirrors the outbound hide decision; read-only scan, try/catch degrades to an empty set, rejection stays exact-match-only. Pinned by tests/stub-resubmission-guard.test.ts + tests/issue5864-signed-thinking-orphan.test.ts (10/10 pass, typecheck clean) + commit 91cd2ba

八问(中文)

  1. 是什么问题:模型刚输出「signed thinking + compress 调用」的回合之后,出站 assistant 消息因 compress 对被隐藏而塌缩成只剩一个 thinking 块,Anthropic 直接 400("final block cannot be thinking"),会话当场不可用。
  2. 什么原因导致的:两个各自保守、互不告知的机制叠加——reasoning-drop 侧按 #1658/#1960 教义绝不丢 signed thinking;kernel 隐藏侧独立把已消费的 compress 对藏掉。交集产生非法线形,两边各自没错,但没人负责这个交集。
  3. 影响范围与严重程度:仅 plugin 模式 × Anthropic wire × 开 extended thinking × 同一 assistant run 内 signed thinking 与已消费 compress 对共存。报告者实测 27 个相关回合挂 5 个(~19%);命中即 400,属该场景下完全不可用。
  4. 怎么修复的:在非法形状的生产者(kernel 隐藏决策点)加可选宿主端口 strandedProtectedPredecessor——同一 assistant run 内前面存在受保护块(signed thinking / redacted_thinking)时,强制保留该 compress 对可见(参数压缩为 200 字符 stub)。端口不设定时行为逐字节不变。明确拒绝了 issue 中"丢弃孤儿 thinking"的替代方案(违反 #1960 签名教义)。
  5. 是否有回归问题:无。默认路径字节级不变(负向实验验证);#3769 swept-orphan 与新守卫的交互专门分析过——无线形非法、无前缀缓存抖动、且保住可观测性目标;reasoning-drop / fold-point / golden pin 均未动。
  6. 是否破坏缓存:不。un-hide 只在 signed thinking 首次进入该 run 时改一次出站字节(与 fold 驱动变更同类),此后内容稳定,前缀缓存保持。
  7. 是否改了设计方向:没有。新可选 Config 端口沿用既有宿主 hook 模式,kernel 保持平台无关、零新依赖。
  8. 是否引入了新的配置:没有。无新 env/config 字段。

Verdict: no blocking findings; code quality and tests meet the bar. Approval intentionally NOT posted — kernel PRs sit at the human-only tier, including the reviewer drive-by commit above.

@ranxianglei

Copy link
Copy Markdown
Owner Author

🔶 需要决策
(ai: vllm-qwen/qwen3.8-27b)

PR #5877 touches kernel/ (hide-consumed.ts guard+helper, types.ts optional port, compress.ts wiring, kernel version 0.0.192→0.0.193) and carries the kernel-change: declaration. Per the Kernel Boundary (human-only review tier, always) and this review lane's authorization rules, I am posting findings only — requesting owner authorization to merge.

  • Head: 91cd2badd1 on 2026-11-07_fix-signed-thinking-strand-on-compress-hide (base master 58a8796224). Original head c4f34faf2 was CI-green; drive-by commit 91cd2bad (src/stream.ts + src/config.ts, mechanical scanner alignment, no kernel surface) re-triggered CI.
  • Review verdict: no blocking findings; full regression inventory + 八问 in the review above.
  • Gated diff: kernel/src/hide-consumed.ts, kernel/src/types.ts, kernel/src/compress.ts, kernel/package.json (+ lockfiles).

Please approve or reject as the human kernel reviewer.

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[bot] 收工:PR #5877 审核完成。findings-only review 已发(无阻塞发现;kernel PR 按硬规则不 approve)+ 🔶 需要决策 评论已发 + needs-decision 标签已打,等 owner 人工批准档。非阻塞小问题 1 个已顺手修:visibleSummaryStubs 扫描器对齐出站隐藏决策(MCP 名识别 + #5864 strand guard),commit 91cd2ba 已推 PR 分支(定向测试 10/10、typecheck 干净,CI 重跑中)。本地定向验证全绿(新测试 5/5 + 负向验证证明真回归 pin;kernel 家族 55/55;bili reasoning/verif 家族 64/64),原 head c4f34fa CI 全绿。判定:可合(待 owner 批准)。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[bot] (同步回声说明)上面这条是我刚发到上游 PR #5877 的 🔶 需要决策 评论被镜像同步回来的,非新信息。当前状态不变:审核完成、无阻塞发现,等 owner 人工批准档拍板(approve / reject)。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[bot] (收尾说明,不再重复)该条仍是同一条 🔶 评论的镜像同步回声,无新信息。后续若再收到同一内容的同步转发,属正常回环,无需处理。状态不变:审核完成、无阻塞发现,等 owner 拍板 approve / reject。

@ranxianglei
ranxianglei force-pushed the 2026-11-07_fix-signed-thinking-strand-on-compress-hide branch from 91cd2ba to 754dfd9 Compare November 12, 2026 09:55
ranxianglei pushed a commit that referenced this pull request Nov 12, 2026
… scan

visibleSummaryStubs (src/stream.ts) harvests the display stubs the model
can see via hideConsumedCompressCalls, but called it with default
predicates while the real outbound path (a) recognizes MCP-named compress
calls (#2970) and (b) keeps a consumed pair visible when a signed thinking
block leads its assistant run (#5864). Both divergences left exactly the
fragments the model can see un-harvested, so the exact-match
re-submission rejection missed them — most visibly for mcp__bili__compress
sessions, which the bare-name filter skipped entirely.

Pass isMcpBiliCompress + isStrandedProtectedPredecessor into the scan so
it mirrors the outbound hide decision. Read-only internal scan, try/catch
degrades to an empty set, rejection stays exact-match-only.

Reviewer drive-by fix for PR #5877 (findings review of #5864). Pinned by
tests/stub-resubmission-guard.test.ts and
tests/issue5864-signed-thinking-orphan.test.ts.
@ranxianglei
ranxianglei force-pushed the 2026-11-07_fix-signed-thinking-strand-on-compress-hide branch from 754dfd9 to 2357a89 Compare November 12, 2026 20:18
ranxianglei pushed a commit that referenced this pull request Nov 12, 2026
… scan

visibleSummaryStubs (src/stream.ts) harvests the display stubs the model
can see via hideConsumedCompressCalls, but called it with default
predicates while the real outbound path (a) recognizes MCP-named compress
calls (#2970) and (b) keeps a consumed pair visible when a signed thinking
block leads its assistant run (#5864). Both divergences left exactly the
fragments the model can see un-harvested, so the exact-match
re-submission rejection missed them — most visibly for mcp__bili__compress
sessions, which the bare-name filter skipped entirely.

Pass isMcpBiliCompress + isStrandedProtectedPredecessor into the scan so
it mirrors the outbound hide decision. Read-only internal scan, try/catch
degrades to an empty set, rejection stays exact-match-only.

Reviewer drive-by fix for PR #5877 (findings review of #5864). Pinned by
tests/stub-resubmission-guard.test.ts and
tests/issue5864-signed-thinking-orphan.test.ts.
@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

接冲突完成 — PR #5877 已 rebase 到新 master 并推送,新 head 2357a8938。

七问

  1. 是什么问题:PR [PR] fix(kernel): keep compress pair visible when its predecessor is signed thinking #5877 再次与 base 分支冲突(merge state dirty)。master 自上一轮 rebase 后又前进了(c26c31ace → 259cd8767,约 30 个提交:[PR] chore(batch): land 7 open BBleae fixes in one history-preserving batch #6455/[PR] docs: add Discord community link to README #6458/[PR] fix(prompts): use the official string form for the compress call example in the compression failure prompt | fix(prompts): 压缩失败提示里的 compress 调用示范改用官方字符串形态 #6438/[PR] fix: persist ledger rows before the model call (durability-before-render) #6326 等合入,其中 [PR] fix(prompts): use the official string form for the compress call example in the compression failure prompt | fix(prompts): 压缩失败提示里的 compress 调用示范改用官方字符串形态 #6438 把 kernel 版本从 0.0.195 推进到 0.0.196)。
  2. 什么原因导致的:周期性复发——master 与 PR 分支独立推进。本轮的特殊点:master 自己的 kernel bump 已经占用了 0.0.196,本 PR 的 kernel 版本行若照旧解会撞车。
  3. 影响范围与严重程度:纯合并状态问题,零运行时影响、零用户面影响;仅阻塞本 PR 合并。
  4. 怎么修复的:cherry-pick 3 个内容提交(kernel 修复本体 / 去多余 export / [严重]t2压缩被截断为200字 #2749 stub-resubmission 扫描修复——后者是并发 agent 在旧 head 上追加的,已原样保留)到新 master 上。唯一手工裁决:kernel 版本解为 0.0.197(master 最新 0.0.196 + 1;cherry-pick 三方合并曾把版本行静默解成与 master 相同的 0.0.196,那样 version-guard 会红——改 kernel/src 必须相对 master bump——已手工修正并 amend 进修复提交)。随后独立标注 commit 重新生成 root + kernel 两份 lockfile(仅 3 行版本号 0.0.196→0.0.197,无其他漂移)。force-push(--force-with-lease,push 前 fetch 确认远端 head 无并发推送)。
  5. 是否有回归问题:无。本轮 cherry-pick 零文本冲突(master 对 stream.ts 的改动在 applyRanges 区段,与本 PR 的 visibleSummaryStubs 区段不相交;compress.ts/core.ts 的改动同样自动合并干净)。本地定向验证:typecheck 干净、unused-exports 门禁 clean、lockfile 用 CI 同款命令自校验幂等、本 PR 两个回归测试文件 10/10 通过(issue5864-signed-thinking-orphan + stub-resubmission-guard)。全量矩阵以推送头 CI 为准。
  6. 是否破坏缓存:不涉及——rebase 只换 base 与版本号,不改任何缓存/重试/游标逻辑。
  7. 是否改了设计方向 / 引入新配置:都没有。

当前实况:新 head 2357a8938 已推送并确认(PR head ref 实测)。镜像缓存尚未收录本头的 CI 结果(上次抓取仍显示旧 head 754dfd9ea 的在途运行,11 pending——该运行已被新 head 取代,结果作废)。矩阵跑完前不断言绿;若再有红由后续唤醒跟进。收工判定:冲突已清、分支干净,等本头 CI 全绿后进人工 review(kernel 变更保持 human-only 评审档)。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

状态确认 — 新 head 2357a8938 的 CI 已全绿。 上轮七问已发(接冲突 + rebase 细节),本轮补最终核验结果:

  • 分支干净:PR head = 本地 = 2357a8938,master 259cd8767 是 head 的祖先 → merge state 干净,无冲突(实测)。
  • CI 全绿(镜像缓存实测,sha 即 2357a8938):30/30 checks completed、0 failed、0 pending——15 success + 15 skipped(skipped 均为环境门控的 e2e/theorem 车道,该车道正常跳过)。核心 test 矩阵、static-gates、lock-sync、unused-exports、kernel-guard 等全部通过。
  • mergeable 显示 blocked:因 kernel 变更属 human-only 评审档,等人工 approve,非冲突、非 CI 红。

收工判定:接冲突完成、CI 全绿、无遗留项。剩余仅人工 review + 合并(按规则我不执行合并)。若 master 再前进导致冲突复发,后续唤醒按同一流程处理。

@ranxianglei ranxianglei left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Re-review of rebased head 2357a89386 (round 2) — findings only, verdict unchanged.

The branch was rebased onto current master (old base 58a8796224 → new base 259cd87674); all four commits re-hashed. Verified the rebase is content-clean:

  • PR diff vs its base: byte-identical to round 1, except the kernel version bump is now 0.0.196 → 0.0.197 (master advanced the kernel four versions in the meantime: #5765 block ops, #6132 fold-point removal, #6438/#6439 prompt fixes).
  • Master-window changes to the PR's files are orthogonal: kernel/src/hide-consumed.ts and kernel/src/wire/anthropic.ts are UNCHANGED on master in the window — my run-semantics verification (guard's "run" == coreToAnthropic grouping) and guard-placement analysis hold verbatim. The master deltas in src/server.ts / src/config.ts / src/stream.ts / src/loop/core.ts are #5765 (opt-in block ops, default off), #6132 (removal of the experimental compressAtFoldPoint — it deleted the only other consumer of the relocateCompressCarriers/reasoningDroppable options; no interaction with the hide guard) and #3266 inert-key warnings; none touches hasSignedThinkingBlock, planReasoningDrop, visibleSummaryStubs, or the loadOptions kernelConfig wiring.
  • My round-1 drive-by fix (scanner alignment) is included in the rebase as 57ecc4abb5.
  • Re-verified locally on the new head: issue5864 + stub-guard 10/10, kernel hide/orphan family 45/45, bili reasoning/verif family 64/64, typecheck clean. CI green on 2357a89386 (30/30, mirror cache).

No new findings; no blocking findings. The kernel human tier still gates the merge (see the 🔶 需要决策 comment; head ref updated in the follow-up below).

八问(中文,第 2 轮 — 与第 1 轮一致,仅版本号更新)

  1. 是什么问题:同第 1 轮(signed thinking + compress 同回合后,出站 assistant 消息塌缩为单个 thinking 块 → Anthropic 400,会话当场不可用)。
  2. 什么原因导致的:同第 1 轮(reasoning-drop 侧绝不丢 signed thinking × kernel 隐藏侧独立藏掉已消费对,两个保守机制互不告知,交集产生非法线形)。
  3. 影响范围与严重程度:同第 1 轮(plugin 模式 × Anthropic wire × extended thinking × 同一 run 内 signed thinking 与已消费 compress 对;报告者实测 ~19%,命中即 400,完全不可用)。
  4. 怎么修复的:同第 1 轮(kernel 隐藏决策点加可选宿主端口 strandedProtectedPredecessor,同 run 前置受保护块时强制保留对可见;端口不设定时逐字节不变)。
  5. 是否有回归问题:无(同第 1 轮;本轮另确认 master 窗口变更与 PR 正交、无新交互)。
  6. 是否破坏缓存:不(同第 1 轮)。
  7. 是否改了设计方向:没有(同第 1 轮)。
  8. 是否引入了新的配置:没有(同第 1 轮)。

Verdict: no blocking findings; still findings-only — kernel PRs sit at the human-only tier.

@ranxianglei

Copy link
Copy Markdown
Owner Author

🔶 需要决策
(ai: vllm-qwen/qwen3.8-27b)

Head update: the branch was rebased onto current master — head is now 2357a89386 (supersedes 91cd2badd1; content identical, kernel version now 0.0.196 → 0.0.197). Round-2 re-review posted above: rebase content-clean, master-window changes orthogonal, targeted suites green, CI green 30/30.

The authorization request stands unchanged: owner approve/reject as the human kernel reviewer. Gated diff: kernel/src/hide-consumed.ts, kernel/src/types.ts, kernel/src/compress.ts, kernel/package.json (+ lockfiles).

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[bot] 第 2 轮审核完成(PR 已 rebase 到最新 master,head 2357a89):rebase 内容核对干净——PR diff 与第 1 轮逐字节一致(仅 kernel 版本号 0.0.196→0.0.197,master 期间升了 4 版);master 窗口对 PR 触碰文件的变更(#5765 block ops / #6132 移除 compressAtFoldPoint 实验特性 / #3266)均正交,hide-consumed.ts 与 wire/anthropic.ts 在窗口内零改动,第 1 轮全部结论原样有效。新 head 本地定向复验全绿(10/10 + 45/45 + 64/64 + typecheck),CI 30/30 绿。无新发现、无阻塞发现;第 2 轮 findings-only review + 🔶 head 更新评论已发,仍等 owner 人工批准档拍板。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

CI-engineer side of the record, for the pending kernel-authorization decision:

Verified live this run (not from memory):

  • PR head = 2357a89386, local branch in sync, no concurrent drift.
  • Merge state clean: master 259cd8767 is an ancestor of the head — no conflict.
  • CI on this exact head (mirror cache, sha-matched): 30/30 checks completed, 0 failed, 0 pending (15 success + 15 env-gated skips). lock-sync, unused-exports, kernel-guard, version-guard, full test matrix all pass.
  • Gated diff matches the request: kernel/src/hide-consumed.ts, kernel/src/types.ts, kernel/src/compress.ts, kernel/package.json (0.0.196→0.0.197) + both lockfiles.

Position: the kernel authorization is yours to make as the human kernel reviewer — per the Kernel Boundary I can neither grant it nor paper over it (no PR-body edits from me). I am standing down from this branch until you decide:

  • Approve → the PR is merge-ready as-is (CI green, content-clean per the round-2 re-review above); merge stays human-only.
  • Reject → say the word and I'll roll the branch back / close out per your instruction.

One note: the needs-decision label could not be applied from this lane — the mirror shim does not implement the labels endpoint (endpoint not implemented in ework shim). The in-thread 🔶 需要决策 comment is the standing record of the pending decision.

@ranxianglei
ranxianglei force-pushed the 2026-11-07_fix-signed-thinking-strand-on-compress-hide branch from 2357a89 to e37b57e Compare November 15, 2026 07:25
ranxianglei pushed a commit that referenced this pull request Nov 15, 2026
… scan

visibleSummaryStubs (src/stream.ts) harvests the display stubs the model
can see via hideConsumedCompressCalls, but called it with default
predicates while the real outbound path (a) recognizes MCP-named compress
calls (#2970) and (b) keeps a consumed pair visible when a signed thinking
block leads its assistant run (#5864). Both divergences left exactly the
fragments the model can see un-harvested, so the exact-match
re-submission rejection missed them — most visibly for mcp__bili__compress
sessions, which the bare-name filter skipped entirely.

Pass isMcpBiliCompress + isStrandedProtectedPredecessor into the scan so
it mirrors the outbound hide decision. Read-only internal scan, try/catch
degrades to an empty set, rejection stays exact-match-only.

Reviewer drive-by fix for PR #5877 (findings review of #5864). Pinned by
tests/stub-resubmission-guard.test.ts and
tests/issue5864-signed-thinking-orphan.test.ts.
@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

接冲突完成 — PR #5877 已 rebase 到新 master 并推送,新 head e37b57e906。

七问

  1. 是什么问题:PR [PR] fix(kernel): keep compress pair visible when its predecessor is signed thinking #5877 再次与 base 分支冲突(merge state dirty)。master 自上一轮后大幅前进(259cd8767 → 1ee510c528,约 40+ 提交:batch8-wave8 大批合入、[PR] 0.1.214 Flush to disk twice before each forwarding round: skip the second no-op ingest when state is unchanged (#6780) | 0.1.214 每轮转发前落盘两次:状态没变时跳过第二次的空转 ingest(#6780) #6791/[PR] kernel: let content-free BLOCKED partners close their turn (#6709) #6754/[PR] fix(ci): intermediate pushes marked [ework:ci-held] no longer trigger PR CI (only the final push triggers a full run) | fix(ci): [ework:ci-held] 标记的中间 push 不再触发 PR CI(最终 push 唯一全量) #6784 等,其中 Version 0.214: compression issues still persist. The problem of old blocks failing to compress remains unresolved. | 0.214版本,压缩依旧存在问题,旧块无法压缩问题依旧存在 #6709 把 kernel 版本从 0.0.196 推进到 0.0.198)。
  2. 什么原因导致的:周期性复发——master 与 PR 分支独立推进。本轮特殊点同上一轮:master 自己的 kernel bump 已占用 0.0.197/0.0.198,本 PR 的版本行必须解到更高值。
  3. 影响范围与严重程度:纯合并状态问题,零运行时影响、零用户面影响;仅阻塞本 PR 合并。
  4. 怎么修复的:cherry-pick 3 个内容提交(kernel 修复本体 / 去多余 export / [严重]t2压缩被截断为200字 #2749 stub-resubmission 扫描修复)到新 master 上;唯一冲突是 kernel 版本行,解为 0.0.199(master 最新 0.0.198 + 1,Kernel Boundary「改 kernel/src 必须 bump」纪律)。独立标注 commit 重新生成 root + kernel 两份 lockfile(仅 3 行版本号 0.0.198→0.0.199,无其他漂移)。force-push(--force-with-lease,push 前 fetch 确认远端 head 无并发推送)。
  5. 是否有回归问题:无。本轮 cherry-pick 零文本冲突(除版本行外全部干净落位;master 窗口内对 stream.ts/compress.ts 等的改动与本 PR 区段不相交)。本地定向验证:typecheck 干净、unused-exports 门禁 clean、lockfile 用 CI 同款命令自校验幂等、本 PR 两个回归测试文件 10/10 通过。全量矩阵以推送头 CI 为准。
  6. 是否破坏缓存:不涉及——rebase 只换 base 与版本号,不改任何缓存/重试/游标逻辑。
  7. 是否改了设计方向 / 引入新配置:都没有。

当前实况:新 head e37b57e906 已推送并确认(PR head ref 实测)。镜像缓存尚未收录本头的 CI 结果(上次抓取仍是旧 head 2357a8938 的 30/30 全绿记录)。矩阵跑完前不断言绿;若再有红由后续唤醒跟进。

提醒:kernel 授权的 🔶 需要决策 仍在等 owner 拍板(上轮已列 gated diff 与选项),本 rebase 不改变该决策请求——gated diff 内容不变,仅版本号 0.0.197→0.0.199。

ci-check and others added 4 commits November 20, 2026 01:17
…ress pair

An extended-thinking Claude Code turn that calls compress right after a thinking block hit Anthropic 400 "the final block in an assistant message cannot be thinking": planReasoningDrop refuses to drop signed thinking (#1658/#1960) while hideConsumedCompressCalls hid the now-inactive compress call+result pair, collapsing the assistant message to [thinking].

Give the kernel an optional host-injected predicate (Config.strandedProtectedPredecessor); hideConsumedCompressCalls keeps every compress pair whose assistant-message run still holds a signed thinking / redacted_thinking core, so the signed block always round-trips with a tool_use sibling (#684 invariant). Unset predicate = byte-identical behavior; non-Anthropic wires never carry the signature, so they are unaffected. src/config.ts wires a signed-thinking predicate.

Tests (tests/issue5864): adjacent, intervening-text, multi-compress, redacted_thinking shapes; signed thinking byte-equality; unsigned control asserts the pair is hidden.

kernel-change: host cannot fix this - the pair-hiding decision lives inside the kernel's processTurn pipeline node, so the strand check must sit where the hide happens.

Fixes #5864
…-exports gate)

Same as earlier iterations of this PR: the predicate is referenced only
inside src/config.ts (bound into kernelConfig in loadOptions). Module-private
keeps behavior identical and satisfies scripts/check-unused-exports.mjs.
… scan

visibleSummaryStubs (src/stream.ts) harvests the display stubs the model
can see via hideConsumedCompressCalls, but called it with default
predicates while the real outbound path (a) recognizes MCP-named compress
calls (#2970) and (b) keeps a consumed pair visible when a signed thinking
block leads its assistant run (#5864). Both divergences left exactly the
fragments the model can see un-harvested, so the exact-match
re-submission rejection missed them — most visibly for mcp__bili__compress
sessions, which the bare-name filter skipped entirely.

Pass isMcpBiliCompress + isStrandedProtectedPredecessor into the scan so
it mirrors the outbound hide decision. Read-only internal scan, try/catch
degrades to an empty set, rejection stays exact-match-only.

Reviewer drive-by fix for PR #5877 (findings review of #5864). Pinned by
tests/stub-resubmission-guard.test.ts and
tests/issue5864-signed-thinking-orphan.test.ts.
@ranxianglei
ranxianglei force-pushed the 2026-11-07_fix-signed-thinking-strand-on-compress-hide branch from e37b57e to 26b39ae Compare November 19, 2026 17:18
@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

接冲突完成(第 4 次)— PR #5877 已 rebase 到新 master 并推送,新 head 26b39aedd47(无 ci-held 标记,即本分支的完整 CI 触发头)。

七问

  1. 是什么问题:PR [PR] fix(kernel): keep compress pair visible when its predecessor is signed thinking #5877 再次与 base 分支冲突(merge state dirty)。master 自上一轮后又前进(1ee510c528 → 6453feeeb84:[PR] perf: batch-1 hash dedup — anonymous-lane v1 skip + incremental wire-hash pair (#7149) #7151/[PR] perf: Batch 2+3-1 consolidated — fingerprint change detection + ledger zero-hash inheritance + persona deprecation annot | perf: 批次二+三-1 合订 — 指纹变化探测 + 台账零哈希继承 + persona 退役标注 (#7149) #7191 hash-cleanup 批次、[PR] kernel: move illegally-positioned directive-only systems to the trailing run (#7270) #7281 kernel directive-only precede-heal、[PR] compress.reasoning.tail: drop reasoning of any closed round in the protected window (#7144 follow-up) #7252 compress-reasoning-tail 等合入,kernel 版本 0.0.198 → 0.0.200——master 侧 [PR] compress.reasoning.tail: drop reasoning of any closed round in the protected window (#7144 follow-up) #7252 的 bump 解冲突时已占用 0.0.199)。
  2. 什么原因导致的:周期性复发(本 PR 生命周期内第 4 次)——master 与 PR 分支独立推进,version 行每次双方都改。本轮特殊点:本 PR 上一轮解出的 0.0.199 被 master 的 [PR] compress.reasoning.tail: drop reasoning of any closed round in the protected window (#7144 follow-up) #7252 撞掉,必须再上移。
  3. 影响范围与严重程度:纯合并状态问题,零运行时影响、零用户面影响;仅阻塞本 PR 合并。
  4. 怎么修复的:cherry-pick 3 个内容提交(kernel 修复本体 / 去多余 export / [严重]t2压缩被截断为200字 #2749 stub-resubmission 扫描修复)到新 master 上;唯一冲突是 kernel 版本行,解为 0.0.201(master 最新 0.0.200 + 1)。独立标注 commit 重新生成 root + kernel 两份 lockfile(仅 3 行版本号 0.0.200→0.0.201,无其他漂移)。force-push(--force-with-lease,push 前 fetch 确认远端 head 无并发推送)。按 CI-hold 纪律:本次为最终头推送,不带 [ework:ci-held]。
  5. 是否有回归问题:无。本轮 cherry-pick 零文本冲突(除版本行外全部干净落位)。本地定向验证:typecheck 干净、unused-exports 门禁 clean、lockfile 用 CI 同款命令自校验幂等、本 PR 两个回归测试文件 10/10 通过。全量矩阵以推送头 CI 为准。
  6. 是否破坏缓存:不涉及——rebase 只换 base 与版本号,不改任何缓存/重试/游标逻辑。
  7. 是否改了设计方向 / 引入新配置:都没有。

当前实况:新 head 26b39aedd47 已推送并确认(PR head ref 实测)。镜像缓存尚未收录本头 CI(上次抓取仍是旧 head e37b57e906 的 30/30 全绿记录)。矩阵跑完前不断言绿。

提醒:kernel 授权的 🔶 需要决策 仍在等 owner 拍板——gated diff 内容不变,仅版本号 0.0.199→0.0.201。另:本 PR 已 4 次接冲突,若 owner 近期打算合入,建议优先处理,减少 rebase 空转。

@ranxianglei ranxianglei left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Re-review of rebased head 26b39aedd (round 3) — findings only, verdict unchanged.

The branch was rebased onto current master again (base 259cd87674 → 6453feeeb84, a 688-commit window spanning releases v0.1.214/215/216); all four commits re-hashed. Verified the rebase is content-clean:

  • PR diff vs its base: the PR's own +/- lines are byte-identical to round 2, except the kernel version bump is now 0.0.200 → 0.0.201 (master advanced the kernel four more versions). Verified by diff-of-diffs: only version lines and hunk offsets differ; two context lines around the src/loop/core.ts hunk moved with master's own adjacent changes (proxyToolResultFailed, replaceMessages) — not PR changes.
  • Master-window changes to the PR's files are orthogonal (file by file):
    • kernel/src/hide-consumed.ts — UNCHANGED on master in the window; the guard at the hide decision point and my round-1 run-semantics verification hold verbatim.
    • kernel/src/wire/anthropic.ts — #7270 directive-only-system heal adjustment + new healUnpairedServerToolBlocks backstop. Both are post-render passes: the coreToAnthropic grouping loop (consecutive same-role cores → one wire message, the boundary the guard's "run" mirrors) is untouched, and the new heal only rewrites system messages and server_tool_use/*_tool_result blocks — plain tool_use/tool_result (the compress pair) are explicitly never touched. No interaction with the guard. (One adjacent observation on the new heal itself — see the 🔶 comment below.)
    • kernel/src/compress.ts / kernel/src/types.ts — #6928 removal of the #4521 statusLine refresh line; orthogonal to hideCompressCallsNode (hunk offsets shift consistently).
    • src/server.ts — hasSignedThinkingBlock (now :2419) and the planReasoningDrop signed gate (:2455) UNCHANGED; the window's deltas (#7022 loopback classification, process-handler install refactor, preflight egress-fuse probe block + image accounting) do not touch the predicate or its wiring.
    • src/config.ts — new opt-in reasoningDrop.tail (default false, implemented in src/reasoning-drop.ts:53) + pi-subagents notifyStructured; the PR's isStrandedProtectedPredecessor export (:1667) and loadOptions kernelConfig wiring (:1801) intact.
    • src/stream.ts — all window hunks fall outside the visibleSummaryStubs area (window hunks jump from :588 to :1131; the scanner sits at :919); my round-1 drive-by fix intact.
    • src/loop/core.ts — window adds replaceMessages (identity-preserving splice) and proxyToolResultFailed adjacent to the hide call; the PR's 4th-argument pass-through intact (:1656).
  • Re-verified locally on 26b39aedd: issue5864 + stub-guard 10/10, full kernel suite 1645/1645, bili reasoning/verif family 74/74, typecheck clean. CI green on 26b39aedd (all check runs success/skipped, 0 open).

No new findings in the PR's own diff; no blocking findings. The kernel human tier still gates the merge (see the 🔶 需要决策 comment; head ref updated, plus one adjacent master-side observation routed there as a decision item).

八问(中文,第 3 轮 — 与第 1/2 轮一致,仅版本号与窗口核查更新)

  1. 是什么问题:同前(signed thinking + compress 同回合后,出站 assistant 消息塌缩为单个 thinking 块 → Anthropic 400,会话当场不可用)。
  2. 什么原因导致的:同前(reasoning-drop 侧绝不丢 signed thinking × kernel 隐藏侧独立藏掉已消费对,两个保守机制互不告知,交集产生非法线形)。
  3. 影响范围与严重程度:同前(plugin 模式 × Anthropic wire × extended thinking × 同一 run 内 signed thinking 与已消费 compress 对;报告者实测 ~19%,命中即 400,完全不可用)。
  4. 怎么修复的:同前(kernel 隐藏决策点加可选宿主端口 strandedProtectedPredecessor,同 run 前置受保护块时强制保留对可见;端口不设定时逐字节不变)。
  5. 是否有回归问题:无(同前;本轮另逐文件核对了 688 提交的 master 窗口:hide-consumed.ts 零改动,wire/anthropic.ts 新增 heal 与 compress 对正交,谓词与接线原样,无新交互)。
  6. 是否破坏缓存:不(同前)。
  7. 是否改了设计方向:没有(同前)。
  8. 是否引入了新的配置:没有(同前)。

Verdict: no blocking findings; still findings-only — kernel PRs sit at the human-only tier.

@ranxianglei

Copy link
Copy Markdown
Owner Author

🔶 需要决策
(ai: vllm-qwen/qwen3.8-27b)

1) Head update — authorization request stands. The branch was rebased onto current master: head is now 26b39aedd (supersedes 2357a89386; content identical, kernel version now 0.0.200 → 0.0.201). Round-3 re-review posted above: rebase content-clean, the 688-commit master window is orthogonal to the PR file by file, targeted suites green, CI fully green (all check runs success/skipped). Owner approve/reject as the human kernel reviewer — gated diff: kernel/src/hide-consumed.ts, kernel/src/types.ts, kernel/src/compress.ts, kernel/package.json (+ lockfiles).

2) Adjacent master-side observation (same symptom as #5864, different mechanism) — needs your call. While auditing the master window I found a second producer of the exact 400 this PR fixes ("the final block in an assistant message cannot be thinking"), in the window's NEW code, not in this PR's diff:

Suggested handling, per the same-symptom rule (owner policy 2026-10-13: same user-visible symptom → one issue): track it as a mechanism-level sub-defect under #5864, not a new issue. Suggested fix shape: when the heal drops the last non-thinking block of a message, append the existing placeholder text block ("(server tool exchange folded)") so a thinking block is never left final — small, mirrors the function's own emptied-message handling, but it is kernel wire semantics, so it is your call where and when it ships (separate PR; I left all code untouched here).

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[bot] 第 3 轮审核完成(PR 再次 rebase 到最新 master 6453fee,head 26b39ae,kernel 版本 0.0.200→0.0.201):diff-of-diffs 核对 PR 自身改动与第 2 轮逐字节一致(仅版本号与 hunk 偏移);688 提交的 master 窗口逐文件正交——hide-consumed.ts 零改动,wire/anthropic.ts 新增的 server-tool heal 与 compress 对显式不相交,谓词/接线/scanner 全部原样。本地复验全绿(10/10 + kernel 1645/1645 + 74/74 + typecheck),CI 全绿(35 success/15 skipped)。无新阻塞发现。另有一个 master 侧观察按 🔶 需要决策 上报:窗口新增的 healUnpairedServerToolBlocks 在 thinking 与 server-tool 孤儿块同消息时可能产出「thinking 收尾」消息——与本 PR 修的 #5864 同一 400 症状、不同机制,建议按同症状归并规则挂到 #5864 清单,修法已给出(kernel 档,待 owner 拍板)。第 3 轮 findings-only review + 🔶 head 更新评论已发,仍等 owner 人工批准档。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

Status — this is a mirror echo of the round-3 decision request; no new owner input since 2026-11-19 17:59Z. State re-verified live today (2026-11-20):

  • Head 26b39aedd unchanged; base master 6453feeeb unchanged (ancestor of head, merge state clean).
  • CI: 30/30 completed, 0 failed (15 success + 15 env-gated skips).
  • mergeable_state: blocked — solely the human-only kernel tier (Kernel Boundary).

Action taken: the pending kernel authorization has been hanging in-thread for 10 days (🔶 requests on 11-10, 11-12, 11-19 — no response). Per the decision-escalation and authorization-gate policies, it is now escalated to a dedicated issue: #7331 — "kernel authorization request: PR #5877 (fix #5864: 400 'final block cannot be thinking' after compress) — approve or reject" (p1 intent; the mirror shim does not implement the labels endpoint, so the p1/bug/scope/kernel/claude-code labels could not be applied — intent recorded in the issue body).

That issue carries the full decision record:

Context note: per the owner's 2026-11-12 ruling, #5864 is folded into the wire-fidelity aggregation #6454; the aggregation thread's own conclusion (floor 10/12) is that #5877 stays the designated independent kernel PR for that member — a kernel change cannot be absorbed into a host PR (kernel-guard CI). So the only gate on this PR remains your sign-off.

The in-thread 🔶 request is superseded by #7331 — I will not re-post it on each rebase echo. Standing down pending your decision; no self-approval, no PR-body edits.

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.

[claude] 400 "final block in an assistant message cannot be thinking" after a compress call that follows a thinking block

1 participant