You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
kernel authorization request: emergency-truncate acts on unprovenanced evidence and ignores protected tools (#5500 family) #5693
Activity
ranxianglei commentedon Nov 4, 2026
🔶 需要决策
(ai: vllm-qwen/qwen3.8-27b)
查重:不重复。 本单即 #5500 分析中按「同节点同失败域」政策立项的 kernel 授权申请;PR #5501(commit 8222bc4)的提交信息已注明 "Kernel-side residuals … tracked in a separate kernel authorization request",指向本单。#5217/#5255 是同节点近亲但机制不同(latch 在 BLOCKED sentinel ref 下存损坏参数),#3691 是 latch 设计来源,均非重复。
标签: bug, p1, scope/kernel, needs-decision(缺陷类;破坏已交付视图属数据丢失类一律 p1;改动全部在 kernel/ 下;跨车道缺陷不打宿主车道标签;等待 owner 拍板)。
验证结论(已在当前 master c9ba485 上逐条核对代码):两个子缺陷都成立。
ProcessTurnInput(kernel/src/compress.ts:108)只有tokenCount: number,没有证据等级字段;emergencyTruncateNode(compress.ts:1497-1635)对任何 ≥truncate.threshold × modelContextLimit的读数直接执行破坏性裁剪,裁剪结果写入emergencyTruncateLatch,只在成功折叠时重置(compress.ts:873)——一次误读就让交付视图被持续改写直到下次折叠。host 侧effectiveTokenCount()(src/server.ts:2873)已经返回{ tokens, source: "usage" | "estimate" },透传可行。truncateLargeToolOutputs(kernel/src/truncate-tools.ts:38-149)的候选选择只查 recency / 标记缺失 / 尺寸三栏,TruncateOptions没有任何保护入口;而折叠路径(recommend/crush/ccr/compress/absorb)全部经kernel/src/protected.ts应用保护谓词(isMessageProtectedWithPairing/collectProtectedToolCallIds),ALWAYS_PROTECTED_TOOLS = ["compress", "acp_rule"](protected.ts:18)。应急裁剪与折叠路径的保护面不对称属实——真溢出下保留区之外的 compress/acp_rule 调用或用户配置的 protectedTools 也可能被裁,违反 Kernel Boundary 规则 6(protected-tool hard exclusion)。八问(决策请求版):
ProcessTurnInput契约里没有证据等级字段,kernel 分不清「上游报告的 usage」和「host 估算」;②truncate-tools.ts 是独立于折叠路径实现的候选选择器,实现时没接入 protected.ts 的保护谓词(两条路径演进不同步)。ProcessTurnInput增可选字段tokenCountSource?: "usage" | "estimate",estimate + 低阈值 usage 锚点在场时拒绝裁剪(记日志;nudge 路径不动,保守方向保留);②TruncateOptions增保护入口,findCandidates 跳过受保护候选(复用 collectProtectedToolCallIds + isMessageProtectedWithPairing)。待决问题:选哪个?
推荐 A:拆开批只会让第二次 kernel 变更再走一遍完整审批周期,且 B/C 都留下已知损伤路径。
不决定的默认行为:我停手等待,不动 kernel/。PR #5501(host 侧 C6 修复)不依赖本决策、可独立推进合入,除非另有指示我不介入。