Repository navigation
Conversation
A compressed block's summary may only be injected while it still describes content on the wire. The current predicate asks whether ANY covered message is still present, so a host rewind that truncates part of a span keeps the whole summary alive and the model reads a description of history that no longer exists. Reap (ranxianglei#2695) does not catch it either: it needs a strict majority of covered ids absent for three consecutive passes, and a partially truncated span keeps its majority. The gap's shape, in the block's own coverage order, is the discriminator: - survivors a prefix, missing the newest end -> the rewind shape; deactivate - survivors a suffix, missing the oldest end -> the host dropped old history; the summary is the only record of it, so keep it active - interior/ragged holes -> the id-churn shape (ids are content hashes); keep it and let fold-reconcile re-key the churned ids - nothing covered visible -> defer to the positional witness (ranxianglei#4316, unchanged): a surviving ledger position is the churn / merged-pair shape, not a deletion Everything except the tail gap keeps today's keep-alive behaviour, so the only behaviour that changes is the shape this change names. The positional witness is not touched: narrowing it to exact coverage would false-kill merged content (a pair collapse covers fewer ids than positions). Tests: sync-config gains the four shapes plus the positional-witness composition and the no-witness deletion case.
(ai: vllm-qwen/qwen3.8-27b) Merge guard sync done: merged origin/master (124 commits, zero kernel/ drift since base) into this branch — clean, no conflicts; targeted kernel test |
|
ework |
[bot] 🏷 (ai: vllm-qwen/qwen3.8-27b) 收到你的重新触发。已接手,把「非门禁」的部分一次清掉;现在只剩 kernel 人工门禁这一项等你拍板。 我已做的(非门禁,无需你决策)
剩下的唯一红项 = kernel-guard 人工门禁(需要你)
结构化八问
选项对比(决策单 #5285)
请拍板 A/B(在 #5285 或这里回复均可)。选 A 我就补声明 + bump 版本让全部检查转绿;在你明确确认前我不会自行声明。 |
[bot] 🏷 (ai: vllm-qwen/qwen3.8-27b) 结论(承接上一条完整八问,此处只给状态 + 请求): 已完成并验证
剩余唯一红项
风险
请拍板(本条或 #5285 均可):A = 批准 → 我补 |
🔶 需要决策 Live re-verification (this run): head
The gated diff is exactly those two files (verified against the merge-base); nothing else. The PR is also behind master but conflict-free — syncing master is the merge-guard's lane and would not clear this gate anyway. Why I cannot fix it myself: this is an authorization checkpoint, not a mechanical CI failure. The gated diff is external contributor mzbgf's design change to block-liveness judgment inside the kernel (shape-based prefix/suffix/interior discrimination) — it is not a mechanical kernel bug fixed by me, so the 2026-11-06 exemption does not apply, and I must not edit the PR body to add the declaration. Two owner-side items remain outstanding regardless: explicit owner approval for the kernel change (Kernel Boundary rule 1), and the accompanying Note on history: the 2026-10-31 escalation in this thread cited a p1 application ticket "#5285", which resolves in the mirror to an unrelated closed issue — the application thread appears lost, so this comment stands alone as the decision request. Options:
Default if undecided: status quo — per policy I stop touching this PR now; no auto-action later, the decision stays with you. Labels: applied 结构化八问
收工判定: |
[ework] auto-fix stalled: kernel-guard — stopping for human review |
1 similar comment
[ework] auto-fix stalled: kernel-guard — stopping for human review |
|
这个 PR 在批量评审(batch PR #6482)中被排除,原因如下: 在 CI 矩阵(每个 shard 都设置 机制:coverage-shape liveness 在 re-stamped history 被重新覆盖时,把已折叠的 block 判定为非活跃并从 state 里清掉;旧的 existence-based liveness 会保留它。master 在同样环境下是干净的。 隔离方法:在 node 22 + 方向本身(liveness 不该只看存在性)我们认同,但当前实现对「已折叠 block 在新 coverage 下的存活」处理得不够稳,需要补上这个不变量再进。batch 分支里已 revert(f1d696e1a),PR 保持 open 等后续。 |
…5166) kernel-change: fix a re-stamp regression in the coverage-shape liveness (ranxianglei#4592) so already-folded blocks survive a model re-stamp re-coverage (ranxianglei#2265 e2e). The coverage-shape liveness treated every tail gap as a host rewind and deactivated the block. But a model re-stamp re-mints the newest covered ids in place (same slots, fresh content-hash ids), leaving the SAME tail-gap shape as a rewind — yet the span is still live, so the summary must survive. In the ranxianglei#2265 e2e this dropped the folded block (active blocks 1 -> 0) after a model switch. The shape alone cannot tell a withdrawal from a re-mint, so the tail-gap case now asks whether the history still carries the missing tail: a tail gap is churn (keep) iff the number of visible messages beyond the surviving covered prefix is at least the number of missing covered ids (the re-minted tail occupies the same slots); otherwise the newest end was genuinely cut (a true rewind) and the summary is stale (drop). This works without ledgerSeq stamps, which the ranxianglei#2265 re-stamp e2e lacks, so the positional witness cannot carry this case. Regression tests: a re-stamped tail-gap block stays active; a rewind that withdraws more tail than it appends still deactivates. The original ranxianglei#4592 rewind test (pure truncation, nothing appended) is unchanged and still passes.
已按你的要求补上「已折叠 block 在新 coverage 下的存活」不变量。PR 已更新:head = 根因:tail-gap 这个形状同时由两种情况产生——(a) 宿主 rewind(尾部被撤回,block 应失效)和 (b) 模型 re-stamp(尾部原地重新铸新 id,block 仍存活)。原实现把所有 tail-gap 一律判为 rewind 并 deactivate,于是 re-stamp 后折叠块被误清(#2265 的 修法:tail-gap 分支从「无条件 deactivate」改为 验证:
8 问:
状态:PR head 已更新为 |
(ai: vllm-qwen/qwen3.8-27b) lock-sync fixed — new head What I did this run:
八问
判定:修复已推送;新一轮 CI 在 runner 队列中排队(非本修复问题),lock-sync 报告后无需再动——若仍红再查。 |
(ai: vllm-qwen/qwen3.8-27b) lock-sync second failure fixed — new head What I did this run:
八问
判定:修复已推送(head |
[bot] 🏷 (ai: vllm-qwen/qwen3.8-27b) Status update (supersedes nothing — my detailed 八问 reply above stands):
|
…lict at 0.0.198 Master advanced past the PR base (batch4 kernel fixes #6428/#6345/#5166 -> kernel 0.0.197, storage-render chat golden digest refresh, pi-subagents 0.2.4, 305 files). Content hunks auto-merged (kernel/src/compress.ts, tests/golden/storage-render/chat.json); the only conflicts were the three kernel version lines, resolved at 0.0.198 = master's 0.0.197 + this PR's kernel/src change, per the CI-enforced kernel version discipline. Targeted local verification: tests/golden-storage-render.test.ts 5/5, kernel issue6116/issue3769/hide-consumed suites 27/27.
# Conflicts: # kernel/package-lock.json # kernel/package.json # package-lock.json
[bot] 🏷 (ai: vllm-qwen/qwen3.8-27b) Conflict cleared + all 5 red test shards traced and fixed — new head What I did this run:
八问
判定:冲突已清、CI 全绿、merge state 干净(blocked = 待人工 review/merge)——本 PR 侧无需再动。 |
[ework] CI fix verified green ✓ |
ranxianglei
left a comment
There was a problem hiding this comment.
(ai: vllm-qwen/qwen3.8-27b)
Findings-only review (kernel PR — merge gated by the human-only review tier per Kernel Boundary; authorization request in the 🔶 需要决策 comment below).
Verdict
Technically sound. No blocking findings. The shape-based liveness logic is correct, the tests are comprehensive and would catch regressions, and the behavior delta is correctly disclosed. This is a kernel change, so I cannot approve — the human-only review tier gates the merge (Kernel Boundary rule 3).
What I verified
Correctness. coverageShape (kernel/src/sync.ts:57) classifies the gap in the block's own coverage order: full / tail-gap / head-gap / holes / none. Only the tail-gap branch changes behavior vs master (old: some(id present) always kept; new: tailGapIsChurn keeps only when the history still carries the missing tail). The churn test (kernel/src/sync.ts:81) — messages.length - anchorIdx - 1 >= missing — correctly distinguishes a re-stamp (re-minted tail occupies the same slots → keep) from a rewind (slots empty → drop). The residual edge (a rewind that appends ≥ as many new messages as it withdrew is misclassified as churn → kept) is documented in the PR body and is the right bias: availability over safety, no data loss (worst case = the old behavior, a ghost summary kept).
Behavior delta vs master (disclosed old→new).
- tail-gap: old = always kept (any covered id present); new = kept only if churn. This is the fix (host rewind → ghost summary no longer injected).
- empty
effectiveMessageIds: old → fell toblockSeqPresent(could deactivate); new → shape "full" (vacuous) → always kept. Verified unreachable: a block is created only whenfilteredIds.length > 0(compress.ts:1898) or a block-boundary merge of consumed blocks, andfilteredIds ⊆ directMessageIds ⊆ effectiveMessageIds(unit-projection.ts:237-246) — so every created block has non-empty coverage. No practical impact. - All other shapes (full / head-gap / holes / none) and the summary-present path keep master's behavior byte-for-byte.
Tests. kernel/tests/sync-config.test.ts: the old test "leaves blocks intact when at least one message remains" (block ["a","b"], visible [a]) asserted the buggy keep-alive; it is correctly replaced by the rewind-deactivate test (same shape, now expects deactivation). New tests cover all five shapes + the churn/rewind boundary + the positional-witness (none shape) both directions + sub-id (#231) both directions + no-mutation. Each would catch a regression in the corresponding branch.
House conventions. kernel-change: declaration present (Amendment section) ✓. Kernel version bump 0.0.198→0.0.199 with both lockfiles (kernel/package-lock.json, root package-lock.json) synced ✓. No config surface, persistence format, or wire-protocol changes ✓. The positional witness (blockSeqPresent) is deliberately not narrowed (a #2636 pair collapse legitimately covers fewer ids than positions) — correct, and documented.
Non-blocking notes (no action required)
- Commit messages reference "0.0.197" (stale from pre-rebase heads); the actual final bump is 0.0.198→0.0.199. Cosmetic message staleness only — not fixable without rewriting history, dropped.
- The residual churn/rewind edge is a known, documented trade-off, not a defect.
Merge gate
This is a kernel change (kernel/src/sync.ts + kernel/tests/sync-config.test.ts + kernel version). Per the Kernel Boundary (human-only review tier, rule 3) and the review-lane HARD RULE, I cannot approve. The owner's floor-37 direction ("方向本身我们认同,但…需要补上这个不变量再进") has been satisfied by the tail-gap churn refinement. Authorization request is in the 🔶 需要决策 comment below.
|
🔶 需要决策 (ai: vllm-qwen/qwen3.8-27b) Owner authorization requested — kernel change (human-only review tier, Kernel Boundary rule 3). PR #5166 (head Gated diff (the kernel surface):
Why it is safe to merge (my independent review):
The owner's floor-37 direction is satisfied: "方向本身(liveness 不该只看存在性)我们认同,但当前实现对「已折叠 block 在新 coverage 下的存活」处理得不够稳,需要补上这个不变量再进" — the tail-gap churn refinement ( CI: fully green on head Request: approve the kernel change so the PR can be merged (human-only tier). I have not self-declared on the author's behalf; the |
[bot] 🏷 (ai: vllm-qwen/qwen3.8-27b) PR #5166 review complete — findings-only, no blocking findings, kernel change → merge gated by the human-only review tier. What I did:
Outcome: The PR is technically sound and ready for the owner's merge decision. It is a kernel change, so I cannot approve (Kernel Boundary rule 3 + review-lane HARD RULE). The owner's floor-37 direction ("需要补上这个不变量再进") is satisfied by the tail-gap churn refinement. Waiting on the owner's authorization to merge. 8问 (结构化审核,中文):
判定:kernel 改动,人工层把关合并。无阻塞发现,owner floor-37 方向已满足,等 owner 授权合并。 |
…ge conflict) The PR branched at kernel 0.0.198 and bumped to 0.0.199 with its coverage-shape liveness change (kernel/src/sync.ts). Master independently advanced the kernel to 0.0.200 (directive-only precede-heal ranxianglei#7270, receipt wording, ranxianglei#4521 refresh-line removal, etc.) without touching sync.ts. The only conflicts were the kernel version fields in kernel/package.json, kernel/package-lock.json and the root package-lock.json. Resolution: kernel version -> 0.0.201. The merged kernel combines master's 0.0.200 state with the PR's sync.ts change (absent from master), so it is a new state that must sit above both 0.0.199 and 0.0.200. 0.0.201 is the minimal bump that keeps the kernel version discipline check green (a kernel/src/** change without a bump fails). No source conflicts: the PR's sync.ts / sync-config.test.ts are preserved verbatim; master's disjoint kernel edits auto-merged.
(ai: vllm-qwen/qwen3.8-27b) Merge conflict resolved and pushed. New head What conflicted and why. The PR branched at kernel
Resolution. Merged Verified locally: no leftover conflict markers, all three JSON files parse, version is 八问(中文结论)
收工判定:冲突已解、已推送、CI 已在新 head 上触发;等待 CI 全绿 + owner 审批即可合并。若 CI 转红,由后续 run 接管修红(本次仅负责解冲突)。 |
ranxianglei
left a comment
There was a problem hiding this comment.
(ai: vllm-qwen/qwen3.8-27b)
Re-review after the master merge — findings-only, no blocking findings (kernel PR → merge gated by the human-only review tier; see the 🔶 需要决策 comment below).
The head moved 5b93fe955 → 160bf6c60 ("Merge origin/master into coverage-shape"). I re-verified the full contribution against the current master baseline:
What changed since my last review (and why it is safe):
kernel/src/sync.ts+kernel/tests/sync-config.test.tsare byte-identical to the version I reviewed and found correct (0-line diff5b93fe955→160bf6c60). The coverage-shape liveness rule (coverageShape+tailGapIsChurn) and all its regression tests are unchanged — my prior findings still hold.- The only new PR-side change is the kernel version bump 0.0.200→0.0.201 (master advanced to 0.0.200 via #7252/#7281, so the PR's kernel change now bumps above it) with both lockfiles (
kernel/package-lock.json, rootpackage-lock.jsonacp-kernel record) synced to 0.0.201. Correct and in step. - The master merge is a routine rebase-to-current-master (required before claiming mergeable, §7.2). No conflict markers in any PR-touched file; master's
compress.tsstill consumessyncBlockswith the same signature — no interaction with the PR's logic.
Behavior delta vs master (unchanged from my prior review, re-stated): only the tail-gap shape changes — old = always kept (any covered id present → ghost summary after a host rewind); new = kept only when the history still carries the missing tail (churn) → the rewind case now deactivates. All other shapes (full / head-gap / holes / none) and the summary-present path keep master's behavior byte-for-byte. No config surface, persistence format, or wire-protocol change.
CI: in progress on head 160bf6c60 — 0 failures so far, 18/30 checks already complete (success + skipped), the 12 test shards still running. The PR's logic is byte-identical to the previously-green 5b93fe955, so I expect it to stay green; I am not polling in a loop.
Verdict: findings-only, no blocking findings. This is a kernel change (kernel/src/sync.ts + tests + version 0.0.201), so I cannot approve — the human-only review tier gates the merge (Kernel Boundary rule 3). Authorization request re-confirmed for the new head in the 🔶 需要决策 comment below.
|
🔶 需要决策 (ai: vllm-qwen/qwen3.8-27b) Owner authorization requested (re-confirmed for the new head) — kernel change, human-only review tier (Kernel Boundary rule 3). The head moved to Gated diff (the kernel surface) at head
Why it is safe to merge: the only behavior delta vs master is the tail-gap shape (old = always kept → ghost summary after a host rewind; new = kept only under churn → the rewind case deactivates). The re-stamp churn case (#2265 e2e) is kept. All other shapes keep master's behavior byte-for-byte. No config/persistence/wire change. The residual edge (rewind + append ≥ missing → misclassified as churn → kept) is documented in the PR body: availability over safety, no data loss. The owner's floor-37 direction is satisfied ("方向本身我们认同…需要补上这个不变量再进") — the CI: in progress on Request: approve the kernel change so the PR can be merged (human-only tier). I have not self-declared on the author's behalf; the |
[bot] 🏷 (ai: vllm-qwen/qwen3.8-27b) Re-review complete for the new head The head moved
Posted: re-review COMMENT (findings-only) + re-confirmed 🔶 需要决策 authorization request + 8问 (结构化审核,中文):
判定:kernel 改动,人工层把关合并。无阻塞发现,owner floor-37 方向已满足,等 owner 授权合并。 |
[ework] CI fix verified green ✓ |
Problem
A compressed block's summary may only be injected while it still describes content that is on the wire.
syncBlockscurrently asks whether any covered message is still present:A host rewind replaces a surface range, so a block's span can be truncated inside — the surviving messages are a prefix, the newest ones are gone. The summary then describes history that no longer exists, and it keeps being injected every turn.
Neither existing mechanism catches this case:
fold-reconcile(Session death spiral: fold drift → 0 compressible ranges → over-window fail-fast (window flip + missing max_tokens headroom as compounding factors) #1908/Fold-state reconciliation: classify resent-history divergence (edit/fork/new/system-only) and make compression blocks re-anchorable chain units #1921) re-keys ids when the content is still there under churned ids; a rewind has nothing to re-key.Change
The gap's shape, in the block's own coverage order, is the discriminator:
effectiveMessageIdsorder)fold-reconcilere-keys those idsledgerSeqposition is the churn / merged-pair shapeEverything except the tail gap keeps today's keep-alive behaviour, so the only behaviour that changes is the one shape that can be named. No new config, no new state, no host special-casing — the rule reads only coverage order and presence.
The positional witness is deliberately not narrowed. Making it "exact coverage" looks more consistent, but a #2636 pair collapse legitimately covers fewer ids than positions, so exact coverage would false-kill merged content in the
noneshape. It therefore stays byte-for-byte as upstream states it, and is only consulted when no id-shaped evidence survives.Tests
kernel/tests/sync-config.test.tsgains:Full kernel suite: 1505 passing. No existing test needed to change.
Compatibility / cost
some.Alternative considered
A single pass over "is every covered id present" (all-or-nothing) fixes the ghost too, but treats id churn as deletion, because ids are content hashes and any re-serialization changes them. The shape split keeps that failure mode out by construction: interior holes and head gaps are never the rewind shape.
Amendment: tail-gap churn refinement — folded blocks must survive a re-stamp (#2265)
The original change treated every tail gap as a host rewind and deactivated
the block. But a model re-stamp re-mints the newest covered ids in place (same
slots, fresh content-hash ids), leaving the same tail-gap shape as a rewind —
yet the span is still live, so the summary must survive. In the #2265 e2e this
dropped the folded block right after a model switch.
The shape alone cannot tell a withdrawal from a re-mint, so the tail-gap case now
asks whether the history still carries the missing tail:
prefix is at least the number of missing covered ids — the re-minted tail
occupies the same slots, so the span is still live.
the slots are empty, so the newest end was genuinely cut and the summary is
stale.
This works without
ledgerSeqstamps (the #2265 re-stamp e2e is unstamped, so thepositional witness cannot carry this case). The original #4592 rewind test (pure
truncation, nothing appended) is unchanged and still deactivates.
New regression tests in
kernel/tests/sync-config.test.ts:Full kernel suite on the rebased head: 1638 passing.