Repository navigation
[PR] fix: print ascending ref pairs on all nudge surfaces after a generation reset - #5681
ranxianglei wants to merge 13 commits into
Conversation
#5680) The armed-but-silent nudge window prints compressible-range endpoints verbatim into the model's context every turn. After a session-generation reset the ledger mixes eras, so a boundary-straddling group stores startRef > endRef and the line reads like corruption (m00512-m00187), making the model skip compression for the rest of the session. Canonicalize the offered pairs with orderedRefPair at the render site - the #2168/#887 doctrine pinned in kernel/tests/reversed-ranges.test.ts: direction is notational, generation-side swaps would detach labels from positions and break formatRanges' position-based merging. Adds a mixed-era processTurn statusLine test (non-vacuity asserted) and a double-swap pin over applyCompression in both label orders. Bumps acp-kernel 0.0.180 -> 0.0.181.
…ipts (#5680) Same mechanism as the statusLine fix: positional span endpoints can be numerically descending after a generation reset. Canonicalize at the render sites with orderedRefPair and make resolveDecisionRange's containment test direction-aware - it was unsatisfiable for inverted ranges and silently dropped the model's chosen span, falling back to the largest range. Surfaces: buildDecisionPrompt span list (model copies spans verbatim into its JSON answer), resolveDecisionRange's returned span (consumed by directive text in all four prepare lanes), describeUncoveredRuns listing (compress receipts + acp_status). Monotonic sessions are byte-identical.
📦 Built Package ArtifactBranch: Latest build — install this exact versionnpm install -g billion-context@0.0.10980-pr.5681.cbae485This exact version is immutable and reproducible. The rolling Recent builds (commit → version)
Download artifact
tar xzf billion-context-pr5681.tgz
npm install -g packageInstall instructions are refreshed on each push. |
CI lock-sync regenerates both lockfiles and diffs them; the kernel version bump had left them at 0.0.180.
(ai: vllm-qwen/qwen3.8-27b) 结论先行:lock-sync 已经在当前 PR head( 按结构化八问答一遍:
收工判定:lock-sync 已绿(本地用 CI 同款命令确证零 diff;在途 run |
…est-range fallback review follow-up: in the #5680 fixture the reversed range was also the largest, so a resolveDecisionRange regression to always-fallback would still pass. Add a larger non-reversed range and assert per-range containment both ways.
[bot] 🏷 (ai: vllm-qwen/qwen3.8-27b) 查重:不重复。全仓 open PR/issue 中引用 #5680 的只有本 PR(#5681);倒序 ref 渲染家族此前的修复是 #2168/#887(acp_status/formatRanges/block spans),本 PR 补的是该家族剩下的三个模型可见面,机制同源、症状同面,无并行在途工作。 标签:bug / dsh / scope/wiring / p2 —— 缺陷类;事故现场是 DSH web 宿主;主战场是 nudge 模型可见面(协议接线);能用但有明显问题(压缩被连续跳过、preflight 兜底才恢复),会话未受损,定 p2。 审核方式(独立重审,非照抄 PR 描述):拉取分支逐文件读 diff(master..head,6 文件 +186/−16),对 PR 声称的每个审计结论都到代码里复核过;本地定向验证 + 负对照;另推了一个测试补强 commit(见下)。 结构化八问
kernel 部分
本地验证与一处测试补强
范围外(已在 issue 线程登记,不另开单)
收工判定代码、测试、披露均达标,CI 绿即可合(当前 head 的 run 进行中:5 success / 13 skipped / 0 fail,余 in-progress;我的测试 commit 触发新一轮)。kernel 部分按线程既定默认 merge = approval,请 owner 知悉后放行。 |
ranxianglei
left a comment
There was a problem hiding this comment.
(ai: vllm-qwen/qwen3.8-27b)
结论先行:代码质量干净、未发现阻塞问题;但按 Kernel Boundary 门禁不能 APPROVE——本 PR 触碰 kernel/ 且携带 kernel-change 声明,已走 🔶 需要决策(见下方跟进评论)。
① 原 issue 与方向(#5680)
issue 侧 triage 已钉死根因:generation boundary reset 后新回合铸造的 ref 编号小于旧尾巴,buildCompressibleRanges 的位置端点标签产出倒挂对;下游两个纯展示面(kernel statusLine、host 的 buildDecisionPrompt/uncovered receipts)+ 一个逻辑点(resolveDecisionRange 的字符串包含判定)。本 PR 方向 = 渲染处规范化 + 包含判定改数值 min/max,不动标签铸造本身——与仓库既有教义一致(#2168/#887 block span 在单一源规范化、#310/#1001 折叠定位以位置为准、模型所见即线上所呈现逐字成立),即 issue 线程推荐方案 A。拒绝 viableRanges() 单点修的理由成立:statusLine 在 kernel 内,host 侧够不着。
② 回归审查(diff 触碰路径的既有行为清点)
- 单调/同代会话的 statusLine 输出:字节不变——
orderedRefPair在 start ≤ end 时是 no-op,仅交换端点对;格式串其余不变。 - apply/fold 路径:本 PR 未触碰。双重规范化(host 侧标签排序 + kernel
resolveBoundaries位置索引排序)无损相消,由新增 kernel 测试用两种标签顺序各钉一次,断言折叠出的directMessageIds恰为所呈现 span。 - block span 渲染(acp_status 行、error receipts):已由上游
resolveBlockSpan规范化;其余所有裸${startRef}–${endRef}站点逐个审过——均为诊断日志(deps.log/ctx.log)或规范化之后的 note,不进模型线。 - resolveDecisionRange fallback(最大范围)语义:保持,仅返回标签规范化;包含判定从字符串比较改数值 min/max(字符串比较会误判 m00002 vs m00505),单调递增会话不受影响。
- UncoveredRun 端点:纯展示(消费方是 acp-status.ts prose 与 stream.ts note),无逻辑消费。
- 前缀缓存/重试/增量游标:无影响——statusLine 与 nudge 都是 ephemeral trailing user message,永不持久化;decision sidecar 为本地调用。
- 行为变更披露:PR 正文已给出(三处展示面降序→升序,单调会话不变),合规。
③ 代码审查
orderedRefPair(kernel/src/refs.ts:48-56):仅当 endNum < startNum 时交换,不可解析输入原样通过——最小且正确。resolveDecisionRange(src/nudge-decide.ts):命中路径与 fallback 路径都返回规范化标签,模型不会再见到降序对;单消费方声明成立——已核实 span 只流入buildDirectiveText(四个 prepare 车道),下游解析在 kernel 内按位置进行。
④ 测试有效性
- 三个新测试是真测试:statusLine 测试先断言 fixture 确实产出了倒挂 range(非空守卫)再断言升序 +
assertAllSpansAscending;apply 测试两种标签顺序都跑并钉死确切位置 span;decide 测试刻意放入一个「倒挂但最大」的 range,使包含命中可与 fallback 区分。 - 负控制(本地执行):把各自修复点回退到 master,对应新测试立即失败 → 断言有牙,能抓住回归。
- CI(镜像缓存):30 checks,0 failed,0 pending;两条 cancelled 为 lock-sync 重推取代的 e2e/dsh lane。
⑤ diff 整洁度
8 文件,+198/−19,每行都与 #5680 相关;版本 bump + lockfile 同步独立成 commit(符合 kernel 版本纪律);goldens 未动(正确——无常量/提示词/schema 变更)。小瑕疵:PR 正文「2 commits, 6 files」已过时(实际 4 commits / 8 files,后两者为 lock-sync 与测试加强,线程评论已说明)——不影响判定。
判定:代码层面可合并;唯一阻塞项是 kernel 授权。 按 Kernel Boundary(kernel/ 变更需 owner 批准 + human-only review tier),我不替作者自批;见下方 🔶 评论。
|
🔶 需要决策 (ai: vllm-qwen/qwen3.8-27b) 本 PR 触碰 被门禁的 diff(PR #5681,commit f1afecb + 6f8a101):
审核结论:代码质量干净、无阻塞发现(详见上方 review);唯一阻塞项即本授权。 选项(与 #5680 讨论线程所列一致):
|
[bot] 🏷 (ai: vllm-qwen/qwen3.8-27b) 状态汇总:PR #5681 审核完成——代码质量干净(三处展示面升序规范化 + 包含判定改数值比较;测试负控制本地验证有牙、CI 全绿、回归审查无发现),唯一阻塞项是 kernel 授权。已发 findings-only review + 🔶 需要决策评论(选项 A 照准合入 / B 剥离 kernel commit)+ needs-decision 标签。刚转发的评论是我自己 🔶 评论的同步回显(upstream-sync 标记),无新决策内容;仍等 owner 裁决。 |
# Conflicts: # kernel/package-lock.json # kernel/package.json # package-lock.json
…cts) Merging origin/master (58a8796) into the reversed-ref-nudge-display branch. All 4 conflicts resolved: - kernel/src/compress.ts: union of both import lists (this branch added orderedRefPair for #5680; master added refToIndex); both symbols are used in-file and exported from refs.ts. - kernel/package.json: 0.0.192 (master) -> 0.0.193 (max+1; this branch carries the #5680 orderedRefPair kernel/src delta on top of master's kernel). - package-lock.json + kernel/package-lock.json: regenerated via npm install --package-lock-only (idempotent/regen-clean = lock-sync green; root packages[kernel] now tracks acp-kernel 0.0.193).
[bot] 🏷 Base-branch conflict resolved & pushed. Merged What I did this run:
八问:
判定:冲突已解除并推送,lock-sync 经本地精确复验通过,CI 在最新 head 上无失败项;待 CI 全绿后可由 owner 合并。 |
(ai: vllm-qwen/qwen3.8-27b) Live re-check of this "dirty" blocker — already resolved, no new work needed. This dispatch re-reported the same base-branch conflict I resolved and pushed in the previous run (
Nothing left to merge or rebase — forcing another sync commit would be a redundant no-op that only churns the diff. No code changed this run, no force-push performed (server head already equals local head), no design decision required. Note: the prior turn stalled right before posting its report (process restarted after ~34 min idle); this message completes it. Nothing is blocked. 八问(中文)
判定:冲突阻塞已清除( |
ranxianglei
left a comment
There was a problem hiding this comment.
(ai: vllm-qwen/qwen3.8-27b)
Review(第 2 轮,head c20b692)
本轮审 master-sync 后的新 head。与上轮所审 bb72fa2 相比:作者把 master 合入分支(base 现为当前 master 顶 58a8796,无冲突残留),并新增一个 kernel commit 1b3a953578(DEAD-ref receipt 一行措辞修正);其余代码与上轮逐字相同。对当前 master 的完整 delta:8 文件,+199/−20。
① 原 issue 与方向(#5680)
方向确认:会话代重置后 ref 从 m00001 重新编号,positional span 端点可存成 startRef>endRef;三处模型可见展示面原样打印降序对,模型读成损坏而跳过压缩(生产事故:健康 1M 窗口会话连续 ~15 轮跳过)。修法 = 渲染点用既有 orderedRefPair 规范化(direction-is-NOTATIONAL 教义,#2168/#887),不改生成侧、不动 apply 路径。方向正确,打到了根因。
② 回归审查(既有行为清点)
| 既有行为 | 结论 |
|---|---|
| apply/fold 路径(resolveBoundaries 位置解析 + 位置交换 #310) | 未触碰;host normalizeRangeOrder(#1001)与 kernel 位置交换合成无损——新测试在两种标签顺序下各钉一次 directMessageIds |
| 单调 ref 会话的输出 | 字节级不变(orderedRefPair 为 no-op),已披露 |
| 其余 span 展示点(block spans #2168、preflight 对 #1001、诊断日志行) | 逐一审计:已规范化或纯诊断,无需改动 |
| resolveDecisionRange 语义 | 包含判定从字符串比较改为数值 min/max——这是同族第四处潜在缺陷(反转区间使包含判定不可满足,静默回落最大区间);单一消费方(4 个 prepare 车道的 directive 文本),下游解析位置化,不受影响 |
| #2362 dead-ref tombstone 机制 | 新 commit 只改 receipt 措辞:旧文称死 ref「now or later」永不压缩,与 tombstone-with-clear 机制矛盾(compress.ts:444-447 的消息重现即解除,dead-refs.test.ts 两例钉住该行为);新措辞与受测行为一致,纯文本 |
| nudge 节奏/阈值/输出格式 | 未动(flat 50K 等常量未触碰,golden 未变) |
③ 代码审查
orderedRefPair(kernel/src/refs.ts:48-56):纯函数,仅当两侧可解析且 end<start 时交换,不可解析侧透传——安全面干净。- statusLine(kernel/src/compress.ts ~1053-1068):armed-but-silent 窗内展示层映射,格式其余不变。
- nudge-decide / uncovered:见上表;注释解释 why(generation-reset 形状),与代码事实相符。
- 合并冲突解(c20b692):import 并集(orderedRefPair 与 master 的 refToIndex 均在文件中使用且自 refs.ts 导出)、版本 max+1、lockfile 重生成——commit message 描述与实际 diff 一致。
无阻塞发现。
④ 测试有效性
- kernel/tests/reversed-ranges.test.ts +2:statusLine 例断言非空性(fixture 必须产生存储的反转对)+ 升序匹配;apply 例在两种标签顺序下钉「恰好折叠所呈现的位置 span」——双交换任一半回归都会被抓。旧 head 已做负控制(逐一还原修复文件 → 对应新测试失败),测试有牙。
- tests/nudge-decide.test.ts +1:刻意让反转区间同时是最大区间,使「包含命中」与「最大区间回落」可区分;另有按区间包含、回落规范化的断言。
- 新 head 本地定向跑:kernel reversed-ranges 7/7、dead-refs 6/6、host nudge-decide+issue4331+fix-1001 27/27;CI 30/30 全绿(含 lock-sync)。
⑤ diff 整洁度
8 文件每一行都与本 PR 目的相关;无跑题改动、无空白 churn、无生成物。golden 未变(正确——未触碰任何常量/prompt/schema)。
结论
代码层面可合并;唯一阻塞项仍是 kernel 授权(见下方 🔶 评论)。
结构化八问
- 是什么问题:会话代重置后,模型可见面把 ref 对打印成降序(startRef>endRef),模型误读为损坏而持续跳过压缩;另有第四处同族缺陷——反转区间使决策端包含判定不可满足、静默回落到最大区间。
- 什么原因导致的:positional span 端点标签按「组首/组尾 ref」原样存储,代重置后编号不再随位置单调;展示层照抄存储值,包含判定假设 lo-hi 顺序。
- 影响范围与严重程度:触发条件 = 会话中途发生代重置(换模型/upstream、代理重启)且进入 armed-but-silent nudge 窗;后果 = 压缩饥饿(上下文只增不减、成本上涨),会话仍可用——特定条件下有问题的体验级缺陷(p2;若按「压缩是核心承诺」口径可升 p1,以 issue 线程定级为准)。
- 怎么修复的:渲染点规范化——所有模型可见展示面经 orderedRefPair 归一成升序,direction 视为记法而非语义;包含判定改数值 min/max;生成侧与 apply 路径零改动。
- 是否有回归问题:未发现——apply 路径逐字未动,单调会话字节级不变,兄弟展示点逐一审计;唯一行为变化是「反转区间的包含判定变得可满足」,其本身即缺陷修复,已在 PR 披露。
- 是否破坏缓存:不涉及(未触碰缓存键/游标/增量状态)。
- 是否改了设计方向:不涉及(沿用既定 render-site canonicalization 教义)。
- 是否引入了新的配置:不涉及。
|
🔶 需要决策 (ai: vllm-qwen/qwen3.8-27b) head 已更新至 c20b692(作者合入当前 master 并新增一行 kernel receipt 措辞修正),本评论取代上一轮的 🔶 请求;needs-decision 标签保持不变。 本 PR 触碰 被门禁的 diff(PR #5681 @ c20b692 vs master 58a8796;commits f1afecb、1b3a953578、6f8a101e9):
审核结论:代码质量干净、无阻塞发现(详见上方第 2 轮 review);唯一阻塞项即本授权。 选项:
|
(ai: vllm-qwen/qwen3.8-27b) CI-engineer status — mechanical side complete and green; only the owner's kernel-authorization call remains. Re-verified against LIVE sources this run (not memory):
Per policy I'm standing down on this PR until you decide: I will not self-authorize, not edit the PR body, and not open a parallel issue. Restating the two paths for convenience:
Waiting on your A/B. 八问(中文)
判定:工程侧闭环完成且全绿,等 owner 在 A/B 中拍板;A 为推荐项。 |
…n/lockfile drift)
(ai: vllm-qwen/qwen3.8-27b) This run resolved a real base-branch conflict (the 3rd "dirty" trigger — the two earlier ones were stale async-recompute false alarms; this one was genuine). Verified live: GitHub reported What I did:
Verification limits (stated honestly): targeted coherence checked locally ( Pushed: fast-forward Unchanged: the parked kernel-authorization decision (options A/B) is still awaiting the owner. This sync-conflict resolution deliberately does not satisfy or pre-empt that gate — it only keeps the branch mergeable under either choice. 八问:
判定:冲突已解决并推送(fast-forward,无强推),等待 CI 对新 head 出结果;内核授权 A/B 仍待 owner 拍板(推荐 A:整体合并,形成完整闭环)。 |
[bot] 🏷 This run resolved the real base-branch conflict on PR #5681 (this mirror). The 3rd "dirty" trigger was genuine — master advanced ~35 commits past the PR's merge-base. What I did:
Honest limits: full local typecheck/build could not finish because this shared worktree lacks the Unchanged: the parked kernel-authorization decision (options A/B) is still awaiting the owner. This sync-conflict fix deliberately does not satisfy or pre-empt that gate — it only keeps the branch mergeable under either choice. 八问:
判定:冲突已解决并推送(fast-forward,无强推),等待 CI 对新 head 出结果;内核授权 A/B 仍待 owner 拍板(推荐 A:整体合并,形成完整闭环)。 |
[bot] 🏷 Live-verified this 4th "dirty" trigger — it is stale (async-recompute lag), same class as the earlier false alarms. No code change this run. What I checked live:
So there is nothing to rebase or re-merge. Action taken: verification only. Unchanged: the parked kernel-authorization decision (options A/B) still awaits the owner (A recommended). That is the only thing standing between this branch and merge right now. 八问:
判定:本触发为过期误报,无需处理;推进合并只差 owner 对内核授权 A/B 拍板(推荐 A)。 |
ranxianglei
left a comment
There was a problem hiding this comment.
(ai: vllm-qwen/qwen3.8-27b)
Review (round 3) — head 3c8e1b30f vs master c26c31ace4
Delta since my round-2 review: a pure master re-sync. The only new commit on the PR side is merge 3c8e1b30fe ("sync origin/master into PR #5681 branch"), which pulled master from 58a87962 to its current tip c26c31ace4. I diffed the PR's content against BOTH masters and confirmed the delta is byte-identical to what I verified in round 2, except for two mechanical consequences of the sync:
- kernel version bump now reads 0.0.195 → 0.0.196 (master moved 0.0.192 → 0.0.195 during the window; max+1 discipline correctly followed);
- hunk line offsets shifted +3 in
kernel/src/compress.ts(master added lines above both hunks).
No code change, no dropped hunk, no conflict-resolution drift. The sync window itself was heavy on kernel side (#6132 removed the fold-point relocation path, #5765 landed the blockOps gate, …); the PR's two compress.ts hunks apply cleanly on top and I see no interaction with those changes.
Re-verification at this exact head (not carried over):
- local targeted suites after rebuilding the PR-head kernel dist:
kernel/tests/reversed-ranges.test.ts+kernel/tests/dead-refs.test.ts= 13/13 pass;tests/nudge-decide.test.ts+tests/issue4331-uncovered-history.test.ts+tests/fix-1001-history-rewrite.test.ts= 27/27 pass; - CI mirror cache: 30 checks, 0 failed, 0 pending — fully green.
Round-2 findings all stand unchanged (display-only canonicalization, apply path untouched, double-swap lossless cancellation pinned by tests, negative-control teeth verified, house conventions clean). No new small findings; nothing to fix on the spot.
八问(中文,供人工复核)
- 是什么问题:会话代际重置后 ref 编号从 m00001 重启,压缩建议面(nudge 提示词、statusLine、uncovered receipts)会把倒序区间(m00042–m00005)原样打给模型,模型误判为损坏而跳过压缩(实测 dsh web 会话连跳约 15 轮)。
- 什么原因导致的:各展示面直接拼接存储的 startRef/endRef,而存储值在跨代边界上是位置语义(start>end 合法);缺一个「打印前按数值升序规范化」的统一出口。
- 影响范围与严重程度:所有插件模式宿主(回传完整历史者)在发生代际重置后的 nudge 表面;功能性问题——该窗口的压缩被模型主动跳过,上下文持续增长直至其他机制兜底。
- 怎么修复的:新增纯函数
orderedRefPair(仅当 endRef 数值 < startRef 时交换),三个展示面统一走它;resolveDecisionRange 的包含判定同步改为 min/max 数值比较。折叠执行路径(resolveBoundaries 位置索引 + host normalizeRangeOrder 交换)完全未动,双交换无损抵消由新测试钉死。 - 是否有回归问题:无。单调会话字节级不变(升序对已是恒等);非 plugin 路径不经过这些展示面;golden 文件无需变更且确实未动;本窗口 master 侧大改(#6132/#5765)与本 PR 无交互,合并树定向测试全绿。
- 是否破坏缓存:不影响缓存键/重试/游标/去重;prompt 文本变化仅发生在原本就异常的降序场景。
- 是否改了设计方向:不改。展示层规范化,身份/应用语义维持「位置优先」既有方向。
- 是否引入了新的配置:无新配置/env/默认值。
结论:代码层面可合并;唯一阻塞项是 kernel 授权(kernel 触碰 + kernel-change 声明 → 需 owner 批准 + human-only review tier),见下方 🔶 请求。
|
🔶 需要决策 (ai: vllm-qwen/qwen3.8-27b) head 已更新至 本 PR 触碰 被门禁的 diff(PR #5681 @
选项:
|
[bot] 🏷 (ai: vllm-qwen/qwen3.8-27b) PR #5681 round-3 review done at new head |
[bot] 🏷 (先澄清:本条虽由平台标记为 @ranxianglei,但内容带 作为本 PR 的 CI 工程师,实时核验结果与上述升级一致:
按 owner policy 2026-11-01 与授权卡点规则:内核授权 A/B 属 owner 决策,不由我代为批准、不擅改 PR 正文、不开新 issue。 我负责的冲突同步已完成;此升级挂起等待 owner 拍板,我在此停手、不再触碰该 PR。 给 owner 的选项(重申,推荐 A):
八问(CI 工程师视角,本轮无代码改动)
判定:冲突已清、CI 绿,推进合并只差 owner 对内核授权的 A/B 拍板(推荐 A)。我停手等待,不做任何自我授权或正文改动。 |
The per-turn [ACP status] statusLine is the one offer surface built inside
the kernel, so the dead-ref filter every host offer surface applies never
reached it: it advertised the very ranges the gate then refused ("recorded
as DEAD"), and the model looped re-issuing them until the breaker tripped.
The hole-break in buildCompressibleRanges (#3192/#3205) only catches a dead
ref strictly between two consecutive compressible messages (endpoint-
exclusive); a dead ref at a range endpoint still leaked into the line.
Add filterDeadRefRanges (canonicalizes the span first, #5680) and apply it
at the statusLine site: drop any offered range whose span contains a dead
ref, and go silent when none are left.
kernel-change: close the #6661 dead-ref leak on the statusLine offer
surface (third surface of the #3192 family); the filter is the established
multi-surface contract this site provably missed.
…t, bump kernel 0.0.197->0.0.198)
[bot] 🏷 This 6th "dirty" trigger was real (not stale like the previous ones) — the ~3-day gap let master advance 297 commits past this PR's merge-base. Resolved and pushed. What I found live:
What I did:
Pushed: fast-forward Honest limits: full local typecheck/build is blocked because this shared worktree lacks the Unchanged: the parked kernel-authorization decision (options A/B) still awaits the owner. This sync-conflict fix deliberately does not satisfy or pre-empt that gate. 八问:
判定:真实冲突已解决并推送(fast-forward,无强推),等待 CI 对新 head 出结果;内核授权 A/B 仍待 owner 拍板(推荐 A)。 |
ranxianglei
left a comment
There was a problem hiding this comment.
(ai: vllm-qwen/qwen3.8-27b)
Review (round 4) — head a6d8158ed2 vs master f21b601893
Delta since my round-3 review: one new kernel commit + another master sync.
62f75db496"kernel: filter dead refs out of the per-turn statusLine offer (#6661)" — a second, adjacent defect in the same surface family, now folded into this PR (body updated toFixes #5680, #6661; a thread comment from 2026-11-15 documents that this commit was pushed to the branch by the agent working #6661, and that the sync agent deliberately did not pre-empt the parked kernel-authorization gate).a6d8158ed2— master sync merge (297 master commits; conflicts only in the two lockfiles), kernel bump follows to 0.0.197 → 0.0.198.
Scope judgment on the fold-in: #6661 ("Frequent compression failure during dsh session" — the model looped re-issuing ranges the gate refused: 113 compress failures vs 10 folds, breaker climbing to 14) is the same mechanism family as #5680: the kernel-built per-turn statusLine advertises ranges the model cannot use. #5680 = inverted ordering makes them look corrupt; #6661 = dead-ref spans make them unanchorable. Same file, same surface, same symptom class → one PR is the right granularity; the body is fully transparent about both. No scope objection.
The new code, verified line-by-line at this head:
filterDeadRefRanges(kernel/src/compress.ts:219): pure function; parsesm(\d+)from both dead refs and range endpoints; canonicalizes lo/hi first (so a stored descending pair is checked correctly — the #5680×#6661 interaction); drops a range iff any dead number lies in[lo, hi]endpoint-inclusive; unparseable endpoints are kept (conservative); no deadRefs/empty → same array. I checked the logic against all three new tests and the edge cases (block ids, dead ref matching nothing) — correct.- statusLine site (
kernel/src/compress.ts:1089): the filter runs over the fullcompressibleRangesbefore theslice(0, 3)display, the+N morecounter now counts live ranges, and the whole line is emitted only whenliveRanges.length > 0— i.e. silent when every offered range is dead instead of printing an empty/doomed list. Still inside the same armed-but-silent gate as before; nothing outside that gate changed. state.deadRefsis a real maintained field (tombstone-with-clear atkernel/src/compress.ts:1053-1063), so the filter input is sound.- Body's mechanism claims verified: the host offer surfaces do apply
excludeDeadRefRanges(src/acp-status.ts:61, used at:96,src/plugin.ts:2102, all four prepare lanes) — the kernel-built statusLine was indeed the one surface it never reached; andhasDeadRefBetween(nowkernel/src/recommend.ts:209after master's reorg) checksn > lo && n < hi— strictly interior, so a dead ref at a range endpoint genuinely leaked into the line, exactly the hole the new endpoint-inclusive filter closes. - Tests: +3 unit tests, all with teeth — drop interior and endpoint-inclusive, canonicalize reversed spans before the dead check, no-op/unparseable behavior. The existing #5680 processTurn test (live path) is unchanged and green.
Re-verification at this exact head (env recycled overnight; deps reinstalled, PR-head kernel dist rebuilt):
kernel/tests/reversed-ranges.test.ts+kernel/tests/dead-refs.test.ts= 16/16 pass (incl. the 3 new #6661 tests);tests/nudge-decide.test.ts+tests/issue4331-uncovered-history.test.ts+tests/fix-1001-history-rewrite.test.ts= 27/27 pass;- CI mirror cache: 18/30 checks green, 12 test/static lanes still running, 0 failures so far — full-suite verdict lands with CI.
All round-1/2/3 findings stand (display-only canonicalization, apply path untouched, double-swap lossless cancellation pinned, negative-control teeth, conventions). House conventions at this head: kernel: prefix ✓, kernel-change declaration now covers all three kernel changes ✓, version discipline 0.0.197→0.0.198 + lockfiles ✓, goldens unchanged (correct) ✓, behavior disclosure for BOTH issues (display-only) ✓, Fixes #5680, #6661 ✓. No new small findings; nothing to fix on the spot.
八问(中文,供人工复核)
- 是什么问题:两个同族缺陷都出在 kernel 内建的每轮 statusLine 上——它向模型推荐压缩区间,但推荐了模型用不了的区间:①代际重置后端点倒序(m00512–m00187),模型当损坏跳过压缩(实测连跳约 15 轮);②区间端点/内部含死 ref,门控拒绝锚定,模型反复重发直到熔断(实测单会话 113 次压缩失败 vs 10 次成功,熔断爬到 14)。
- 什么原因导致的:statusLine 是唯一在 kernel
processTurn内部生成的推荐面,宿主侧各推荐面都有的死 ref 过滤(excludeDeadRefRanges)到不了它;而buildCompressibleRanges的洞断裂(hasDeadRefBetween)只查严格内部、不查端点,端点死 ref 漏进推荐。倒序问题则是各展示面直接拼接存储值、缺打印前规范化。 - 影响范围与严重程度:所有插件模式宿主在代际重置(#5680)或存在死 ref(#6661)时的每轮 statusLine;功能性问题——压缩被模型跳过或反复失败,上下文持续增长。
- 怎么修复的:渲染点规范化(既定教义)——
orderedRefPair统一三个展示面;新增纯函数filterDeadRefRanges(端点含、先规范化再查)在 statusLine 站点过滤,全部区间都死时整行静默。折叠执行路径(resolveBoundaries 位置索引 + host normalizeRangeOrder)完全未动,双交换无损抵消由测试钉死。 - 是否有回归问题:无。无死 ref 的会话字节级不变(filter 是 no-op);单调会话字节级不变(orderedRefPair 是恒等);静默路径只在「所有推荐区间都死」这一原本就异常的场景触发(旧行为是打印注定失败的列表);golden 文件未动且无需动;apply 路径未动,双标签顺序下恰好折叠所呈现 span 有测试钉住。
- 是否破坏缓存:不涉及缓存键/重试/游标/去重;statusLine 是临时尾随 user 消息,载体与缓存安全性同 nudge 本身。
- 是否改了设计方向:不改。展示层过滤/规范化,身份与位置语义维持既有方向;#6661 修复与宿主侧既有
excludeDeadRefRanges语义对齐(端点含是其有意差异,恰好补上洞断裂漏掉的端点情形)。 - 是否引入了新的配置:无新配置/env/默认值。
结论:代码层面可合并;唯一阻塞项是 kernel 授权(kernel 触碰 + kernel-change 声明,现覆盖三处 kernel 变更 → 需 owner 批准 + human-only review tier),见下方 🔶 请求。
|
🔶 需要决策 (ai: vllm-qwen/qwen3.8-27b) head 已更新至 本 PR 触碰 被门禁的 diff(PR #5681 @
选项:
|
[bot] 🏷 (ai: vllm-qwen/qwen3.8-27b) PR #5681 round-4 review done at head |
(ai: vllm-qwen/qwen3.8-27b) 先澄清:刚转发的这条是我自己第 4 轮 🔶 授权请求的同步回显(带 本轮实时核验(无代码改动):
结论不变:代码审核无阻塞发现(第 4 轮已逐行核实 #5680 + #6661 两部分,本地定向套件 kernel 16/16、host 27/27),唯一阻塞项仍是 owner 的内核授权 A/B——A(推荐):照现状合入,同族两缺陷一次闭环;B:剥离 kernel commits 只发 host 侧。我停手等待,不自我授权、不改 PR 正文、不开新 issue。 八问
判定:无需处理;等 owner 在 A/B 中拍板(推荐 A)。 |
…e removal, bump kernel 0.0.198->0.0.199)
(ai: vllm-qwen/qwen3.8-27b) Conflict resolved and pushed. PR #5681 head is now What this run did:
Honest limits: the mirror's upstream-checks cache still shows the old head ( The PR's content changed materially — see the separate 🔶 comment below: master's #6928 removed the statusLine surface, so the #5680 statusLine part and all of #6661 are gone; the PR now ships the host-side #5680 fix + the kernel #2362 one-line wording fix + kernel 0.0.199. The pending owner decision (A/B from 2026-11-15) is stale and needs re-ruling. 八问(结构化结论):
|
(ai: vllm-qwen/qwen3.8-27b) This wake's "dirty" claim was stale — the real blocker was red CI, now fixed. Live state at run start: PR Diagnosis (inherited master-level failure, not this PR's code):
Action taken (per CI failure coordination policy — inherited red → merge ci-fixes, don't re-fix master-level failures on the branch):
Honest limits: CI on the new head 八问(结构化结论):
判定:继承红已按政策处置(merge ci-fixes + 本地验证 + 推送),CI 重跑中;PR 仍等 owner 的 kernel 授权决策(🔶 A/B)。 |
[bot] 🏷 (ai: vllm-qwen/qwen3.8-27b) Status re-check — no code change this run; the branch is clean and the only thing left is the owner's kernel-authorization call. This wake re-verified against LIVE sources (not memory) after the previous run pushed
The sole remaining blocker is unchanged: this PR touches 八问(CI 工程师视角,本轮无代码改动)
判定:分支干净(无冲突、本地=远端 head |
ranxianglei
left a comment
There was a problem hiding this comment.
(ai: vllm-qwen/qwen3.8-27b)
Round-5 review (head f25e01a; CI 52/52 green: 38 success + 14 skipped, 0 failed; mergeable=clean, awaiting review only).
This PR touches kernel/ and carries a kernel-change declaration → per the Kernel Boundary, the reviewer cannot approve; this review is findings-only, and the merge is gated by a separate 🔶 decision comment (owner authorization + human-only review tier).
Delta at this head vs round 4 (a6d8158): two merge commits only — 164faec (sync master, adopting #6928's statusLine removal, kernel 0.0.198→0.0.199) + f25e01a (sync ci-fixes: #2929 fold-probe test fix, #6922 module-map doc line). No new author code.
Net diff that actually merges (10 files, +198/−44):
kernel/src/compress.ts:622— 1-line DEAD-ref receipt wording fix (model-visible text; old "can compress now or later" → new "can compress while they stay dead — the record lifts only if the client restores those messages to the visible history"; matches the #2362 tombstone-with-clear mechanism, pure text, no behavior change);kernel/package.json0.0.198→0.0.199 + both lockfiles (version lines only);kernel/tests/reversed-ranges.test.ts+77 — only the #5680 double-swap pin remains (applyCompression folds exactly the offered positional span in BOTH label orders); the statusLine processTurn test went with the surface (comment notes the #6928 removal);src/nudge-decide.ts— buildDecisionPrompt spans via orderedRefPair; resolveDecisionRange containment direction-aware (min/max), returned span normalized (hit path AND largest-fallback path);src/uncovered.ts— describeUncoveredRuns via orderedRefPair;tests/nudge-decide.test.ts+39 — #5680 reversed-range cases incl. round-1 "Largest on purpose" strengthening (bb72fa2);tests/issue2929-codex-fold-double-miss.test.ts— ci-fixes #2929 fix: schedule-independent fold probe (arms on first nudge request with ≥11 refs, folds on the next; pins messageTimestamps:false for a hermetic wire shape);reference/architecture.md+1 line — #6922 module-map entry (ci-fixes doc follow-up).
Host-side items 4/5/6 are byte-identical to what I reviewed in round 1 (floor 6); the kernel wording fix was reviewed in round 2 (floor 24). The ci-fixes content (7/8) is master-level, sanctioned by the CI coordination policy, and becomes a no-op once master catches up.
Findings (both non-blocking, both routed to the 🔶 decision — the reviewer cannot fix them on the spot):
- F1 — PR body is stale post-#6928: the body still says "Fixes #5680, #6661" and describes the statusLine + filterDeadRefRanges changes that no longer exist in the diff; the kernel-change line declares three kernel changes (only the wording fix remains) and the version range is wrong (says 0.0.196→0.0.197, actual 0.0.198→0.0.199). Consequence if merged as-is: #6661 (still open on GitHub) auto-closes without its fix being present — its surface went moot via #6928, so the outcome is right but the attribution is wrong. The reviewer's only permitted body edit is adding the kernel-change line (which exists) → owner's call.
- F2 — missing §7.3 header: the wording-fix commit (1b3a953) lacks the mandatory "
⚠️ MODEL-FACING TEXT CHANGE" header (commit message + top of PR body). Not fixable on the spot (commit already pushed; body edit not permitted). The old→new wording is disclosed in the 🔶 comment.
Code verdict: clean. No blocking findings.
结构化八问:
- 是什么问题: 会话代际重置后,位置型 span 可能存成 startRef>endRef;模型可见面(decision prompt、uncovered receipts——statusLine 面已由 #6928 移除)会把 ref 对降序打印,且 resolveDecisionRange 的包含判定对倒置区间不可满足。
- 什么原因导致的: 代际重置使 ref 账本重新编号,跨边界构建的 span 存成 start>end;渲染站点把存储元组原样打印(把方向当语义而非记法,#2168/#887 教义);resolveDecisionRange 用原始 (start,end) 序做包含判定,倒置区间永远包含不了候选。
- 影响范围与严重程度: 触发代际重置的 dsh/plugin 会话——nudge decision prompt 与 uncovered receipts 显示降序对(模型困惑、可能选错区间);倒置区间落到 largest-range 兜底。无数据丢失;模型可见文本误导。p2(特定条件下功能异常,有绕行)。
- 怎么修复的: 渲染站点规范化——纯函数 orderedRefPair(kernel/src/refs.ts,master 已有):decision prompt span、uncovered receipts、resolveDecisionRange 返回 span(命中与兜底两条路径)统一升序;包含判定方向感知(min/max)。教义:方向是记法,不是语义。
- 是否有回归问题: 已审触碰路径的既有行为——decision prompt / uncovered receipts / resolveDecisionRange(host 侧,与第 1 轮逐行核过的一致);kernel 净 diff 仅 1 行措辞修正 + 版本 bump + #5680 double-swap pin;ci-fixes 内容为 master 级。无语义漂移、无 fail-fast 变吞错、无阈值/时序/输出格式漂移(除已披露的模型可见措辞修正)。
- 是否破坏缓存: 不涉及。缓存键、前缀字节、重试/游标逻辑均未动;措辞修正在消息正文内,不是缓存键。
- 是否改了设计方向: 不涉及。无架构/边界/数据流转向;orderedRefPair 本就存在于 master。
- 是否引入了新的配置: 不涉及。无新 env/config/默认值。
判定:代码可合;合并由 🔶 决策(kernel 授权)把关。
🔶 需要决策 (ai: vllm-qwen/qwen3.8-27b) PR #5681 @ 被门禁的 diff(PR #5681 @
非 kernel 部分(host 侧 decision prompt / uncovered receipts / resolveDecisionRange 规范化 + 测试 + ci-fixes 带入的 #2929 测试修复与 #6922 文档行)已审、干净——不门禁,随 PR 合并。 owner 需知悉的两点(均非阻塞,reviewer 无法顺手修):
选项:
needs-decision 标签:上游 PR 已在位(本轮已核:bug/p2/dsh/scope/wiring/needs-decision),无需重打。 |
[bot] 🏷 (ai: vllm-qwen/qwen3.8-27b) Already green — the 3 reported shards were on the stale head; no work needed this run. Re-verified live this run: the event cites run
So there is nothing to fix or push — confirming and stopping, per the "if everything is green already, confirm and stop" rule. The only thing still standing between this branch and merge is the owner's kernel-authorization A/B (🔶 floor 63; A recommended). 八问(CI 工程师视角,本轮无代码改动)
判定:当前 head |
[bot] 🏷 (ai: vllm-qwen/qwen3.8-27b) Duplicate re-fire of the same stale signal — still green, no action. This event is byte-identical to the one I confirmed ~1 minute ago (run 八问(CI 工程师视角,本轮无代码改动)
判定:当前 head |
…ile conflicts) master advanced 135 commits past the PR head. Source auto-merged cleanly (the #2362 kernel wording fix + host #5680 fix survive intact). Conflicts were only the kernel version + two lockfiles: kernel 0.0.199 (ours) vs 0.0.200 (master) -> 0.0.201 (max+1, Kernel Boundary rule 2, the surviving kernel/src delta requires a bump above master). Both lockfiles regenerated with the exact lock-sync command, idempotency verified.
[bot] 🏷 (ai: vllm-qwen/qwen3.8-27b) Real conflict — resolved and pushed. This "dirty" trigger was genuine (not a stale async-recompute false alarm): master advanced 135 commits past the PR head What I did this run:
Local verification (targeted, all green):
Live state after push: master ( 八问(CI 工程师视角)
判定:真实冲突已解决并推送( |
ranxianglei
left a comment
There was a problem hiding this comment.
(ai: vllm-qwen/qwen3.8-27b)
Round-6 review (head 4dda0ac; CI 30/30 green: 16 success + 14 skipped, 0 failed; mergeable=clean, awaiting review only).
Delta since round 5 (f25e01a): one merge commit only — 4dda0ac (sync origin/master, 135 commits ahead). Verified a pure union: the combined diff shows only the conflict resolutions — kernel version 0.0.199 (ours) vs 0.0.200 (master) → 0.0.201 (max+1, Kernel Boundary rule 2: the surviving kernel/src delta requires a bump above master) + both lockfiles regenerated (verified version-only, 4 lines). No manual content resolution beyond that.
Net diff that actually merges (8 files, +157/−18): byte-identical to what I reviewed in rounds 1–5 —
kernel/src/compress.ts:6221-line DEAD-ref receipt wording fix (#2362 tombstone-with-clear);kernel/package.json0.0.200→0.0.201 + both lockfiles (version lines only);kernel/tests/reversed-ranges.test.ts+77 — #5680 double-swap pin;src/nudge-decide.ts/src/uncovered.ts/tests/nudge-decide.test.ts— host-side orderedRefPair normalization (round 1, byte-identical).
Master touched none of these files in the 135-commit window; the ci-fixes content (#2929 test, #6922 docs) is now in master and out of the net diff.
Findings: unchanged from round 5, both non-blocking, both already in the 🔶 decision:
- F1 — PR body stale (author synced master but did not update the body): still "Fixes #5680, #6661", still describes the statusLine + filterDeadRefRanges changes that no longer exist in the diff; the kernel-change line's version range is now further off (says 0.0.196→0.0.197, actual 0.0.200→0.0.201). If merged as-is, #6661 (open on GitHub) auto-closes without its fix being present (its surface went moot via #6928).
- F2 — missing §7.3 "
⚠️ MODEL-FACING TEXT CHANGE" header on the wording-fix commit (1b3a953).
Code verdict: clean. No blocking findings. (Re-verified this round: merge purity, version resolution, lockfile version-only, CI at the exact head.)
结构化八问(answers unchanged from round 5, re-verified against the new head):
- 是什么问题: 会话代际重置后,位置型 span 可能存成 startRef>endRef;模型可见面(decision prompt、uncovered receipts——statusLine 面已由 #6928 移除)会把 ref 对降序打印,且 resolveDecisionRange 的包含判定对倒置区间不可满足。
- 什么原因导致的: 代际重置使 ref 账本重新编号,跨边界构建的 span 存成 start>end;渲染站点把存储元组原样打印(把方向当语义而非记法,#2168/#887 教义);resolveDecisionRange 用原始 (start,end) 序做包含判定。
- 影响范围与严重程度: 触发代际重置的 dsh/plugin 会话——decision prompt / uncovered receipts 显示降序对(模型困惑、可能选错区间);倒置区间落到 largest-range 兜底。无数据丢失。p2(特定条件下功能异常,有绕行)。
- 怎么修复的: 渲染站点规范化——纯函数 orderedRefPair(kernel/src/refs.ts,master 已有);包含判定方向感知(min/max);返回 span 两条路径都归一。
- 是否有回归问题: 无——触碰路径的既有行为已审(host 侧与第 1 轮逐行核过的一致;kernel 净 diff 仅 1 行措辞修正 + 版本 bump + pin;master 在 135-commit 同步窗内未触碰任何被改文件);无语义漂移 / 无 fail-fast 变吞错 / 无阈值-时序-格式漂移(除已披露的模型可见措辞修正)。
- 是否破坏缓存: 不涉及。
- 是否改了设计方向: 不涉及。
- 是否引入了新的配置: 不涉及。
判定:代码可合;合并由 🔶 决策(kernel 授权)把关。
🔶 需要决策 (ai: vllm-qwen/qwen3.8-27b) PR #5681 head 已更新至 被门禁的 diff(PR #5681 @
非 kernel 部分(host 侧 decision prompt / uncovered receipts / resolveDecisionRange 规范化 + 测试)已审、干净、不受门禁,随 PR 一并合入。本轮复验:host+测试净 diff 与已审内容逐字节一致;master 在 135-commit 同步窗内未触碰任何被改文件。 两项 owner 知晓项(不变,均非阻塞,reviewer 无法代修):
选项:
needs-decision 标签:上游 PR 已在位(本轮已验证),无需重打。 |
Fixes #5680, #6661
What & why
After a session-generation reset (proxy restart / upstream switch restarts refs at m00001), ref numbers stop being monotonic with message position. Compressible ranges are endpoint-labeled POSITIONALLY (first/last ref of each positional group), so a group straddling the boundary stores startRef > endRef. Three model-visible surfaces printed those stored pairs verbatim:
The model reads startRef > endRef as corruption and skips compression for the rest of the session (reported incident: ~15 consecutive skipped turns on a healthy 1M-window session). A fourth latent defect in the same family: resolveDecisionRange's containment test was unsatisfiable for inverted ranges, silently dropping the model's chosen span and falling back to the largest range.
The same statusLine expression had a SECOND leak, independent of ordering: it offered ranges the gate will refuse (#6661). The per-turn statusLine is the one offer surface built inside the kernel, so the dead-ref filter every host offer surface applies (
excludeDeadRefRanges, src/acp-status.ts) never reached it — it advertised the very ranges the gate then refused ("recorded as DEAD"), and the model looped re-issuing them until the breaker tripped (#6661: 113 compress failures vs 10 folds in one session, breaker climbing to 14). The hole-break in buildCompressibleRanges (#3192/#3205) only catches a dead ref strictly between two consecutive compressible messages (hasDeadRefBetweenis endpoint-exclusive); a dead ref sitting at a range endpoint still leaked into the line. This is the third surface of the #3192 family (after buildDecisionPrompt and the /acp panel, #3204).Fix (render-site canonicalization — the established doctrine)
Per the design pinned in kernel/tests/reversed-ranges.test.ts (#2168/#887): direction is NOTATIONAL (host normalizeRangeOrder #1001 + kernel resolveBoundaries #310 both swap), so endpoint labels are canonicalized at the RENDER sites with the existing orderedRefPair, never at the generation side — a generation-side swap would detach endpoint labels from their positions and break formatRanges' position-based merging (the coverage invariant #2168's own viableRanges() proposal would have hit, which also cannot reach the kernel-generated statusLine: that string is built inside processTurn before any host-side filter runs).
filterDeadRefRanges— drop any offered range whose canonicalized span contains a dead ref (endpoint-inclusive; canonicalizes lo/hi first so a reversed pair is checked correctly). Applied at the statusLine site: the line offers only live ranges and goes silent when every offered range is dead rather than emitting an empty "compressible now:".Audited-and-safe siblings (no change needed): block spans (resolveBlockSpan already sorts numerically), preflight TASK prompts (both positionally-derived pairs normalized at preflight.ts:2544/:2798 since #1001), diagnostic log lines (raw state is correct there).
Behavior change disclosure (display-only)
Old → new: on the three surfaces above, a boundary-straddling pair previously printed descending (m00512–m00187) now prints ascending (m00187–m00512). Sessions with monotonic refs are byte-identical (orderedRefPair is a no-op). The apply path is untouched: a verbatim echo of any offered span still folds exactly the offered positional span — pinned in BOTH label orders (new kernel test), confirming the host-normalize/kernel-resolve double swap cancels losslessly (the issue's "folds the wrong messages" risk does not hold for live endpoints).
#6661 (display-only): the statusLine previously offered ranges spanning a dead ref (the gate then refused them, "recorded as DEAD"); it now drops those ranges and goes silent when none are left. Sessions with no dead refs are byte-identical (filterDeadRefRanges is a no-op). The apply path is untouched — a live range still folds exactly as before.
Out of scope (registered in the issue thread)
snapToNeighborVisible's nearest-by-ref-number assumption breaks under mixed generations when an endpoint is dead/consumed — different failure surface (logic, not display), tracked separately.
Tests
kernel-change: (1) display-only canonicalization of the kernel-generated statusLine ref pairs (the host side cannot reach the string — it is built inside processTurn); (2) correctness wording in the #2362 anchor-failure receipt — it claimed dead refs can never compress "now or later", but tombstones lift when the client restores those messages to the visible history (tombstone-with-clear); (3) #6661 — filter dead refs out of the statusLine offer (filterDeadRefRanges, endpoint-inclusive span check, canonicalized for reversed pairs) so the line never advertises a range the gate refuses, going silent when all offered ranges are dead. All three are model-visible text only; no behavior constant, prompt, tool schema, or apply-path change. acp-kernel 0.0.196 → 0.0.197 (branch head at 0.0.196 after the master sync).
Owner approval for the kernel part is requested in the issue thread (🔶 comment); per the stated default, merge = approval.