Skip to content

[PR] fix(kernel): reject range folds that would merge blocks beyond the requested ref window - #5835

Open
ranxianglei wants to merge 15 commits into
masterfrom
2026-11-07_compress-window-coverage-guard
Open

ranxianglei wants to merge 15 commits into
masterfrom
2026-11-07_compress-window-coverage-guard

Conversation

@ranxianglei

Copy link
Copy Markdown
Owner

Closes #5830

kernel-change: add a hard gate in projectUnit so a plain message-ref range can never merge an active block whose coverage extends beyond the requested ref window — the missing check behind #5830's silent summary-coverage loss. The judgment lives entirely in the kernel's shared projection; the host side cannot fix this.

What was wrong

A plain mNNNNN..mMMMMM range carries one summary describing exactly that ref window. But projectUnit decided which existing blocks to consume by asking only whether each block's visible representation (its rendered summary, or earliest surviving raw) falls inside the resolved span. After a folded historical ref resolves via activeOwnerAnchor to its inheriting block's anchor position (an unbounded jump in view-index space), the resolved span can be far larger than the requested window — every same-tier block swept along gets merged, its effectiveMessageIds unioned into the new block while the new block carries only the last range's summary. The prior summaries are silently replaced; the receipt reports success. #5830 observed this as one block covering 1566 messages from conversation start carrying a single 2456-char summary.

Fix

One decision-point gate in projectUnit (kernel/src/unit-projection.ts), shared by apply / recommend / acp_status per the #3236 single-projection discipline:

  • A plain range that would consume any active block whose coverage lies outside [startRef..endRef] is now fatal (kind: "window"): the whole batch rejects atomically, zero commits, and the error names the offending blocks with their coverage extent plus how to proceed (reference block ids directly for deliberate merges, or narrow the range).
  • Unmappable coverage fails closed (containment unprovable → reject).
  • Exemptions: block-boundary distillation (bN..bM) absorbs boundary coverage by design; no-op resubmits create no block, so nothing is replaced.
  • kernel/src/report.ts flags the new fatal kind so acp_status rows stay consistent with the apply verdict.

Behavior change (disclosed)

OLD: such folds landed successfully, silently replacing the consumed blocks' summaries (active-summary coverage loss; originals recoverable via decompress through directBlockIds).
NEW: they are hard-rejected with an actionable error; the rest of the batch is untouched (atomic rollback).
WHY: the supplied summary cannot cover the merged content — landing it is data-quality corruption dressed as success. Legitimate merges (coverage inside the window), distillation, and idempotent resubmits are unchanged.

Tests

New kernel/tests/issue5830-merge-window-guard.test.ts (4 tests, all-real API calls):

  1. repro: stale-inherited start ref + pruned view → pre-fix silent mega-merge (verified red on the unfixed code), post-fix atomic reject naming the out-of-window block;
  2. control: legit in-window merge still lands;
  3. control: subset resubmit unchanged (no block created, no coverage change);
  4. control: bN..bM distillation unaffected.

Targeted suites green on rebased head (local): issue5830 (4), issue5751-tool-pair-widening (6), tool-pairs (14), issue3236 (5), regression-bugfixes (12), issue4484 (4), dead-ref-split (5), dead-refs (6), refold (20), carrier-advertise-validate (5), issue3371 (3), compress (32), decompress-report (16), panel (12), parse-compress-input (98), checkpoint-carrier (4), issue4289 (14), pipeline (15), verif-subset-guard (2). Full-suite verdict = CI.

Kernel version: 0.0.182 → 0.0.183. No config surface changes. No new env vars.

…ed ref window (#5830)

A plain m-ref range carries one summary describing exactly [startRef..endRef], but projectUnit consumed any same-tier active block whose visible representation fell inside the RESOLVED span. After a folded historical ref snaps to its inheriting block's anchor (unbounded view-index jump), the span can sweep blocks whose coverage lies outside the window, silently replacing their summaries with one that does not cover their span (#5830).

Hard gate in projectUnit (shared by apply/recommend/acp_status per #3236): a plain range consuming an active block with out-of-window coverage is fatal (kind 'window') — whole batch rejects atomically, zero commits, error names offenders + remedy. Unmappable coverage fails closed. Exempt: block-boundary distillation, no-op resubmits. report.ts flags the new kind for acp_status consistency.

Regression: kernel/tests/issue5830-merge-window-guard.test.ts (repro verified red pre-fix + 3 controls). Kernel 0.0.182 -> 0.0.183.
@github-actions

github-actions Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

📦 Built Package Artifact

Branch: 2026-11-07_compress-window-coverage-guard (3ec2244)

Latest build — install this exact version

npm install -g billion-context@0.0.12650-pr.5835.a49a57b

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
3ec2244 billion-context@0.0.12650-pr.5835.a49a57b build
1103a4d billion-context@0.0.12647-pr.5835.1f06618 build
a85f9c3 billion-context@0.0.11893-pr.5835.8b08184 build
0c08a83 billion-context@0.0.11697-pr.5835.b463394 build
2250ce2 billion-context@0.0.11429-pr.5835.3286751 build
a3abdd7 billion-context@0.0.11148-pr.5835.6f32606 build
aa4175f billion-context@0.0.10881-pr.5835.a4a2b4a build
fa82e64 billion-context@0.0.10068-pr.5835.29322b1 build
108681d billion-context@0.0.9157-pr.5835.cb33cd6 build
d4b2749 billion-context@0.0.8417-pr.5835.3e54ab2 build

Download artifact

  1. Download the artifact from the Actions run
  2. Extract the tarball and install:
tar xzf billion-context-pr5835.tgz
npm install -g package

Install instructions are refreshed on each push.

@ranxianglei ranxianglei changed the title fix(kernel): reject range folds that would merge blocks beyond the requested ref window [PR] fix(kernel): reject range folds that would merge blocks beyond the requested ref window Nov 6, 2026
@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

CI 红灯已修:lock-sync(attempt 1/3,一次修完)。修复已推到 PR 分支,新 head 3c4f8d5ea,等 CI 重跑。

七问摘要:

  1. 是什么问题:PR 按 Kernel Boundary 要求把 kernel 版本从 0.0.182 提到 0.0.183(改了 kernel/src/** 必须 bump),但没重新生成两个 lockfile——CI 的 lock-sync 门禁(package-lock.json version metadata lags package.json (bili 0.1.190 vs 0.1.191, kernel 0.0.112 vs 0.0.114) #2704 漂移守卫)检测到版本记录落后,判红。严重程度:仅本 PR 的 CI 门禁,不影响任何用户与运行时行为。
  2. 什么原因导致的:改 package.json 不会自动改写 package-lock.json,只有 npm install 才会重新生成——作者的提交只含源码改动,漏了 lockfile 再生这一步(该机制在 package-lock.json version metadata lags package.json (bili 0.1.190 vs 0.1.191, kernel 0.0.112 vs 0.0.114) #2704 有完整说明)。
  3. 怎么修复的:在 PR head 上原样执行 lock-sync job 的两条命令(npm install --package-lock-only --ignore-scripts,根目录 + kernel/ 各一次)重新生成,提交只含 3 行版本号:根 package-lock.json 的 kernel 条目 0.0.182→0.0.183、kernel/package-lock.json 自身两处同改。本地验证了幂等性(再跑一遍零变化),与 CI 日志里期望的 diff hunk 逐字一致。提交信息沿用了先例 5705f1d 的同款格式。
  4. 是否有回归问题:无。diff 仅 3 行 lockfile 元数据,不触碰任何代码/行为/配置;高危模式(语义漂移、吞错、阈值时序变化)逐项不涉及。
  5. 是否破坏缓存:不涉及(纯 lockfile 版本记录,与运行时缓存/重试/增量游标无关)。
  6. 是否改了设计方向:不涉及。
  7. 是否引入了新的配置:不涉及。

判定:待新 head 上 CI 重跑转绿;此前因 lock-sync 失败被跳过的 test/static-gates 等车道会随之全量运行,若仍有红由后续 attempt 处理。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

查重:不重复。 open/closed issue 与 PR(近 7 天为主,按失败签名匹配)中无其他条目针对 #5830 的「plain range 合并越窗块、旧摘要被静默替换」机制;与 #5789(tier 蒸馏绕过 mid-turn 块)同属折叠资格判定家族但症状与机制均不同,不构成重复。无并行在途 PR 修同一线程。

标签:bug + scope/kernel + p1(理由:静默摘要覆盖丢失属数据质量/数据丢失类,按 owner 2026-10-19 修订一律 p1;修复面纯内核,不打客户端车道标签)。保留系统 pr 标签。

审核进行中,先报已钉死的部分(完整八问结论随后补发):

  1. 方向审核通过:根因定位正确——projectUnit 只问「块的可见表示是否落在 resolved span 内」,而 stale inherited ref 经 activeOwnerAnchor 跳变后 resolved span 远超请求窗口,越窗块被整体吞并、摘要被单尾段摘要替换。判定放进共享投影(apply/recommend/acp_status 单一定义,[Bug] recommend/apply 对同一区间的 turn-integrity 判定永久不一致:acp_status 反复推荐的区间被 apply 侧整段拒绝(0.1.196,Range would split N turn(s) at the protected-zone boundary) #3236 纪律)、整批原子拒绝、fail-closed 不可映射覆盖——方案打到根因,不是症状层拦截。核对了 apply 侧原子性(compress.ts preLoopState 回滚,零提交)与 recommend 侧降级(screenRecommendedUnits 对任意 fatal 降 gap,不会 advertise→reject 循环)。
  2. CI 红已定位:lock-sync 红(版本号未同步 lockfile)你已自行修掉(3c4f8d5,与我独立重算的 diff 逐字节一致);static-gates 红 = 全量 kernel 套件本地复现 1591/1594,两个既有 pinned 套件被新 gate 误伤:
  3. 处置:两处都已在分支上直接修(gate 精化:端点解析未跳变时按加宽后 span 判含,跳变时仍钉死请求窗口;fixture 改为继承式账本并补 fail-closed 负向钉),kernel 版本随改 bump,本地定向+全量 kernel 套件跑绿后推送,CI 转绿再发完整八问结论。

@ranxianglei ranxianglei added bug Something isn't working p1 scope/kernel labels Nov 6, 2026
ci-check added 3 commits November 7, 2026 03:49
…points resolve in place

The literal-window containment check rejected legitimate folds whose span
was extended by pair/reasoning boundary widening (#5531 stranded-pair
recovery path): widened cells ride under the same summary by design, so
when BOTH endpoints resolved in place (the requested message itself still
occupies its slot), containment is now judged against the widened span
computed over the range message refs.

The #5830 producer stays fatal: an endpoint that resolved ELSEWHERE
(stale inherited ref snapping to a distant inheriting-block anchor) holds
the line at the requested window, as before. Unmappable coverage still
fails closed either way.

kernel 0.0.183 -> 0.0.184 (+ lockfile sync).
…age rejection

The subtest-3 fixture numbered the pruned view fresh from nextIndex=1,
which cannot model production: covered-but-pruned messages keep their
original refs (ids are never re-minted), so their numbers sit inside the
requested window even though the messages are gone. Seed an inherited
ledger with the original numbering instead — the merge lands again.

Add the companion negative pin (gate discipline #3617): the same shape
with fresh numbering leaves b1's coverage unmappable in byRaw, so the
fold must reject atomically with the [unmapped coverage] offender named.
The fail-closed rule treated ANY unmappable coverage id as an offender.
Turn separators (#2627) are synthetic outbound-only markers that legacy
polluted views registered into block coverage WITHOUT a ref entry; a
later plain-range fold consuming such a block was rejected although its
real-history coverage sat entirely inside the window. Real history ids
always keep their byRaw entry (ids are never re-minted; only
applyCompactionArchive prunes at native-compaction boundaries), so an
unmapped id carries no client-side content a replaced summary could
lose — skip it. A block whose ENTIRE coverage is unmappable still fails
closed (containment unprovable); the pi#199 negative pin holds.
@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

PR review 完成。判定:可合,等人工合并(kernel 层永不自动合并;PR 正文已带 kernel-change 声明)。审核中发现原 head 引入的 3 处回归已直接在分支上修掉(独立标注 commit),最终 head ce6f87738。

八问

  1. 是什么问题:普通 message-ref 区间折叠会静默合并覆盖范围超出请求窗口的活跃块——新块只带最后一个区间的 summary,被吞块的 summary 被无声替换(生产事故:b27 用一条 2456 字符的尾部 summary 罩住从会话开头起的 1566 条消息)。
  2. 什么原因导致的:projectUnit 判定消费哪些块时只看「块的可见表示是否落在解析后的 span 内」;陈旧继承 ref 经 activeOwnerAnchor 解析到继承块锚点位置(视图索引空间的无界跳变),解析 span 远大于请求窗口 → 沿途同层块全被卷入合并。[Bug] recommend/apply 对同一区间的 turn-integrity 判定永久不一致:acp_status 反复推荐的区间被 apply 侧整段拒绝(0.1.196,Range would split N turn(s) at the protected-zone boundary) #3236 单一投影保证了 apply/recommend/acp_status 共用同一判定,所以门必须加在 kernel 的 projectUnit 里,host 侧修不到。
  3. 影响范围与严重程度:p1 数据质量类(活跃 summary 覆盖丢失;原件可经 decompress/directBlockIds 找回,但面板/reconcile 看到的是大跨度薄 summary)。触发面:任何解析 span 扫到窗口外同层活跃块的普通 mNNNNN..mMMMMM 折叠(裁剪视图/compaction 后的陈旧继承 ref 是典型路径)。
  4. 怎么修复的:在 projectUnit 单一决策点加硬门(fatal kind window,整批原子拒绝、零提交、错误点名越界块并给出 bN..bM/收窄区间两条出路);不可映射覆盖 fail-closed;豁免 bN..bM distill、纯 resubmit、混合 bN..mM 端点。审核中我推了 3 个精修 commit:
  5. 是否有回归问题:既有行为逐项审过——recommend 对 fatal 单元降级为 gap(recommend.ts:705 通用 fatal 检查,无 advertise→reject 循环)、apply 整批回滚(preLoopState)、report.ts ⚠ 行一致、豁免面不变。原 head 引入的 3 处回归全部发现并在分支上修复(issue5531 搁浅对复活、regression-empty-rewrap Welcome to billion-context Discussions! #199 s3、issue2627 父块折叠被误拒)。本地:kernel 全套 1595/1595 绿,受影响 host 套件绿。CI 最终 head:guards + static-gates + 11 条 test leg 中 10 条绿;唯一红腿 test(ubuntu-22/2)是继承性 master 红,与本 PR diff 无关——tests/verif-snapshot-render.test.ts J3 judge 报 if condition degraded @319(buildView 符号化翻译降级一个 if 条件),在干净 master(c3dfbe6)检出上逐字节复现,且只在 SMT solver 被配置到时暴露(haveSolver() 门使暴露按 leg 抖动,上一 head 同腿就是绿的);当前 ci-fixes(0470bec)只含 dsh pin 对齐且已被 master 现状超越(六个文件在本 head 实测全绿),故未 merge ci-fixes;已在 CI Control Center: Centralized CI Failure Handling & Status Sync (Comment all CI issues here; do not open new issues) | CI 总控: CI 失败集中处理与状态同步(所有 CI 问题在此评论, 勿开新 issue) #4599 留结论评论,查重无存量 issue,按平台规则不另开单、在此停放待 master 车道处置(verif 翻译器覆盖面或 snapshot-render 源码,走 verif/README.md 纪律)。
  6. 是否破坏缓存:不涉及。
  7. 是否改了设计方向:不涉及——留在 projectUnit 共享投影内,[Bug] recommend/apply 对同一区间的 turn-integrity 判定永久不一致:acp_status 反复推荐的区间被 apply 侧整段拒绝(0.1.196,Range would split N turn(s) at the protected-zone boundary) #3236 纪律不变。
  8. 是否引入了新的配置:无 env/config/默认值变更。行为变更披露 OLD→NEW:此类折叠旧行为=静默落盘(summary 被替换,decompress 可找回)→ 新行为=原子硬拒+可操作错误;有界残留披露:post-native-compaction(applyCompactionArchive 剪 byRaw)后整块不可映射的覆盖,普通区间折叠被拒(出路 bN..bM);映射部分在窗内的混合覆盖恢复落盘(合成标记不代表客户端侧内容,与 PR 前行为一致,非回归)。kernel 版本:0.0.182 → 0.0.185(跨整个 PR 一次到位)。

diff 面:7 文件 +344/−9(unit-projection 门 93 行含注释、report 2 行、两个测试文件、版本+双 lockfile)。收工判定:PR 内容本身可合;合并前请知悉上述唯一红腿为继承性 master 红(证据见上),由你决定是否容忍该腿或先走 master 车道修复。

CI shard flake on this PR (test ubuntu-22 s2, run 42288017742): 'receiver
port must be a number, got 0'. The fixture published its port with
appendFileSync — open(O_CREAT) and write are separate syscalls, so under
runner load the parent's existsSync poll can observe the file while it is
still empty, and Number('') === 0 trips the assertion. Reproduced locally by
splitting the publication (probe: exact same failure text); kernel-only PR
diff cannot touch this path.

Two facets of the same race, both test-side only:
- fixture publishes tmp + rename (atomic: existence now implies complete content)
- startReceiver waits until the content parses to a valid port > 0 instead of
  trusting mere existence (keeps the 15s deadline and both failure modes)
@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

CI 修复完成(第二轮唤醒):唯一红腿 test (ubuntu-latest, 22, 2) 已修,新 head d4b2749d1 全矩阵绿(26 success + 1 skipped)。

七问

  1. 是什么问题:PR head ce6f877 上唯一失败的 check 是 test 矩阵 ubuntu-22 分片 2,3082 个用例中挂 1 个:#5152 one worker per origin: repeated attach paths share, refcounted stop,断言 receiver port must be a number, got 0。
  2. 什么原因导致的:与 PR diff 无关的既有测试竞态(kernel-only diff 不触此路径,master c3dfbe6 同矩阵绿,非继承)。机制:tests/fixtures/issue5152-beat-receiver.mjs 用 appendFileSync 发布端口文件——open(O_CREAT) 与 write 是两个系统调用,runner 高负载下子进程恰在两者之间被调度走时,父进程 startReceiver 的 existsSync 轮询看到「文件已存在但为空」提前退出等待,Number("") === 0 触发该断言。本地对抗探针把发布拆成 create→延迟 400ms→write,复现出与 CI 逐字节相同的报错文本;修复逻辑在同一探针下通过。
  3. 怎么修复的:同一机制两个 facet,均纯测试侧、独立标注 commit d4b2749d1:① 源头——fixture 改 tmp+rename 原子发布(rename 原子性保证「文件存在」即「内容完整」);② 消费端——startReceiver 改为轮询到内容解析为合法端口(正整数 >0)才接受,不再信任单纯的文件存在;15s deadline 与两种超时失败模式原样保留。
  4. 是否有回归问题:无。零 src/ 改动、零产品行为面;只动 tests/issue5152-owner-beat-survives-host-stall.test.ts 与上述 fixture 两个文件。审过既有行为:fixture 的 beat 记录语义(appendFileSync beats.txt)未动;各子测试的 warm-up/速率断言未动;接收器起不来时仍按原文案响亮失败。定向 3×6/6 绿 + typecheck 绿;CI 全矩阵 26 success(含此前失败分片)+ red-signal 按设计 skip。
  5. 是否破坏缓存:不涉及。
  6. 是否改了设计方向:没有。
  7. 是否引入新配置:没有。

另外两件事:① 本轮之前作者在我上一轮的 lock-sync commit 之上推了 3 个 kernel 提交(cd2a934/02ed9c926/ce6f87738)并自行同步了 lockfile,lock-sync 已绿;此前 verif-snapshot-render 那条红已在 #4599 floor 1070 单独归账(master 侧 SMT 求解器覆盖问题,与本 PR 无关)。② 顺带发现 tests/codex-mcp-shell.test.ts:124-125 有同型 existsSync→read 模式(entry-report.txt),暂无 flake 证据,本自动车道不动它,留此记录。已按协调政策在 #4599 留一行结论。

判定:PR #5835 全部 check 绿(mergeable_state 仅剩人工合并环节),可合并。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

Progress update (merge-conflict lane, attempt 1/3): my session was force-restarted after a 31-minute stall — a git/network call hung, and I am resuming with hard timeouts on every step.

Live state verified this run before the stall:

  • Head d4b2749d1: all 30 checks green (mirror cache: 0 failed, 0 pending).
  • Merge state: dirty — the PR now conflicts with an advanced master (recorded base c3dfbe6b2 is stale).

Next: rebase the PR branch onto current master, resolve all conflicts (expecting kernel version + lockfiles, possibly test-side files), run targeted local verification, then force-push (explicitly permitted for this conflict rebase) and report back with the 七问 summary.

…dirty merge state, #5835)

# Conflicts:
#	kernel/package-lock.json
#	kernel/package.json
#	package-lock.json
@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

Merge conflict resolved. The PR was dirty because master advanced 228 commits past its recorded base (c3dfbe6b2); the integration is pushed as merge commit 108681d45 (regular fast-forward push, no force-push, author commits untouched) and the full CI matrix is green on it (verified directly: main CI run 43040615294 = 27 success + 1 skipped-by-design, all other workflows on the head also success). Live merge state is now behind (master moved again after my fetch — not a blocker, mergeable: true).

七问

  1. 是什么问题:PR 与目标分支冲突(dirty)——分支基于 c3dfbe6b2,而 master 在其后合入了 228 个提交(含 kernel Reaching out to the author — a plugin bug is throwing errors and causing the context to balloon rapidly. | 求助作者,插件bug报错导致上下文急速增加 #5789/New error in v0.213, following up on the previous bug where old blocks can't be compressed and tokens double. | 0.213版本新报错,接着上次的旧块无法压缩token翻倍bug #5919/Request two capabilities: compressed block "retirement" and summary "external rewrite". | 请求两个能力:压缩块「退役」与摘要「外部重写」 #5765、docs 重组等)。
  2. 什么原因导致的:常规的分支陈旧。冲突面只有三处:kernel/package.json(版本行)、package-lock.json、kernel/package-lock.json;两个源码文件(unit-projection.ts/report.ts)git 三方合并自动成功——双方改动区域不相交(PR 加 window 守卫,master 改 Reaching out to the author — a plugin bug is throwing errors and causing the context to balloon rapidly. | 求助作者,插件bug报错导致上下文急速增加 #5789 恢复梯与 Request two capabilities: compressed block "retirement" and summary "external rewrite". | 请求两个能力:压缩块「退役」与摘要「外部重写」 #5765 retired 区块)。
  3. 怎么修复的:选 merge 而非 rebase+force-push(不重写作者提交、符合 push 纪律的「能不强推就不强推」)。冲突解决:kernel 版本取 0.0.196(master 的 0.0.195 + 1,因 PR 仍含 kernel/src/** 改动,Kernel Boundary 版本纪律要求相对新 base 再 bump);两个 lockfile 用 lock-sync 门禁的原命令重新生成(npm install --package-lock-only --ignore-scripts --no-fund --no-audit,root + kernel/)。自动合并结果逐点核验:PR 的 compress merges disjoint ranges into earlier coverage but retains only the last summary #5830 守卫与 master 的 Reaching out to the author — a plugin bug is throwing errors and causing the context to balloon rapidly. | 求助作者,插件bug报错导致上下文急速增加 #5789/New error in v0.213, following up on the previous bug where old blocks can't be compressed and tokens double. | 0.213版本新报错,接着上次的旧块无法压缩token翻倍bug #5919 改动同时在场,新增 import(parseBoundary/indexToRef/refToIndex)在合并后的文件里全部有对应导出。
  4. 是否有回归问题:无。合并后对 master 的净 diff 恰好是原 PR 的 9 个文件,无夹带;typecheck 全树干净;定向测试 29/29(PR 的 2 个 kernel 测试 + master 同区 4 个:5789/5919/4484/5765)+ issue5152 测试 3×6/6;CI 全矩阵绿(27 success + 1 skip)。语义交互核对:PR 的 window 守卫在 projectUnit 中位于 master 恢复梯之前执行,且对递归排除重试同样生效(每次调用按实际 consumed blocks 判定),两者不互斥。
  5. 是否破坏缓存:不涉及。
  6. 是否改了设计方向:没有。
  7. 是否引入新配置:没有。

备注:mirror cache 本轮又滞后(长时间显示 5 个 test 分片 in_progress),真值以单次 GitHub API 拉取的主 CI run jobs 为准。已按协调政策在 #4599 留一行结论。

判定:冲突已解、全部 check 绿,可合并(合并动作由人工执行)。

…rge state, #5835)

- kernel version: master 0.0.197 + this PR's merge-window guard -> 0.0.198
  (kernel/src changes present in the merge, so a bump above master is required)
- #5152 port-handoff race: keep the PR's atomic-publish receiver fixture +
  valid-port polling as a coherent pair; master's parent-polling fix is subsumed
- lockfiles regenerated to kernel 0.0.198 (root + kernel, lock-sync clean)
- build + typecheck + targeted kernel (issue5830-merge-window-guard,
  regression-empty-rewrap) and #5152 tests all green
@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

Merge conflict resolved and pushed — PR is now mergeable.

The PR (GitHub #5835) was in dirty merge state: its branch 2026-11-07_compress-window-coverage-guard was 495 commits behind master and conflicted on 4 files. A prior merge attempt (108681d45) had integrated an older master (dc041dd1), but master advanced further and the conflicts re-surfaced.

I merged current master into the branch and resolved all 4 conflicts:

Verified before pushing: npm run build + typecheck green; targeted tests green — kernel issue5830-merge-window-guard (8 pass), regression-empty-rewrap, and issue5152-owner-beat (6 pass). Pushed as a fast-forward (fetched first; remote head was an ancestor, so no force-push). I did not edit the PR body — the kernel-change: declaration was already present for the PR's own kernel work, and my version bump is its consequence, not a new kernel change.

Current state: mergeable: true (was false/dirty); mergeable_state: blocked by CI/reviews, not by conflict. CI is running on the new head fa82e6417 — 18 checks completed (all green), 14 queued, 1 in progress, 0 failures so far. If a lane goes red, that's the red-CI half of this bot's job for the next attempt.


七问:

  1. 是什么问题:PR [PR] fix(kernel): reject range folds that would merge blocks beyond the requested ref window #5835 处于 dirty 合并态——分支落后 master 495 个提交、4 个文件冲突,无法合并。
  2. 什么原因导致的:分支从旧 master 切出后未跟进;之前的合并尝试(108681d45)只合入了更旧的 master(dc041dd1),master 继续前进后冲突重现。
  3. 影响范围与严重程度:仅影响该 PR 的可合并性,无用户侧影响;冲突局限于 kernel 版本号(3 个文件)与 [Bug] Watchdog takes its stale-heartbeat reading on its own event loop, so a synchronous stall kills a live proxy (parent-gone → uncompressed 400) #5152 端口握手测试(1 个文件)。
  4. 怎么修复的:把当前 master 合入分支并解决 4 处冲突——kernel 版本取 master 0.0.197 之上 +1 = 0.0.198(合并含 kernel/src 变更,必须高于 master),两个 lockfile 重新生成;[Bug] Watchdog takes its stale-heartbeat reading on its own event loop, so a synchronous stall kills a live proxy (parent-gone → uncompressed 400) #5152 测试保留 PR 侧(与原子发布 receiver 配套),master 侧父进程轮询修复被吸收;fast-forward 推送(推送前已 fetch,远端头是祖先,未 force-push)。
  5. 是否有回归问题:无。build + typecheck 绿;定向测试绿(kernel issue5830-merge-window-guard 8 过、regression-empty-rewrap、[Bug] Watchdog takes its stale-heartbeat reading on its own event loop, so a synchronous stall kills a live proxy (parent-gone → uncompressed 400) #5152 owner-beat 6 过)。合并只带入 master 既有变更 + 解决版本/测试冲突,未改动 PR 的 kernel 守卫行为。
  6. 是否破坏缓存:不涉及。未触碰任何缓存/重试/游标/去重逻辑。
  7. 是否改了设计方向 / 引入新配置:无设计转向,无新配置。kernel 版本 0.0.197→0.0.198 是 PR kernel/src 变更的版本纪律后果,不是新旋钮。

@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.

Re-review at new head aa4175ffa (master merge) — findings only (kernel PR, not approved).

What changed since my last review (fa82e64): a single merge commit integrating master (a446a3c1c). The PR's own contribution — the window gate in projectUnit — is byte-identical to what I reviewed and verified correct (predicate at kernel/src/unit-projection.ts:295, fatal kind at :347, error message at :351 — none touched).

The master merge is clean. Two master-side changes landed in unit-projection.ts, both in regions orthogonal to the gate:

  • The last-user-anchor note now self-labels as a "historical quote, NOT a new user message" (:470) — a model-facing text change from the ti_an incident, already merged on master.
  • #6709's content-free BLOCKED partner un-doom logic (:665-739) — lets a content-free BLOCKED partner flow to rung 2 instead of dooming the #5919 merge; already merged on master.

Execution order keeps them from interacting: the window gate throws at :295, before the #5919 recovery ladder at :665+ runs. A window-guard fatal never reaches the #6709 path, and the #6709 change only alters which stranded partners doom a merge — it does not change which blocks are consumed, so it cannot feed a new case into the gate.

Version: the PR's 0.0.198 bump collided with master's 0.0.199 (lock-sync #3782); the merge resolved it to 0.0.200, consistent across kernel/package.json + root package-lock.json + kernel/package-lock.json (version-guard green).

Verification at the new head:

  • Local targeted: 16/16 pass (issue5830-merge-window-guard 4 + issue5919-shredded-merge #6709-lockstep + regression-empty-rewrap #199).
  • CI on aa4175ffa: 30 checks, 0 failed (26 success / 1 in-progress / 3 skipped-by-design); kernel-guard, version-guard, lane-guard, architecture-docs all green.
  • master a446a3c1c fully contained; prior PR head fa82e6417 is an ancestor.

Verdict: no new blocking findings, no small findings to fix. The gate remains correct and precisely scoped; the merge is clean. This PR touches kernel/ and carries a kernel-change: declaration, so per Kernel Boundary rule 3 it stays at the human-only review tier — not approved here. See the follow-up 需要决策 comment for the authorization request.

@ranxianglei

Copy link
Copy Markdown
Owner Author

🔶 需要决策

本 PR 触碰 kernel/ 且正文已带 kernel-change: 声明——按 Kernel Boundary 规则 3,kernel 变更属人工评审档,review 侧不批准合并,需 owner 授权。

本轮为 head 更新后的复审(fa82e6417 → aa4175ffa,新增一个 master 合并提交 aa4175ffaf):

门禁 diff(相对 master a446a3c1c):kernel/src/unit-projection.ts(window 守卫 +93)、kernel/src/report.ts(acp_status 标记 +2)、kernel 版本 0.0.199→0.0.200 + 双 lockfile、kernel/tests/ 两个测试文件(issue5830 守卫 4 例 + #199 fixture 修复与 fail-closed 负向钉);另有纯测试侧的 #5152 竞态修复(2 个测试文件,零产品行为面)。

独立审核结论:修复正确且精准,无阻塞发现,无小发现需修。详见上方 findings-only review。

行为变更(PR 正文已披露 OLD→NEW,未变):越窗的普通 message-ref 区间折叠,旧行为 = 静默落盘(被吞块摘要被单尾段摘要替换,#5830 生产事故:一块罩 1566 条消息只带 2456 字符尾摘要)→ 新行为 = 整批原子硬拒 + 点名越界块与两条出路(bN..bM / 收窄区间)的可操作错误;窗内合法合并、蒸馏、幂等 resubmit 均不变。

请 owner 授权合并或指示处置。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

查重: 不重复——本线程 floor 6 已给过查重结论;本轮是 review lane 对同一 PR 新 head(aa4175ffa,master 合并后)的独立复审,非新立项。
标签: 保留 bug + scope/kernel + p1 + needs-decision(kernel 变更属人工评审档,待 owner 授权)。

本轮为 head 更新后的独立复审(fa82e6417 → aa4175ffa)。未照抄上轮结论——重新核对了新 head 的 diff、master 合并的语义交互、版本解析,并本地定向跑了三个 kernel 测试文件(16/16 绿)。已在 PR 上提交 findings-only review 与更新版 🔶 需要决策 评论,needs-decision 标签已确认。

八问

  1. 是什么问题:普通 message-ref 区间折叠(mNNNNN..mMMMMM)会静默合并掉那些覆盖范围超出请求窗口的活跃块——新块只带最后一个区间的摘要,被吞块的摘要被悄悄替换(生产事故:一个块罩住从会话开始的 1566 条消息,只带一条 2456 字符的尾段摘要)。
  2. 什么原因导致的:projectUnit 判定要吞哪些块时,只看「块的可见表示(渲染摘要或最早存活的 raw)是否落在解析后的 span 内」;而一个 stale inherited ref 经 activeOwnerAnchor 会解析到继承块的锚点位置(view-index 空间里的无界跳跃),使解析 span 远超请求窗口 → 沿途所有同层块被拖进合并。修复必须落在 kernel 的共享投影里([Bug] recommend/apply 对同一区间的 turn-integrity 判定永久不一致:acp_status 反复推荐的区间被 apply 侧整段拒绝(0.1.196,Range would split N turn(s) at the protected-zone boundary) #3236 单一投影纪律),host 侧修不了。
  3. 影响范围与严重程度:p1 数据质量类(活跃摘要覆盖丢失;原件可经 decompress/directBlockIds 找回,但面板/reconcile 看到的是大跨度薄摘要)。触发面:任何解析 span 会扫到窗外同层活跃块的普通 m..m 折叠(pruned view/compaction 后的 stale inherited ref 是典型路径)。
  4. 怎么修复的:在 projectUnit 单一决策点加一道硬门(fatal kind window):普通区间若会吞掉一个覆盖超出窗口的活跃块,整批原子拒绝(零提交),错误点名越界块并给两条出路(bN..bM 或收窄区间);包含判定按 mappable coverage id 逐格进行,两端都 in-place 解析时按 pair/reasoning 扩边后的实际 span 判(保住 Context compression leak — rose to 350k | 上下文压缩泄露 涨到 35w #5531 恢复路径),不可映射覆盖 fail-closed;块边界蒸馏与纯 resubmit 豁免。
  5. 是否有回归问题:新 head 复核——① PR 自身的 window 守卫逐字节未变(谓词 unit-projection.ts:295、fatal kind :347、错误信息 :351),上轮已验证正确;② master 合并落进 unit-projection.ts 的两处改动(anchor 注记 :470、Version 0.214: compression issues still persist. The problem of old blocks failing to compress remains unresolved. | 0.214版本,压缩依旧存在问题,旧块无法压缩问题依旧存在 #6709 content-free BLOCKED 解除 doom :665-739)与守卫正交,且守卫在 :295 抛出、早于 :665+ 的 New error in v0.213, following up on the previous bug where old blocks can't be compressed and tokens double. | 0.213版本新报错,接着上次的旧块无法压缩token翻倍bug #5919 恢复梯,执行顺序保证不交互——Version 0.214: compression issues still persist. The problem of old blocks failing to compress remains unresolved. | 0.214版本,压缩依旧存在问题,旧块无法压缩问题依旧存在 #6709 只改「哪些 stranded partner doom 合并」,不改「消费哪些块」,无法给守卫喂入新 case;③ 版本 0.0.198(PR)vs 0.0.199(master)冲突解析为 0.0.200,双 lockfile 一致(version-guard 绿);④ 高危模式(语义漂移、fail-fast 变吞错、阈值/时序/输出格式漂移)逐项过:均不涉及。唯一行为变更就是本修复本身(见披露)。
  6. 是否破坏缓存:不涉及(未触碰任何缓存/重试/增量游标/去重键)。
  7. 是否改了设计方向:不涉及——gate 留在 projectUnit 共享投影内,[Bug] recommend/apply 对同一区间的 turn-integrity 判定永久不一致:acp_status 反复推荐的区间被 apply 侧整段拒绝(0.1.196,Range would split N turn(s) at the protected-zone boundary) #3236 纪律不变。
  8. 是否引入了新的配置:无 env/config/默认值变更。行为变更披露(OLD→NEW,未变):越窗的普通区间折叠,旧行为 = 静默落盘(被吞块摘要被替换,可经 decompress 找回)→ 新行为 = 整批原子硬拒 + 点名越界块的可操作错误;窗内合法合并、蒸馏、幂等 resubmit 均不变。kernel 版本(相对 master)0.0.199→0.0.200(版本纪律后果,双 lockfile 同步)。

判定:PR 内容本身可合——修复正确、范围精准、测试双向钉死(本地定向 16/16)、CI 全绿(30 checks,0 failed)、master 合并干净。因触碰 kernel/,按 Kernel Boundary 属人工评审档:已提交 findings-only review 与更新版 🔶 需要决策 评论、needs-decision 标签已确认,合并待 owner 授权。

… (dirty merge state, #5835)

Master advanced 99 commits (kernel 0.0.200 -> 0.0.201) since the last merge. Resolved 3 version conflicts: kernel version -> 0.0.202 (master's 0.0.201 + 1 for this PR's merge-window guard kernel/src changes), lockfiles regenerated to 0.0.202. Verified: build + typecheck green, issue5830-merge-window-guard 4 pass, regression-empty-rewrap 4 pass, issue5152-owner-beat 6 pass.
@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

冲突已解决并推送:merge commit a3abdd7c203(无 [ework:ci-held] 标记,CI 全量跑)。合并状态应转 clean。

七问

  1. 是什么问题:PR 与 base 分支冲突(merge state: dirty)——master 自上次合入(a446a3c1c)后又前进了 99 个 commit(到 ba2e8198203),kernel/package.json、kernel/package-lock.json、package-lock.json 三个文件冲突,PR 无法合并。
  2. 什么原因导致的:本 PR 改 kernel/src/**(merge-window guard),按版本纪律 kernel 版本必须高于 master;master 侧 kernel 已到 0.0.201,PR head 是 0.0.200,version 行三方冲突。与前两轮(108681d、fa82e6417、aa4175ffaf)完全同一模式——PR 在途期间 master 持续前进的常规版本冲突,非代码逻辑冲突。
  3. 影响范围与严重程度:仅阻塞本 PR 可合并性,无运行时/用户侧影响。
  4. 怎么修复的:git merge origin/master(ba2e819)进 PR 分支;三处冲突解法——kernel 版本 → 0.0.202(master 的 0.0.201 + 1,因本 PR 含 kernel/src 变更,必须高于 master);两份 lockfile 取 master 侧后按 lock-sync 门命令重新生成到 0.0.202。本地验证:build ✅、typecheck ✅、定向测试全绿——issue5830-merge-window-guard 4 pass、regression-empty-rewrap 4 pass、issue5152-owner-beat 6 pass。合并后相对 master 的净 diff 恰为 PR 原有 9 个文件(unit-projection.ts +93、report.ts +2、两个 kernel 测试、version+lockfiles、[Bug] Watchdog takes its stale-heartbeat reading on its own event loop, so a synchronous stall kills a live proxy (parent-gone → uncompressed 400) #5152 测试两文件),零多余改动。
  5. 是否有回归问题:无。本轮只解 version/lockfile 冲突,PR diff 本身未动(净 diff 已核对);master 侧 99 个 commit 的变更随 merge 原样带入,未做任何取舍。
  6. 是否破坏了缓存:不涉及。
  7. 是否改了设计方向 / 引入了新配置:均不涉及。

状态:最终 head a3abdd7c203 已推送(先 fetch 确认远端 head 未动,fast-forward 推送,无 force-push)。CI 将对该 head 全量跑一次;另注:镜像缓存显示上一 head aa4175ffaf 的 30 项 check 已全绿(上轮触发的 windows-22-2 #5631 flake 重跑已转绿)。PR 内容侧仍待 owner kernel 档授权(floor 26/28,needs-decision 标签在)。

@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.

Re-review at head a3abdd7c203 (third head; progression fa82e6417 → aa4175ffa → a3abdd7c203).

What changed since the last head (aa4175ffa): one master-merge commit integrating master ba2e8198203. The PR's own contribution is byte-identical — kernel/src/unit-projection.ts (the window guard) and kernel/src/report.ts are untouched by the merge (git diff aa4175ffa a3abdd7c203 -- kernel/src/unit-projection.ts kernel/src/report.ts is empty).

Master-merge cleanliness: the merge pulled in the #7428 batch-seam double-claim fix in kernel/src/compress.ts (refreshes preExistingCoverage at the top of the apply loop so each sibling range claims against earlier siblings in the same batch; refines the no-op warning wording). I traced the call flow: projectUnit (the guard) runs at compress.ts:1780 inside applySingleRange, which runs after the preExistingCoverage refresh at :817. The guard reads consumedBlockIds + block.effectiveMessageIds + messageRefs — it does not read preExistingCoverage, so the batch-seam fix does not change the guard's judgment for a given range. The only interaction is the intended one: earlier siblings now create active blocks in the shared state, so a later sibling's consumedBlockIds reflects them — which is exactly the cross-window merge the guard exists to reject. No regression.

Version: master 0.0.201 → PR head 0.0.202 (version-discipline consequence of the in-repo kernel change; consistent across kernel/package.json + both lockfiles).

Verification at the new head: local targeted 19/19 pass (window guard 4 + #7428 batch-seam + #6709 shredded-merge + #199 empty-rewrap); CI 30 checks, 0 failed, 0 pending; master ba2e8198203 fully contained, prior head aa4175ffa is an ancestor.

Gated diff (vs master ba2e8198203): kernel/src/unit-projection.ts (+93, the window guard), kernel/src/report.ts (+2, acp_status flag), kernel version 0.0.201→0.0.202 + both lockfiles, kernel/tests/issue5830-merge-window-guard.test.ts (+174, 4 tests), kernel/tests/regression-empty-rewrap.test.ts (+76/-1, #199 fixture repair + fail-closed pin); plus test-only #5152 race fix (2 files, zero product behavior).

Independent verdict: the fix is correct and precisely scoped; the master merge is clean; no blocking findings, no small findings to fix.

Authorization boundary: this PR touches kernel/ and carries a kernel-change: declaration — per Kernel Boundary rule 3, kernel changes sit at the human-only review tier. I am not approving. See the follow-up 🔶 需要决策 comment for the owner-authorization request.

@ranxianglei

Copy link
Copy Markdown
Owner Author

🔶 需要决策

本 PR 触碰 kernel/ 且正文已带 kernel-change: 声明——按 Kernel Boundary 规则 3,kernel 变更属人工评审档,review 侧不批准合并,需 owner 授权。

本轮为 head 更新后的第三轮复审(aa4175ffa → a3abdd7c203,新增一个 master 合并提交,集成 master ba2e8198203):

门禁 diff(相对 master ba2e8198203):kernel/src/unit-projection.ts(window 守卫 +93)、kernel/src/report.ts(acp_status 标记 +2)、kernel 版本 0.0.201→0.0.202 + 双 lockfile、kernel/tests/issue5830-merge-window-guard.test.ts(+174,4 例)、kernel/tests/regression-empty-rewrap.test.ts(+76/-1,#199 fixture 修复 + fail-closed 负向钉);另有纯测试侧的 #5152 竞态修复(2 个测试文件,零产品行为面)。

独立审核结论:修复正确且精准,master 合并干净,无阻塞发现,无小发现需修。详见上方 findings-only review。

行为变更(PR 正文已披露 OLD→NEW,未变):越窗的普通 message-ref 区间折叠,旧行为 = 静默落盘(被吞块摘要被单尾段摘要替换,#5830 生产事故:一块罩 1566 条消息只带 2456 字符尾摘要)→ 新行为 = 整批原子硬拒 + 点名越界块与两条出路(bN..bM / 收窄区间)的可操作错误;窗内合法合并、蒸馏、幂等 resubmit 均不变。

请 owner 授权合并或指示处置。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

查重: 不重复——本线程 floor 6 已给过查重结论;本轮是 review lane 对同一 PR 第三轮 head(a3abdd7c203,master 合并后)的独立复审,非新立项。
标签: 保留 bug + scope/kernel + p1 + needs-decision(kernel 变更属人工评审档,待 owner 授权)。

本轮为 head 更新后的第三轮独立复审(aa4175ffa → a3abdd7c203)。未照抄前两轮结论——重新核对了新 head 的 diff、master 合并带入的 #7428 batch-seam 修复与守卫的交互、版本解析,并本地定向跑了四个 kernel 测试文件(19/19 绿)。已在 PR 上提交 findings-only review 与更新版 🔶 需要决策 评论,needs-decision 标签已确认。

八问

  1. 是什么问题:普通 message-ref 区间折叠(mNNNNN..mMMMMM)会静默合并掉那些覆盖范围超出请求窗口的活跃块——新块只带最后一个区间的摘要,被吞块的摘要被悄悄替换(生产事故:一个块罩住从会话开始的 1566 条消息,只带一条 2456 字符的尾段摘要)。
  2. 什么原因导致的:projectUnit 判定要吞哪些块时,只看「块的可见表示是否落在解析后的 span 内」;而一个 stale inherited ref 经 activeOwnerAnchor 会解析到继承块的锚点位置(view-index 空间里的无界跳跃),使解析 span 远超请求窗口 → 沿途所有同层块被拖进合并。修复必须落在 kernel 的共享投影里([Bug] recommend/apply 对同一区间的 turn-integrity 判定永久不一致:acp_status 反复推荐的区间被 apply 侧整段拒绝(0.1.196,Range would split N turn(s) at the protected-zone boundary) #3236 单一投影纪律),host 侧修不了。
  3. 影响范围与严重程度:p1 数据质量类(活跃摘要覆盖丢失;原件可经 decompress/directBlockIds 找回,但面板/reconcile 看到的是大跨度薄摘要)。触发面:任何解析 span 会扫到窗外同层活跃块的普通 m..m 折叠(pruned view/compaction 后的 stale inherited ref 是典型路径)。
  4. 怎么修复的:在 projectUnit 单一决策点加一道硬门(fatal kind window):普通区间若会吞掉一个覆盖超出窗口的活跃块,整批原子拒绝(零提交),错误点名越界块并给两条出路(bN..bM 或收窄区间);包含判定按 mappable coverage id 逐格进行,两端都 in-place 解析时按 pair/reasoning 扩边后的实际 span 判(保住 Context compression leak — rose to 350k | 上下文压缩泄露 涨到 35w #5531 恢复路径),不可映射覆盖 fail-closed;块边界蒸馏与纯 resubmit 豁免。
  5. 是否有回归问题:新 head 复核——① PR 自身的 window 守卫逐字节未变(unit-projection.ts、report.ts 均未被合并触碰),前两轮已验证正确;② 本次 master 合并带入 [PR] fix: two adjacent ranges in one compress batch both claimed the shared seam tool pair — first-come-first-served #7428 batch-seam 双重认领修复(compress.ts apply 阶段刷新 preExistingCoverage),追调用链确认:守卫在 compress.ts:1780 的 applySingleRange 内运行、晚于 :817 的刷新,且守卫只读 consumedBlockIds+block.effectiveMessageIds+messageRefs、不读 preExistingCoverage,故不改变守卫对任一区间的判决;唯一交互是预期内的(更早 sibling 在共享状态建出活跃块,使更晚 sibling 的 consumedBlockIds 反映它们——正是守卫要拦的越窗合并),无回归;③ 版本 master 0.0.201 → PR head 0.0.202,双 lockfile 一致(version-guard 绿);④ 高危模式(语义漂移、fail-fast 变吞错、阈值/时序/输出格式漂移)逐项过:均不涉及。唯一行为变更就是本修复本身(见披露)。
  6. 是否破坏缓存:不涉及(未触碰任何缓存/重试/增量游标/去重键)。
  7. 是否改了设计方向:不涉及——gate 留在 projectUnit 共享投影内,[Bug] recommend/apply 对同一区间的 turn-integrity 判定永久不一致:acp_status 反复推荐的区间被 apply 侧整段拒绝(0.1.196,Range would split N turn(s) at the protected-zone boundary) #3236 纪律不变。
  8. 是否引入了新的配置:无 env/config/默认值变更。行为变更披露(OLD→NEW,未变):越窗的普通区间折叠,旧行为 = 静默落盘(被吞块摘要被替换,可经 decompress 找回)→ 新行为 = 整批原子硬拒 + 点名越界块的可操作错误;窗内合法合并、蒸馏、幂等 resubmit 均不变。kernel 版本(相对 master)0.0.201→0.0.202(版本纪律后果,双 lockfile 同步)。

判定:PR 内容本身可合——修复正确、范围精准、测试双向钉死(本地定向 19/19)、CI 全绿(30 checks,0 failed,0 pending)、master 合并干净。因触碰 kernel/,按 Kernel Boundary 属人工评审档:已提交 findings-only review 与更新版 🔶 需要决策 评论、needs-decision 标签已确认,合并待 owner 授权。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

第三轮复审收尾确认(head a3abdd7c203,master 合并后):

  • PR 自身 window 守卫逐字节未变(unit-projection.ts + report.ts 未被合并触碰),前两轮已验证正确。
  • master 合并干净:带入的 [PR] fix: two adjacent ranges in one compress batch both claimed the shared seam tool pair — first-come-first-served #7428 batch-seam 修复在 compress.ts apply 阶段、不读 preExistingCoverage,与守卫无交互(唯一交互是预期内的越窗合并拦截);master ba2e8198203 完全包含,旧 head aa4175ffa 为祖先。
  • 版本 master 0.0.201 → PR head 0.0.202,双 lockfile 一致(version-guard 绿)。
  • 验证:本地定向 19/19 绿;CI 30 checks,0 failed,0 pending。

结论:无阻塞发现、无小发现需修,PR 内容本身可合。因触碰 kernel/,按 Kernel Boundary 属人工评审档——已在 PR 上提交 findings-only review 与 🔶 需要决策 评论、needs-decision 标签已确认,合并待 owner 授权。完整八问见上方楼层。

… (behind/dirty state, #5835)

Master advanced 125 commits (kernel 0.0.202 -> 0.0.203) since the last merge. Resolved 3 version conflicts: kernel version -> 0.0.204 (master's 0.0.203 + 1 for this PR's merge-window guard kernel/src changes), lockfiles regenerated to 0.0.204. Verified: build + typecheck green, issue5830-merge-window-guard 4 pass, regression-empty-rewrap 4 pass, issue5152-owner-beat 6 pass. Net diff vs master unchanged: exactly the PR's 9 files.
@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

第二轮 master 集成完成:merge commit 2250ce20eb4 已推送(无 [ework:ci-held] 标记,CI 全量跑)。PR 相对 master 的 behind/dirty 状态应清除。

七问

  1. 是什么问题:PR 再次落后 base 分支——master 自上一轮合入(ba2e8198203)后又前进 125 个 commit(到 0b68ade725c),kernel/package.json、kernel/package-lock.json、package-lock.json 三处 version 冲突,merge state 回到 behind/dirty,PR 无法合并。
  2. 什么原因导致的:与前三轮(108681d、fa82e6417、aa4175ffaf、a3abdd7c203)完全同一模式:本 PR 改 kernel/src/**,kernel 版本必须高于 master;master 侧 kernel 已到 0.0.203,PR head 是 0.0.202,version 行三方冲突。PR 在途期间 master 持续前进的常规版本冲突,非代码逻辑冲突。
  3. 影响范围与严重程度:仅阻塞本 PR 可合并性,无运行时/用户侧影响。
  4. 怎么修复的:git merge origin/master(0b68ade)进 PR 分支;三处冲突解法同前——kernel 版本 → 0.0.204(master 的 0.0.203 + 1);两份 lockfile 取 master 侧后按 lock-sync 门命令重新生成到 0.0.204。本地验证:build ✅、typecheck ✅、定向测试全绿(issue5830-merge-window-guard 4 pass、regression-empty-rewrap 4 pass、issue5152-owner-beat 6 pass)。合并后相对 master 净 diff 仍恰为 PR 原有 9 个文件,零多余改动。
  5. 是否有回归问题:无。本轮只解 version/lockfile 冲突,PR diff 未动(净 diff 已核对);master 侧 125 个 commit 原样带入,未做取舍。另:镜像缓存显示上一 head a3abdd7c203 的 30 项 check 全绿(0 失败),即上轮合并后 CI 已全绿,本轮唯一阻塞就是 behind 状态。
  6. 是否破坏了缓存:不涉及。
  7. 是否改了设计方向 / 引入了新配置:均不涉及。

状态:推送前已 fetch 确认远端 head 未动(a3abdd7c203),fast-forward 推送,无 force-push。CI 将在 2250ce20eb4 上全量跑一次;内容侧仍待 owner kernel 档授权(needs-decision 标签在,floor 26/28)。

… (behind/dirty state, #5835)

Master advanced 327 commits (kernel 0.0.204 -> 0.0.208) since the last merge. Resolved 3 version conflicts: kernel version -> 0.0.209 (master's 0.0.208 + 1 for this PR's merge-window guard kernel/src changes), lockfiles regenerated to 0.0.209. Verified: build + typecheck green, issue5830-merge-window-guard 4 pass, regression-empty-rewrap 4 pass, issue5152-owner-beat 6 pass. Net diff vs master unchanged: exactly the PR's 9 files.
@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

第三轮 master 集成完成:merge commit 0c08a8341b2 已推送(无 [ework:ci-held] 标记,CI 全量跑)。PR 相对 master 的 behind/dirty 状态应清除。

七问

  1. 是什么问题:PR 第三次落后 base 分支——master 自上一轮合入(0b68ade725c)后又前进 327 个 commit(到 029cddaac0b),kernel/package.json、kernel/package-lock.json、package-lock.json 三处 version 冲突,merge state 回到 behind/dirty,PR 无法合并。
  2. 什么原因导致的:与前四轮(108681d、fa82e6417、aa4175ffaf、a3abdd7c203、2250ce20eb4)完全同一模式:本 PR 改 kernel/src/**,kernel 版本必须高于 master;master 侧 kernel 已到 0.0.208,PR head 是 0.0.204,version 行三方冲突。PR 在途等 kernel 档授权期间 master 持续前进(约两天 327 个 commit),behind/dirty 会周期性复现——这是该 PR 在途的结构性状态,不是新缺陷。
  3. 影响范围与严重程度:仅阻塞本 PR 可合并性,无运行时/用户侧影响。
  4. 怎么修复的:git merge origin/master(029cdda)进 PR 分支;三处冲突解法同前——kernel 版本 → 0.0.209(master 的 0.0.208 + 1);两份 lockfile 取 master 侧后按 lock-sync 门命令重新生成到 0.0.209。本地验证:build ✅、typecheck ✅、定向测试全绿(issue5830-merge-window-guard 4 pass、regression-empty-rewrap 4 pass、issue5152-owner-beat 6 pass)。合并后相对 master 净 diff 仍恰为 PR 原有 9 个文件,零多余改动。
  5. 是否有回归问题:无。本轮只解 version/lockfile 冲突,PR diff 未动(净 diff 已核对);master 侧 327 个 commit 原样带入,未做取舍。另:镜像缓存显示上一 head 2250ce20eb4 的 30 项 check 全绿(0 失败),即上轮合并后 CI 已全绿,本轮唯一阻塞就是 behind 状态。
  6. 是否破坏了缓存:不涉及。
  7. 是否改了设计方向 / 引入了新配置:均不涉及。

状态:推送前已 fetch 确认远端 head 未动(2250ce20eb4),fast-forward 推送,无 force-push。CI 将在 0c08a8341b2 上全量跑一次;内容侧仍待 owner kernel 档授权(needs-decision 标签在,floor 26/28)——授权前 behind/dirty 可能随 master 前进再次复现,届时按同一机械流程处理。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

本轮为 no-op:唤醒时检测到的 dirty 状态是镜像缓存滞后造成的竞态,分支实际已 up-to-date,无冲突可解、无推送可做。

七问

  1. 是什么问题:系统检测到「PR 与 base 冲突(merge state: dirty)」。但本轮 live 核验:PR 分支 head 0c08a8341b2(上一轮推送的最终 head)已包含 master 全部 commit——git rev-list --count origin/branch..origin/master = 0,分支不落后、无冲突。
  2. 什么原因导致的:唤醒竞态——镜像在上一轮推送落地之前的轮询里检测到 behind/dirty,转发到达时距上一轮 push 仅 16 秒;且镜像 check 缓存仍停在两个 head 之前的 2250ce20eb4(fetched_at 2026-11-22T14:43:21Z),尚未轮询到最新 head 0c08a8341b2,其记录的 "blocked" 是旧 head 的旧状态。
  3. 影响范围与严重程度:无实际影响——分支内容无变化,CI 无红腿(镜像缓存中最近已轮询 head 的 30 项 check 全绿);仅唤醒信号本身是过期的。
  4. 怎么处置的:按 status freshness 纪律先 live 核验(git fetch 后比对 branch 与 master 的 commit 差 + 镜像缓存),确认无需合并、无需推送后不做任何 push/merge(空推送会白白消耗该分支唯一的 CI 全量跑额度)。等待镜像下一次成功轮询 0c08a8341b2 后,merge state 应自行转 clean。
  5. 是否有回归问题:不涉及——零改动。
  6. 是否破坏了缓存:不涉及——零改动。
  7. 是否改了设计方向 / 引入了新配置:均不涉及。

状态:分支 head 0c08a8341b2(无 [ework:ci-held] 标记)= 待 CI 全量跑的 final head;内容侧仍待 owner kernel 档授权(needs-decision 标签在,floor 26/28)。若镜像在后续轮询后仍报 dirty(即新 head 上真出现冲突),下轮唤醒再按机械流程处理。

… (behind/dirty state, #5835)

Master advanced 123 commits (kernel 0.0.209 -> 0.0.210) since the last merge. Resolved 3 version conflicts: kernel version -> 0.0.211 (master's 0.0.210 + 1 for this PR's merge-window guard kernel/src changes), lockfiles regenerated to 0.0.211. Verified: build + typecheck green, issue5830-merge-window-guard 4 pass, regression-empty-rewrap 4 pass, issue5152-owner-beat 6 pass. Net diff vs master unchanged: exactly the PR's 9 files.
@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

第四轮 master 集成完成:merge commit a85f9c3b0 已推送(无 [ework:ci-held] 标记,CI 全量跑)。PR 相对 master 的 behind/dirty 状态应清除。

七问

  1. 是什么问题:PR 第四次落后 base 分支——master 自上一轮合入(029cddaac0b)后又前进 123 个 commit(到 85afa7b21),kernel/package.json、kernel/package-lock.json、package-lock.json 三处 version 冲突,merge state 回到 behind/dirty,PR 无法合并。
  2. 什么原因导致的:与前几轮(108681d、fa82e6417、aa4175ffaf、a3abdd7c203、2250ce20eb4、0c08a8341b2)完全同一模式:本 PR 改 kernel/src/**,kernel 版本必须高于 master;master 侧 kernel 已到 0.0.210,PR head 是 0.0.209,version 行三方冲突。PR 在途等 kernel 档授权期间 master 持续前进,behind/dirty 周期性复现——该 PR 在途的结构性状态,非新缺陷。
  3. 影响范围与严重程度:仅阻塞本 PR 可合并性,无运行时/用户侧影响。
  4. 怎么修复的:git merge origin/master(85afa7b)进 PR 分支;三处冲突解法同前——kernel 版本 → 0.0.211(master 的 0.0.210 + 1);两份 lockfile 取 master 侧后按 lock-sync 门命令重新生成到 0.0.211。本地验证:build ✅、typecheck ✅、定向测试全绿(issue5830-merge-window-guard 4 pass、regression-empty-rewrap 4 pass、issue5152-owner-beat 6 pass)。合并后相对 master 净 diff 仍恰为 PR 原有 9 个文件,零多余改动。
  5. 是否有回归问题:无。本轮只解 version/lockfile 冲突,PR diff 未动(净 diff 已核对);master 侧 123 个 commit 原样带入,未做取舍。另:镜像缓存本轮已追上 head 0c08a8341b2,其 30 项 check 全绿(0 失败)——上轮合并后 CI 已全绿,本轮唯一阻塞就是 behind 状态。
  6. 是否破坏了缓存:不涉及。
  7. 是否改了设计方向 / 引入了新配置:均不涉及。

状态:推送前已 fetch 确认远端 head 未动(0c08a8341b2),fast-forward 推送,无 force-push。CI 将在 a85f9c3b0 上全量跑一次;内容侧仍待 owner kernel 档授权(needs-decision 标签在,floor 26/28)——授权前 behind/dirty 可能随 master 前进再次复现,届时按同一机械流程处理。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

本轮再次 no-op:唤醒时的 dirty 状态仍是镜像缓存滞后竞态——分支实际已 up-to-date(与上一轮 no-op 判定同因),无冲突可解、无推送可做。

七问

  1. 是什么问题:系统检测到「PR 与 base 冲突(merge state: dirty)」。live 核验:PR 分支 head a85f9c3b0(上一轮推送的最终 head)已包含 master 全部 commit——git rev-list --count origin/branch..origin/master = 0,分支不落后、无冲突。
  2. 什么原因导致的:与上一轮 no-op 完全同因:镜像在上一轮推送落地之前的轮询里检测到 behind/dirty,转发到达时距上一轮 push 仅 24 秒;镜像 check 缓存仍停在上一 head 0c08a8341b2(fetched_at 2026-11-24T01:46:05Z),尚未轮询到 a85f9c3b0,其 "behind" 是旧 head 的旧状态。
  3. 影响范围与严重程度:无实际影响——分支内容无变化,无红腿(镜像缓存中最近已轮询 head 的 30 项 check 全绿);仅唤醒信号本身是过期的。
  4. 怎么处置的:按 status freshness 纪律 live 核验(git fetch 后比对 branch 与 master 的 commit 差 + 镜像缓存,并等待 75s 复看镜像是否追上),确认无需合并、无需推送后不做任何 push/merge(空推送会白白消耗该分支唯一的 CI 全量跑额度)。等镜像下一次成功轮询 a85f9c3b0 后 merge state 应自行转 clean。
  5. 是否有回归问题:不涉及——零改动。
  6. 是否破坏了缓存:不涉及——零改动。
  7. 是否改了设计方向 / 引入了新配置:均不涉及。

状态:分支 head a85f9c3b0(无 [ework:ci-held] 标记)= 待 CI 全量跑的 final head;内容侧仍待 owner kernel 档授权(needs-decision 标签在,floor 26/28)。若镜像后续轮询到新 head 后仍报 dirty(即真出现新冲突),下轮再按机械流程处理。

@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)

Round-5 review — head a85f9c3b003 (master 85afa7b212c merged in). Verdict: no blocking findings; merge awaits owner kernel authorization (Kernel Boundary rule 3, human-only tier).

What changed since the last posted round (a3abdd7c203): master advanced 125 commits (0b68ade725c → 85afa7b212c); the CI engineer merged it in (a85f9c3b003). Kernel version is now 0.0.210 → 0.0.211 (master+1, both lockfiles in step). The PR's own contribution is byte-identical to the previously reviewed code — the 9-file net diff vs the new master is unchanged; the guard at kernel/src/unit-projection.ts:298-385 and the acp_status marker at kernel/src/report.ts:589-590 are untouched by the merge.

Master-side changes in the interaction files — verified compatible one by one:

  • #1592/#6345 clampAdjustmentAtCoverage (unit-projection.ts): clamps the pair-boundary ADJUSTMENT at active-coverage boundaries — re-fold (requested span overlaps the block) CONTAINS the block's full span; drag-in (disjoint) stays out. Complementary to the guard: a drag-in block never becomes visible in the range, so it never reaches consumedBlockIds (nothing to consume); a contained re-fold flows into the guard's in-place span widening (unit-projection.ts:342-350 widens over the post-clamp rangeMessageIds), so the contained block's coverage is judged in-span — no false rejection. The requested span itself is never clamped, so the snapped-endpoint case (the #5830 producer) is unaffected and still caught.
  • #7596 split-doomed no-op (compress.ts:1847): adds a second no-op class (split + degradable). The window fatal carries no degradable flag (only the split path at unit-projection.ts:598 sets it) → it still throws; batch atomicity intact (preLoopState rollback at compress.ts:800, :894-899).
  • recommend.ts:785: the generic fatal demotion (projection.fatal !== null → return false) is unchanged — window fatals demote to gaps, advertise/execute consistency (#3236) holds.
  • nudge-text.ts/packs.ts wording ("JSON-escaped" → "plain string"): master-side model-facing text already merged; no interaction with the guard.

Verification on this head:

  • Kernel full suite: 1683/1683 pass.
  • Targeted: issue5830-merge-window-guard + regression-empty-rewrap 8/8; issue5152-owner-beat-survives-host-stall 6/6.
  • Red-check (previous round, still valid — guard code byte-identical): the new test file fails against pre-fix kernel/src (the #5830 repro red, 3 controls green) → the test pins the bug.
  • CI (mirror cache, fetched 2026-11-25T00:08:15Z, sha a85f9c3b003): 30 checks, 0 failed, 0 pending — all test lanes (ubuntu 22/24, windows 22 shards) success, static-gates success, mysql-contract success, e2e lanes skipped by design.

Findings (non-blocking):

  1. Stale PR-body version line: "Kernel version: 0.0.182 → 0.0.183" — actual is 0.0.210 → 0.0.211 after the five master merges. Informational only; the reviewer's only permitted body edit is the kernel-change: line, which is present and correct.
  2. Residual hole (design-level, pre-existing, out of scope): in the SNAPPED case (endpoint resolved elsewhere via activeOwnerAnchor), if the covering block is a DIFFERENT tier (e.g. T2 — not in consumedBlockIds → no offender → gate skipped), uncovered gap messages between the snapped anchor and the requested window enter the new block as direct ids without the summary describing them. Milder than #5830 (gap messages only, recoverable via decompress); the snap mechanism predates this PR (#32 livelock fix). Recommendation: accept for now; optionally extend the gate later to reject/trim out-of-window direct ids in the snapped case.

Behavior change disclosure (OLD→NEW): a plain message-ref range that would consume an active block whose coverage extends beyond the requested window: OLD = folded silently (the block's wider-span summary replaced by one that never saw part of it — the #5830 incident); NEW = atomic batch rejection naming the offenders with two exits (bN..bM / narrow the range). Block-boundary merges and pure resubmits are exempt by contract; in-place folds with #5531 pair-widening are judged against the widened span (no false rejection). This is the fix's intended behavior — no unintended drift found.

Verdict: findings-only — no approve (kernel PR, human-only tier). No blocking findings; no mechanical small findings to fix. Merge awaits owner authorization.

@ranxianglei

Copy link
Copy Markdown
Owner Author

🔶 需要决策

本 PR 触碰 kernel/ 且正文已带 kernel-change: 声明——按 Kernel Boundary 规则 3,kernel 变更属人工评审档,review 侧不批准合并,需 owner 授权。

本轮为 head 更新后的复审(上一 posted 轮 head a3abdd7c203 → 本轮 a85f9c3b003;CI 工程师合入 master 85afa7b212c,master 前进 125 个提交。期间 2250ce20eb4 一轮因会话中断未回帖,其结论已被本轮覆盖):

门禁 diff(相对 master 85afa7b212c):kernel/src/unit-projection.ts(window 守卫 +93)、kernel/src/report.ts(acp_status 标记 +2)、kernel 版本 0.0.210→0.0.211 + 双 lockfile、kernel/tests/issue5830-merge-window-guard.test.ts(+174,4 例)、kernel/tests/regression-empty-rewrap.test.ts(+76/-1,#199 fixture 修复 + fail-closed 负向钉);另有纯测试侧的 #5152 竞态修复(2 个测试文件,零产品行为面)。

独立审核结论:修复正确且精准,master 合并干净,无阻塞发现,无小发现需修。详见上方 findings-only review。

行为变更(PR 正文已披露 OLD→NEW,未变):越窗的普通 message-ref 区间折叠,旧行为 = 静默落盘(被吞块摘要被单尾段摘要替换,#5830 生产事故:一块罩 1566 条消息只带 2456 字符尾摘要)→ 新行为 = 整批原子硬拒 + 点名越界块与两条出路(bN..bM / 收窄区间)的可操作错误;窗内合法合并、蒸馏、幂等 resubmit 均不变。

遗留项(非阻塞,设计层):snap 端点情形下,若覆盖块为不同层(如 T2,不在 consumedBlockIds → 无 offender → 门跳过),snap 锚点与请求窗口之间的未覆盖 gap 消息会以 direct id 进入新块而摘要未描述它们。比 #5830 轻(仅 gap 消息,可经 decompress 找回);snap 机制先于本 PR(#32 livelock fix),超出本 PR 声明范围(门只对 consumed 块设防)。建议:现在接受;后续可选地把门扩展到 snap 情形下拒绝/裁剪窗外 direct id。

请 owner 授权合并或指示处置。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

Round-5 review complete — head a85f9c3b003 (CI engineer merged master 85afa7b212c into the PR branch; master advanced 125 commits since the last posted round).

What changed: the PR's own contribution (the window guard) is byte-identical to the previously reviewed code — the 9-file net diff vs the new master is unchanged. Kernel version is now 0.0.210 → 0.0.211 (master+1, both lockfiles in step).

Verified on this head:

Findings (non-blocking, nothing to fix on the spot):

  1. Stale PR-body version line ("0.0.182 → 0.0.183" vs actual 0.0.210 → 0.0.211) — informational only; the reviewer's only permitted body edit is the kernel-change: line (present, correct).
  2. Residual hole (design-level, pre-existing, out of scope): in the snapped-endpoint case with a different-tier coverer (e.g. T2), uncovered gap messages between the snapped anchor and the requested window enter the new block as direct ids without the summary describing them. Milder than compress merges disjoint ranges into earlier coverage but retains only the last summary #5830 (gap only, decompress-recoverable); the snap mechanism predates the PR. Recommendation: accept for now; optionally extend the gate later.

Verdict: no blocking findings; no approve — the PR touches kernel/, so per Kernel Boundary rule 3 it sits at the human-only review tier. Findings-only review (#5835 (review)) + 🔶 需要决策 comment posted on the PR; needs-decision label confirmed. Merge awaits owner authorization.

八问

  1. 是什么问题:普通 message-ref 区间折叠(mNNNNN..mMMMMM)会静默合并掉覆盖范围超出请求窗口的活跃块——新块只带最后一个区间的摘要,被吞块的摘要被悄悄替换(compress merges disjoint ranges into earlier coverage but retains only the last summary #5830 生产事故:一个块罩住从会话开始的 1566 条消息,只带一条 2456 字符的尾段摘要)。
  2. 什么原因导致的:projectUnit 判定要吞哪些块时,只看「块的可见表示是否落在解析后的 span 内」;stale inherited ref 经 activeOwnerAnchor 会解析到继承块锚点(view-index 空间的无界跳跃),使解析 span 远超请求窗口,沿途同层块全被拖进合并。修复必须落在 kernel 共享投影([Bug] recommend/apply 对同一区间的 turn-integrity 判定永久不一致:acp_status 反复推荐的区间被 apply 侧整段拒绝(0.1.196,Range would split N turn(s) at the protected-zone boundary) #3236 单一投影纪律),host 侧修不了。
  3. 影响范围与严重程度:p1 数据质量类(活跃摘要覆盖丢失;原件可经 decompress 找回,但面板/reconcile 看到的是大跨度薄摘要)。触发面:任何解析 span 会扫到窗外同层活跃块的普通 m..m 折叠(pruned view/compaction 后的 stale inherited ref 是典型路径)。
  4. 怎么修复的:在 projectUnit 单一决策点加硬门(fatal kind window):普通区间若会吞掉覆盖超窗的活跃块,整批原子拒绝(零提交),错误点名越界块并给两条出路(bN..bM / 收窄区间);包含判定按 mappable coverage id 逐格进行,两端 in-place 解析时按 pair/reasoning 扩边后的实际 span 判(保住 Context compression leak — rose to 350k | 上下文压缩泄露 涨到 35w #5531 恢复路径),不可映射覆盖 fail-closed;块边界蒸馏与纯 resubmit 豁免。
  5. 是否有回归问题:本轮(head a85f9c3)逐项复核——① PR 自身守卫逐字节未变;② master 侧 dsh 缓存失效 #1592 clamp 与守卫互补(drag-in 不进 consumed、re-fold 经扩 span 判窗内、requested span 从不被钳制 → snap 情形仍被拦);Batch compression should not fail entirely; protected messages should be automatically excluded. | 批量压缩不应该全部失败,保护消息应该自动剔除 #7596 no-op 不吞 window fatal(无 degradable 标记 → 仍 throw,批量原子性不变);recommend 降级不变;③ 版本 master 0.0.210 → PR 0.0.211,双 lockfile 一致;④ 高危模式(语义漂移、fail-fast 变吞错、阈值/时序/输出格式漂移)逐项过:均不涉及。唯一行为变更就是本修复本身(见披露)。
  6. 是否破坏缓存:不涉及(未触碰任何缓存/重试/增量游标/去重键)。
  7. 是否改了设计方向:不涉及——gate 留在 projectUnit 共享投影内,[Bug] recommend/apply 对同一区间的 turn-integrity 判定永久不一致:acp_status 反复推荐的区间被 apply 侧整段拒绝(0.1.196,Range would split N turn(s) at the protected-zone boundary) #3236 纪律不变。
  8. 是否引入了新的配置:无 env/config/默认值变更。行为变更披露(OLD→NEW):越窗的普通区间折叠,旧 = 静默落盘(被吞块摘要被替换)→ 新 = 整批原子硬拒 + 点名越界块的可操作错误;窗内合法合并、蒸馏、幂等 resubmit 均不变。

判定:PR 内容本身可合——修复正确、范围精准、测试双向钉死(red-check + 本地全量 1683/1683)、CI 全绿(30 checks,0 failed,0 pending)、master 合并干净。因触碰 kernel/,按 Kernel Boundary 属人工评审档:已提交 findings-only review 与 🔶 需要决策 评论、needs-decision 标签已确认,合并待 owner 授权。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

🔶 需要决策

本轮做了什么:PR #5835(kernel,#5830 window guard)落后 master,我把 master(5bb3eb2,267 commits)merge 进分支。3 处版本冲突已解(kernel 0.0.217→0.0.218,两个 lockfile 重新生成),build + typecheck 全绿,净 diff 仍恰好是 PR 的 9 个文件。

卡点(语义回归,非机械冲突):PR 的回归测试 kernel/tests/issue5830-merge-window-guard.test.ts 子测试 1 红了。

根因:master 已合入的 #7770(PR #7959)给 mixed-tier merge 加了「tier 边界 auto-split」——当 range 里含有比 fold 目标 tier 更高的 active block 时,不再拒绝,而是 auto-split(高层 block 保留 active 且不被重新覆盖,新 block 只覆盖目标 tier 部分)。子测试 1 恰好就是这个场景(b3 是 T2,落在 range m00002..m00014 内,目标 tier 1),它钉的是旧的「原子拒绝」行为。

我实测验证(diagnostic 直接跑该场景):新的 auto-split 不丢任何 coverage——b3 保留 [u01..u04],新 block b5 覆盖 [u05..u14],LOST coverage = (none)。即 #7770 用另一种更温和的机制解决了 PR 原本 #5830 担心的「静默 coverage 丢失」;PR 的 guard 代码仍在,子测试 2/3/4(control)全绿,仅子测试 1 这个 mixed-tier 拒绝场景改走了 #7770 的 auto-split。

需拍板:#5830 guard 与 #7770 auto-split 在这个 mixed-tier 场景谁优先。这是 kernel 行为(kernel PR,人审 tier),我不擅自改写 PR 回归测试的保证。

推荐 A;未拍板时默认 A(把测试改成钉 #7770 安全的 auto-split 行为;PR 的 guard 保留,继续管它仍覆盖的场景)。

状态:merge 已完成并本地验证(版本冲突已解、build+typecheck 绿),未 push——测试红 + 这是 kernel 设计问题需先拍板。拍板后我按决定改测试/调 guard,本地验证绿,再 push 最终 head(不带 [ework:ci-held],走本分支唯一一次全量 CI)。needs-decision 标签已在位。

… (behind/dirty state, #5835)

Master advanced 221 commits (kernel 0.0.211 -> 0.0.218, bili 0.1.216 -> 0.1.218) since the last merge. Resolved 3 version conflicts: kernel -> 0.0.219 (master's 0.0.218 + 1 for this PR's merge-window guard kernel/src changes), bili -> 0.1.218 (master's; this content PR does not bump bili), lockfiles -> 0.0.219. Verified: kernel+pi-subagents build green, typecheck green, net diff vs master unchanged (exactly the PR's 7 files).

CAUTION: this merge reveals a SEMANTIC conflict (not textual). Master's #7770 auto-split (keep higher-tier nested blocks active, never re-cover) now runs BEFORE the PR's #5830 window guard in projectUnit. In the PR's regression test 'stale-inherited start + fresh end', the out-of-window block b3 is T2 (kept active by #7770) so the #5830 guard no longer rejects — the fold proceeds (blocksCreated:1) instead of the test's expected atomic reject (blocksCreated:0). The #5830 guard CODE is intact/correct; only the test expectation is now stale. This needs a design decision (see the separate '🔶 需要决策' comment). CI held.

[ework:ci-held]
@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

🔶 需要决策

This run resolved the merge conflict (master advanced 221 commits since the last merge; 3 version conflicts resolved: kernel → 0.0.219, bili → 0.1.218, lockfiles → 0.0.219; kernel+pi-subagents build green, typecheck green, net diff vs master unchanged = exactly the PR's 7 files). The merge is pushed (CI-held, commit 1103a4dfb).

However, the merge reveals a SEMANTIC conflict that needs a design decision:

The conflict. Master's #7770 auto-split (keep higher-tier nested blocks active, never re-cover) now runs before the PR's #5830 window guard in projectUnit (kernel/src/unit-projection.ts). In the PR's regression test issue5830-merge-window-guard.test.ts, subtest "stale-inherited start + fresh end: a sweep that swallows an out-of-window block is rejected atomically with zero commits":

  • The out-of-window block b3 is T2. With #7770, b3 is kept active (not consumed), so its coverage (u01..u04) is preserved and stripped from the fold's effectiveMessageIds.
  • The #5830 guard checks consumedBlockIds (active T1 blocks = b4). Since b3 is kept active (not consumed), the guard no longer detects the out-of-window coverage loss → the fold proceeds (blocksCreated: 1) instead of the test's expected atomic reject (blocksCreated: 0).

The #5830 guard code is intact and correct (verified: both #7770 and #5830 blocks present in the auto-merged unit-projection.ts, correctly ordered — #7770 at line 292, #5830 guard at line 337). Only the test's expectation (blocksCreated: 0) is now stale.

Options:

  • A (test-only): Update the test to expect the new behavior (blocksCreated: 1, b3 kept active, no reject). The #5830 guard still protects against coverage loss, but #7770 now handles the higher-tier case (keeps the block active), so the reject is no longer triggered. Minimal change.
  • B (guard code): Make the #5830 guard also reject when an out-of-window block is kept active by #7770 (defense in depth). Non-trivial code change; alters the PR's feature behavior.
  • C (ordering): Reorder so the #5830 guard runs before #7770, or exclude #7770 from plain range folds. Larger design change.

Recommendation: Option A. #7770 correctly preserves the higher-tier block's coverage, so the #5830 reject is no longer necessary in this case. The test should reflect the new (correct) behavior.

Default if undecided: Option A (update the test to expect blocksCreated: 1, b3 kept active). Minimal, safe, preserves both features' intent.

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

七问 summary — CI-engineer run (attempt 1/6), PR #5835 (compress-window-coverage-guard)

  1. What was the problem? The PR was in a dirty merge state — 221 commits behind master, blocking the merge.

  2. What caused it? Master advanced 221 commits (kernel 0.0.211 → 0.0.218, bili 0.1.216 → 0.1.218) since the PR's last merge. The version fields in kernel/package.json, kernel/package-lock.json, and package-lock.json conflicted.

  3. Impact & severity. The PR could not merge (dirty state). No user-facing impact — the PR's code is correct; only the version fields conflicted.

  4. How did I fix it? Merged master into the PR branch, resolved the 3 version conflicts (kernel → 0.0.219 = master's 0.0.218 + 1 for the PR's kernel/src changes; bili → 0.1.218 = master's, this content PR does not bump bili; lockfiles → 0.0.219). Verified: kernel+pi-subagents build green, typecheck green, net diff vs master unchanged (exactly the PR's 7 files). Pushed the merge (CI-held, commit 1103a4dfb).

  5. Any regression? No regression from the merge itself. However, the merge revealed a semantic conflict: the PR's #5830 regression test now fails because master's #7770 auto-split (keep higher-tier nested blocks active) runs before the #5830 window guard, so the guard no longer rejects in the test scenario. The #5830 guard code is intact/correct; only the test expectation is stale. This is a design decision — see the 🔶 需要决策 comment above (options A/B/C, recommendation A, default A).

  6. Any cache breakage? No.

  7. Any design direction change? None from the merge. The #5830 vs #7770 interaction is a pending design decision (labeled needs-decision).

Status: Merge conflict resolved and pushed (CI-held). Stopped per owner policy 2026-11-01 — the semantic conflict needs a design decision before the final head can be pushed.

@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.

Findings-only review (kernel PR — no approve; human-only review tier per Kernel Boundary rule 3)

Round 6 — head 1103a4dfbd5 (CI engineer merged master bc0d6e996e1 into the branch; master advanced 85afa7b212c → bc0d6e996e1).


🔴 BLOCKING: the PR's own regression test is red on this head

kernel/tests/issue5830-merge-window-guard.test.ts — test 1 ("stale-inherited start + fresh end: a sweep that swallows an out-of-window block is rejected atomically with zero commits") fails on 1103a4dfbd5 (it passed on the previous head a85f9c3b003). Deterministic, verified locally (kernel full suite: 1669 pass / 1 fail).

Root cause — cross-branch interaction with master's #7770 (boundaryKeptBlockIds strip, kernel/src/unit-projection.ts:292-313):

  • #7770 strips higher-tier nested blocks' coverage from the new block (so a T2's ids are not re-registered into a T1 fold).
  • In the test's stage-1, the full-raw fold b4 (T1) now has b3's (T2) coverage [u01..u04] stripped → b4 covers [u05..u12] instead of [u01..u12].
  • In stage-2, the requested window is [m00002..m00014] = [u02..u14]. b4's coverage [u05..u12] is now within the window (previously [u01..u12] extended below u02), so the window guard no longer fires — the fold lands (blocksCreated: 1) instead of being rejected.

The landed fold is safe (verified: no coverage loss — b3 T2 stays active covering [u01..u04]; the new T1 block covers [u05..u14] with a summary describing [u02..u14] ⊇ [u05..u14]). #7770's strip made this specific fixture scenario safe.

The guard itself is correct and still alive (verified: a same-tier T1 block whose coverage extends beyond the window, with no higher-tier strip, is still rejected — e.g. a no-T2 fixture where the full-raw T1 block covers [u01..u12] and the window is [m00002..m00014] → guard fires, blocksCreated: 0, error names the offender).

So: the PR's fix (the window guard) is sound and byte-identical to the previously reviewed code. Only its regression test fixture is stale — it no longer reproduces the #5830 defect because #7770 changed stage-1 coverage. A PR whose own regression test is red (and no longer pins the bug) cannot merge.

Suggested fix: rework test 1's fixture so the repro triggers the guard at the new head. A verified working shape: give test 1 a dedicated fixture without the T2 distillation (so the full-raw block is a same-tier T1 covering [u01..u12], no higher-tier strip); then the stage-2 window [m00002..m00014] triggers the guard. Note: test 4 (block-boundary distillation) needs the T2, so test 1 needs its own fixture (or test 4 needs restructuring). The other three tests (controls) still pass on this head.


Verified on this head (non-blocking):

  • Guard code byte-identical to the previously reviewed version (unit-projection.ts guard region + report.ts:589 acp_status marker untouched by the merge).
  • Master-side interaction changes checked, all compatible with the guard: #7770 (the one that broke the test fixture — see above); boundaries.ts phantom-frontier clamp (effectiveStartRef/effectiveEndRef — orthogonal: the guard uses the raw requested refs for the window; the clamp only shrinks the fold toward the frontier, keeping the requested window a superset → safe direction); compress.ts effectiveSpec (block-creation recorded span, not projection logic); #7791 warn sink; crush removal. recommend.ts:789 generic fatal demotion and compress.ts fatal handling (zone→noop, split+degradable→noop, window→throw) intact.
  • Version: master 0.0.218 → PR head 0.0.219 (master+1, both lockfiles in step).
  • Kernel full suite: 1669 pass / 1 fail (the red test above).

Informational (not fixable by reviewer):

  • PR body version line is stale ("0.0.182 → 0.0.183" vs actual 0.0.218 → 0.0.219); the reviewer's only permitted body edit is the kernel-change: line (present, correct).
  • Mirror cache at fetch time (2026-12-01T00:00:22Z, ~8 min post-merge) shows the test lanes as completed/skipped (not success) — the cache is not a reliable green signal here; the local deterministic red is authoritative.

Context (pre-existing, out of scope, for owner awareness):

  • Residual hole (carried from prior rounds): in the snapped-endpoint case with a different-tier coverer, uncovered gap messages can enter the new block as direct ids without the summary describing them. Milder than #5830 (gap only, decompress-recoverable), pre-existing (the snap mechanism predates the PR), out of scope. #7770 is related (mixed-tier) but addresses a different facet (double-ownership of covered ids, not the gap-message case).

Behavior change (already disclosed in PR body, unchanged): out-of-window plain message-ref range folds — old = silent commit (swallowed block's wider-span summary replaced by a tail-only summary, the #5830 incident) → new = atomic hard-reject + actionable error naming the offender + two exits (bN..bM / narrow the range). In-window merges, distillation, idempotent resubmits unchanged.

Verdict: one BLOCKING finding (the PR's regression test is red on this head and no longer pins the #5830 guard — needs a fixture rework). The guard fix itself is correct and unchanged. No approve — kernel PR (human-only tier). 🔶 需要决策 posted; merge awaits (a) the test fix and (b) owner kernel authorization.

@ranxianglei

Copy link
Copy Markdown
Owner Author

🔶 需要决策

本 PR 触碰 kernel/ 且正文已带 kernel-change: 声明——按 Kernel Boundary 规则 3,kernel 变更属人工评审档,review 侧不批准合并,需 owner 授权。

本轮(head 1103a4dfbd5)发现一个阻塞项,需先解决再谈授权:

🔴 PR 自身的回归测试在本 head 上红了:kernel/tests/issue5830-merge-window-guard.test.ts 测试 1(#5830 window 守卫复现)在 1103a4dfbd5 上失败(上一 head a85f9c3b003 上通过)。根因是与 master 的 #7770(boundaryKeptBlockIds 剥离,kernel/src/unit-projection.ts:292-313)的跨分支交互:#7770 把高层嵌套块的覆盖从新块剥离,导致测试 stage-1 的 full-raw T1 块(b4)覆盖 [u05..u12] 而非 [u01..u12];stage-2 的窗口 [u02..u14] 现在包含了 b4 的覆盖,守卫不再触发,折叠落盘(blocksCreated: 1)而非被拒。落盘本身是安全的(无覆盖丢失,已验证);守卫本身正确且仍然生效(已验证:无高层剥离的同层 T1 块越窗仍被拒)。

即:PR 的修复(守卫)正确且逐字节未变,但其回归测试 fixture 已过期——不再复现 #5830 缺陷。一个自身回归测试红着(且不再钉住 bug)的 PR 不能合并。建议修法:给测试 1 一个专用 fixture(去掉 T2 蒸馏,使 full-raw 块为同层 T1 覆盖 [u01..u12],无高层剥离),stage-2 窗口 [m00002..m00014] 即触发守卫(已验证可行);测试 4 需要 T2,故测试 1 需独立 fixture 或重构测试 4。其余 3 个对照测试在本 head 上仍通过。

门禁 diff(相对 master bc0d6e996e1):kernel/src/unit-projection.ts(window 守卫,逐字节未变)、kernel/src/report.ts(acp_status 标记)、kernel 版本 0.0.218→0.0.219 + 双 lockfile、kernel/tests/issue5830-merge-window-guard.test.ts(4 例,其中测试 1 在本 head 红)、kernel/tests/regression-empty-rewrap.test.ts;另有纯测试侧的 #5152 竞态修复(2 个测试文件,零产品行为面)。

请 owner:(a) 确认测试 fixture 的修法方向(或指示作者修);(b) 授权 kernel 变更合并。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

Round-6 review complete — head 1103a4dfbd5 (CI engineer merged master bc0d6e996e1 into the PR branch; master advanced 85afa7b212c → bc0d6e996e1).

🔴 One BLOCKING finding: the PR's own regression test is red on this head.

kernel/tests/issue5830-merge-window-guard.test.ts test 1 (the #5830 window-guard repro) fails on 1103a4dfbd5 (it passed on the previous head a85f9c3b003). Deterministic, verified locally (kernel full suite: 1669 pass / 1 fail).

Root cause — cross-branch interaction with master's #7770: #7770 (the boundaryKeptBlockIds strip in unit-projection.ts:292-313) strips higher-tier nested blocks' coverage from the new block. In the test's stage-1, the full-raw T1 block (b4) now has the T2's (b3) coverage [u01..u04] stripped, so b4 covers [u05..u12] instead of [u01..u12]. In stage-2, the requested window [u02..u14] now contains b4's coverage, so the window guard no longer fires — the fold lands (blocksCreated: 1) instead of being rejected.

Verified:

So: the PR's fix (the window guard) is sound and unchanged. Only its regression test fixture is stale — it no longer reproduces the #5830 defect. A PR whose own regression test is red (and no longer pins the bug) cannot merge.

Suggested fix: rework test 1's fixture so the repro triggers the guard at the new head — a verified working shape: give test 1 a dedicated fixture without the T2 distillation (so the full-raw block is a same-tier T1 covering [u01..u12]), then the stage-2 window [m00002..m00014] triggers the guard. (Test 4 needs the T2, so test 1 needs its own fixture, or test 4 needs restructuring.) The other three control tests still pass.

Informational: PR-body version line is stale ("0.0.182 → 0.0.183" vs actual 0.0.218 → 0.0.219); the mirror cache at fetch time shows the test lanes as completed/skipped (not success), so the local deterministic red is the authoritative signal.

Verdict: one BLOCKING finding (red regression test — needs a fixture rework). The guard fix itself is correct and unchanged. No approve — kernel PR (human-only tier). Findings-only review (#pullrequestreview-6122834564) + 🔶 需要决策 comment (#issuecomment-7296024839) posted; needs-decision label confirmed. Merge awaits (a) the test fix and (b) owner kernel authorization.

八问

  1. 是什么问题:PR 自身的回归测试(issue5830-merge-window-guard.test.ts 测试 1,compress merges disjoint ranges into earlier coverage but retains only the last summary #5830 window 守卫复现)在新 head 1103a4dfbd5 上红了(上一 head 绿)——复现不再触发守卫,折叠落盘而非被拒。
  2. 什么原因导致的:与 master 的 [Bug][kernel] mixed-tier block merge leaves two active blocks owning the same messages (duplicate summaries on the wire) | 混合层级合并留下双覆盖与两份摘要 #7770(boundaryKeptBlockIds 剥离)跨分支交互。[Bug][kernel] mixed-tier block merge leaves two active blocks owning the same messages (duplicate summaries on the wire) | 混合层级合并留下双覆盖与两份摘要 #7770 把高层嵌套块的覆盖从新块剥离,使测试 stage-1 的 full-raw T1 块(b4)覆盖 [u05..u12] 而非 [u01..u12](T2 的 [u01..u04] 被剥);stage-2 窗口 [u02..u14] 现在包含 b4 的覆盖,守卫不再触发。
  3. 影响范围与严重程度:PR 的回归测试不再钉住 bug(红测试/假信心)。守卫本身正确且仍生效(已验证)。严重程度:阻塞(自身回归测试红的 PR 不能合并),但无用户可见行为影响(守卫代码未变且正确;stale fixture 下落盘的折叠是安全的,无覆盖丢失)。
  4. 怎么修复的:PR 的修复(守卫)正确且无需改——阻塞项是 stale 的测试 fixture:需重做测试 1 的 fixture 使复现在新 head 上触发守卫(已验证可行形状:给测试 1 一个专用无 T2 fixture,full-raw 块为同层 T1 覆盖 [u01..u12],stage-2 窗口 [m00002..m00014] 即触发守卫;测试 4 需要 T2,故测试 1 需独立 fixture 或重构测试 4)。
  5. 是否有回归问题:守卫代码逐字节未变(已验证)。其余 master 侧变更(boundaries.ts phantom 钳制、compress.ts effectiveSpec、[Bug][kernel] Kernel diagnostics writing directly to host TUI + funnel-zero treating normal state as fault (pi inline la | [Bug][kernel] kernel 诊断直写宿主 TUI + funnel-zero 把常态当故障(pi inline 车道每回合刷 3–6 行) #7791 warn sink、crush 移除)均与守卫正交(已验证)。唯一交互是 [Bug][kernel] mixed-tier block merge leaves two active blocks owning the same messages (duplicate summaries on the wire) | 混合层级合并留下双覆盖与两份摘要 #7770,它改的是测试 fixture(非守卫)。无产品行为回归。
  6. 是否破坏缓存:不涉及(未触碰任何缓存/重试/增量游标/去重键)。
  7. 是否改了设计方向:不涉及——守卫留在 projectUnit 共享投影内([Bug] recommend/apply 对同一区间的 turn-integrity 判定永久不一致:acp_status 反复推荐的区间被 apply 侧整段拒绝(0.1.196,Range would split N turn(s) at the protected-zone boundary) #3236 纪律不变)。
  8. 是否引入了新的配置:无 env/config/默认值变更。行为变更(已披露):越窗的普通区间折叠,旧 = 静默落盘(被吞块摘要被替换)→ 新 = 整批原子硬拒 + 点名越界块的可操作错误;窗内合法合并、蒸馏、幂等 resubmit 均不变。

判定:一个阻塞发现(PR 的回归测试在新 head 上红、不再钉住 #5830 守卫——需 fixture 重做)。守卫修复本身正确且逐字节未变。因触碰 kernel/,按 Kernel Boundary 属人工评审档:findings-only review + 🔶 需要决策 评论已提交,needs-decision 标签已确认。合并待 (a) 测试修复 与 (b) owner kernel 授权。

Test 1 of issue5830-merge-window-guard went red on head 1103a4d (the
master merge): master's #7770 boundary strip (unit-projection.ts:292-313)
carves the T2's coverage [u01..u04] out of the full-raw T1 block in stage 1,
so it covers [u05..u12] instead of [u01..u12]; the stage-2 window [u02..u14]
then CONTAINS that coverage, so the #5830 window guard no longer fires and
the repro no longer pinned the bug.

Give test 1 a dedicated no-T2 fixture (buildStage1NoT2 + prunedViewNoT2):
the full-raw fold stays a same-tier T1 with full coverage [u01..u12] (no
higher-tier block for #7770 to strip), so the stage-2 window does not contain
it and the guard fires again. Tests 2-4 keep the shared fixture (the
distillation control needs the T2). Also correct a stale comment in test 2
(b4 covers [u05..u12] after the #7770 strip).

Test-only: no kernel/src/ change, no version bump; the #5830 guard code is
unchanged.
@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

查重: 不重复(本线程 floor 6 已给过查重结论;本轮是 review lane 对同一 PR 的独立复审,非新立项)。
标签: bug + scope/kernel + p1 + needs-decision + pr(内核数据质量类缺陷,守卫修复正确,待 owner 授权 kernel 合并)。

本轮为 review lane 对 head 1103a4dfbd5 的独立复审——未照抄前轮结论,重新读了 diff、unit-projection.ts 的 #5830 守卫与 master #7770 剥离的交互,并本地定向跑了测试。

阻塞项已独立验证并修掉。 前轮报告的红测试(kernel/tests/issue5830-merge-window-guard.test.ts 测试 1)在本 head 上确实红(本地复现:blocksCreated: 1 而非期望的原子拒绝,警告含 #7770 的「Auto-split at tier boundary: b3 (tier 2) stays active」)。根因与前轮一致:#7770 的边界剥离(unit-projection.ts:292-313)在 stage-1 把高层块 b3(T2)的覆盖 [u01..u04] 从 full-raw T1 块 b4 削掉,使 b4 覆盖 [u05..u12] 而非 [u01..u12];stage-2 窗口 [u02..u14] 因此包含 b4 的覆盖,守卫(只查同层 consumedBlockIds)不再触发,折叠落盘。守卫代码本身正确且逐字节未变——红的是过期的 fixture。

按「无决策依赖的部分先修」,fixture 修法是纯测试侧、证据已钉死(验证可行),属无需决策的 ① 类——我直接修掉并推了,不等 (a) 的确认:给测试 1 一个专用无 T2 fixture(buildStage1NoT2 + prunedViewNoT2),使 full-raw 块为同层 T1 覆盖 [u01..u12](无高层块可剥离),stage-2 窗口 [u02..u14] 即触发守卫;测试 2-4 保留共享 fixture(蒸馏对照需 T2)。顺手修正测试 2 一处 stale 注释(b4 覆盖实为 [u05..u12])。已推到 PR 分支(新 head 3ec22446518,fast-forward,零 kernel/src/ 改动、无需版本 bump)。本地定向全绿:issue5830 4/4、相邻 4 套件(regression-empty-rewrap / issue5789-tier2-merge-ladder / issue3236-recommend-apply-consistency / issue5531-stranded-reasoning-residue)20/20、kernel typecheck 绿。

因此 (a) 已解决(fixture 已按验证方向修好);剩余待 owner 的只有 (b):授权 kernel 变更合并(人工评审档,review 侧不批准)。CI 在新 head 上重跑,全量绿后即可人工合并。

八问

  1. 是什么问题:PR 自身的回归测试(issue5830-merge-window-guard.test.ts 测试 1,compress merges disjoint ranges into earlier coverage but retains only the last summary #5830 window 守卫复现)在新 head 1103a4dfbd5 上红了(上一 head 绿)——复现不再触发守卫,折叠落盘而非被拒。守卫代码本身正确且逐字节未变;红的是过期的测试 fixture。
  2. 什么原因导致的:与 master 的 [Bug][kernel] mixed-tier block merge leaves two active blocks owning the same messages (duplicate summaries on the wire) | 混合层级合并留下双覆盖与两份摘要 #7770(boundaryKeptBlockIds 剥离,unit-projection.ts:292-313)跨分支交互。[Bug][kernel] mixed-tier block merge leaves two active blocks owning the same messages (duplicate summaries on the wire) | 混合层级合并留下双覆盖与两份摘要 #7770 在 stage-1 把高层嵌套块(b3,T2)的覆盖 [u01..u04] 从 full-raw T1 块(b4)剥离,使 b4 覆盖 [u05..u12] 而非 [u01..u12];stage-2 窗口 [u02..u14] 现在包含 b4 的覆盖,守卫(只查 consumedBlockIds 同层块)不再触发。
  3. 影响范围与严重程度:PR 的回归测试不再钉住 bug(红测试/假信心)——阻塞合并,但无用户可见行为影响(守卫代码未变且正确;stale fixture 下落盘的折叠是安全的,[Bug][kernel] mixed-tier block merge leaves two active blocks owning the same messages (duplicate summaries on the wire) | 混合层级合并留下双覆盖与两份摘要 #7770 剥离后无覆盖丢失)。
  4. 怎么修复的:给测试 1 一个专用无 T2 fixture(buildStage1NoT2 + prunedViewNoT2),使 full-raw 块为同层 T1 覆盖 [u01..u12](无高层块供 [Bug][kernel] mixed-tier block merge leaves two active blocks owning the same messages (duplicate summaries on the wire) | 混合层级合并留下双覆盖与两份摘要 #7770 剥离),stage-2 窗口 [u02..u14] 即触发守卫;测试 2-4 保留共享 fixture(蒸馏对照需 T2)。顺手修正测试 2 一处 stale 注释。纯测试侧,零 kernel/src/ 改动,无需版本 bump;守卫代码逐字节未变。
  5. 是否有回归问题:守卫代码逐字节未变(已验证)。本地定向:issue5830 4/4 绿、相邻 4 套件 20/20 绿、kernel typecheck 绿;全量套件判决以新 head 3ec22446518 的 CI 为准。高危模式(语义漂移、fail-fast 变吞错、阈值/时序/输出格式漂移)逐项不涉及。
  6. 是否破坏缓存:不涉及(纯测试 fixture,未触碰任何缓存/重试/增量游标/去重键)。
  7. 是否改了设计方向:不涉及——守卫留在 projectUnit 共享投影内([Bug] recommend/apply 对同一区间的 turn-integrity 判定永久不一致:acp_status 反复推荐的区间被 apply 侧整段拒绝(0.1.196,Range would split N turn(s) at the protected-zone boundary) #3236 纪律不变);compress merges disjoint ranges into earlier coverage but retains only the last summary #5830 守卫与 [Bug][kernel] mixed-tier block merge leaves two active blocks owning the same messages (duplicate summaries on the wire) | 混合层级合并留下双覆盖与两份摘要 #7770 自动分割的交互保持 master 现状([Bug][kernel] mixed-tier block merge leaves two active blocks owning the same messages (duplicate summaries on the wire) | 混合层级合并留下双覆盖与两份摘要 #7770 处理高层场景,守卫管同层越窗场景)。
  8. 是否引入了新的配置:无 env/config/默认值变更。行为变更(已披露,未变):越窗的普通区间折叠,旧 = 静默落盘(被吞块摘要被替换)→ 新 = 整批原子硬拒 + 点名越界块的可操作错误;窗内合法合并、蒸馏、幂等 resubmit 均不变。

判定:阻塞项(红回归测试)已修掉并推到 PR 分支(新 head 3ec22446518,fast-forward,测试侧零产品行为面)。守卫修复本身正确且逐字节未变。(a) fixture 修法已按验证方向解决;因触碰 kernel/,按 Kernel Boundary 属人工评审档,合并仍待 owner 授权 (b)。CI 在新 head 上重跑,全量绿后即可人工合并。

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.

compress merges disjoint ranges into earlier coverage but retains only the last summary

1 participant