Repository navigation
[PR] Fix three nested-fold state-ledger distortions (#5667) - #5676
ranxianglei wants to merge 15 commits into
Conversation
The sole consumption point (applySingleRange) now stamps each consumed child block with the consuming block's id, so an inactive block's death-cause (consumed-by-parent vs orphan-GC vs host-expand) is readable instead of requiring reverse-scanning every active block's directBlockIds. Non-consumptive deactivation paths leave the field unset. ingest.ts forwards the value instead of hardcoding null; export.ts already had the conditional export branch. Adds supersedesBlockId?: string to CompressionBlock and the display-only crossesCoveredBy?: string[] hook on CompressibleRange (used by the span-annotation commit).
On surface-replace hosts covered messages leave the resend array without a gap flag, so the segmenter silently bridges and a displayed label like m00076-m00115 spans an interior active block, literally inviting the model to re-submit the already-covered interior (#5508 family). New blocksSpannedByRange() reports the strictly-interior active blocks a range's ref-span crosses; buildCompressibleRanges stamps it on each range (propagated through mergeBatch) and formatRanges appends ' · spans folded bN'. Display-only: rows are flagged, never dropped, and foldability judgment is untouched (KDD#12 single-projection).
…tion errors (#5667) The uncompressed list now appends the same ' · spans folded bN' note to rows whose ref-span crosses an active block. The flagFor catch-all, which returned one flat 'refs unresolvable' verdict for every projection exception and sent agents misdiagnosing ledger corruption, now surfaces the real exception detail (surrogate-scrubbed, truncated to 120 chars) so a single bad endpoint reads as what it is.
A: a nested fold stamps consumed children with the consumer's id and leaves non-consumptive deactivation unset. B: blocksSpannedByRange flags strictly-interior blocks only, buildCompressibleRanges records the span on bridged surface-replace ranges (and omits it otherwise), formatRanges and mergeRangesToThreshold carry the annotation. C: an unresolvable endpoint surfaces the real projection error instead of the old flat verdict.
📦 Built Package ArtifactBranch: Latest build — install this exact versionnpm install -g billion-context@0.0.11188-pr.5676.4742896This exact version is immutable and reproducible. The rolling Recent builds (commit → version)
Download artifact
tar xzf billion-context-pr5676.tgz
npm install -g packageInstall instructions are refreshed on each push. |
…mmit (lock-sync gate drift)
(ai: vllm-qwen/qwen3.8-27b) 独立审完 PR #5676(kernel-change, 查重:不重复。 三个关注点(A 谱系无 writer / B display ref-span 跨过已折叠块 / C 投影异常被扁平化)同属「嵌套折叠态账本正确性」一个机制家族,合在一个 issue(#5667)+ 一个 PR,符合粒度政策(同症状/同机制归一)。PR 引的 #5508/#4700/#4723 是背景家族而非先行修复,这个定位我认可。 CI 现状(head bd6b978): 唯一失败 = 本地独立运行(对 PR head 树): 新回归文件 八问:
一处非阻塞观察(命名): 判定:内容层面可合并 —— A/B/C 机制正确、测试有牙且本地 8/8、Tier-A guard 绿、diff 干净聚焦、无回归。合入前需两件:①Re-run CI 清掉瞬时 lock-sync 并让被级联跳过的 test/static/e2e 真正跑出全量绿;②kernel 变更按边界走人工审批(不自动合并)。命名那条是可选打磨,不阻塞。 |
(ai: vllm-qwen/qwen3.8-27b) lock-sync 已修复,新 head 全 CI 绿(分支 本次做了什么:
结构化结论(八问):
收工判定:lock-sync 修复完成、CI 全绿,等待人工 review/merge:#5676 |
ranxianglei
left a comment
There was a problem hiding this comment.
(ai: vllm-qwen/qwen3.8-27b)
Verdict: findings-only review — code quality passes, but this PR touches kernel/ and carries a kernel-change declaration; per the Kernel Boundary (human-only review, always) and review-lane rules, a reviewer agent cannot approve. Owner decision request follows as a separate comment.
Independently verified against head bc645d818 (read the code at the PR head, did not rely on the PR description):
① Direction (issue #5667): the three distortions map to three distinct producers, and the approach hits each producer rather than masking the symptom: A adds the missing WRITER at the single consumption point (applySingleRange, kernel/src/compress.ts:1842-1843) instead of backfilling/guessing elsewhere; B annotates the display surface without touching foldability judgment at all; C lets the catch surface the real exception instead of flattening it. Root-cause shaped, not symptom-shaped.
② Regression inventory (existing behaviors on the touched paths, checked one by one):
supersedes_block_id: was ALWAYS null (no writer existed) → now carries the consuming block id in tier-N+1 distillation consumption. Deliberate change, disclosed in the PR body (displayed SAVED number intentionally unchanged — that accounting boundary is preserved verbatim). Verified: the ONLY deactivation sites in the tree are compress.ts:1842-1843 (consumption, stamps) and sync.ts:143/151/169 (reconcile / host-expand / orphan-GC — non-consumptive, correctly left unstamped); export.ts:292's conditional branch pre-existed (dead until now, additive only); the storage layer was already full-duplex on the column (src/storage/store.ts:1179-1242 upserts, :3156 load, mysql parity) so the lineage survives reload; ingest.ts:425 flips hardcoded null to forwarding?? null. No reader depends on the column being null.compressibleRanges.crossesCoveredBy+· spans folded bN: purely additive display. Grep-verified that NO foldability path consumes the field (references live only in recommend/nudge-text/types/report) — KDD#12 single-unit-projection judgment untouched; rows are flagged, never dropped or reordered. Soundness premise holds: covered messages are excluded fromcompressibleMsgsat recommend.ts:335, and on surface-replace hosts they are ABSENT from the resent array entirely, so flanks bridge into one group — exactly the bug shape the annotation describes.- flagFor error text: flat
refs unresolvable→ real exception text (surrogate-scrubbed via truncate.ts:36, ≤120 chars). Deliberate, disclosed. - kernel 0.0.180→0.0.181 + both package-locks synced: version discipline OK (commit bc645d8 exists precisely to fix the lock-sync drift).
- High-risk-pattern sweep: no fail-fast→swallow (C moves the other way), no threshold/timing/output-format drift beyond the disclosed ones, no cache/retry strategy touched, wire/prefix bytes unchanged.
- Result: no unintended regressions found.
③ Code: logic is correct. blocksSpannedByRange (kernel/src/block-map.ts:67-83) strict-interior semantics (bLo > lo && bHi < hi) match the "label bridges the hole" geometry; orderedRefPair normalization handles reversed ranges; hi - lo < 1 → []. activeSpansForSpan resolved once per call site avoids repeated filtering.
④ Test validity: kernel/tests/issue5667-nested-fold-ledger.test.ts, 8 tests — ran locally at the PR head: 8/8 pass. Teeth: A-positive is a genuine end-to-end applyCompression pin (two children → tier-2 distillation; asserts children inactive + supersedesBlockId === consumer.blockId + the consumer's own field undefined); B units pin the boundary semantics (block starting AT the range start / ending AT the range end NOT flagged; reversed-range normalization; single-ref []); B integration models the surface-replace shape exactly (input array [a,e] only, block covering m2-m4 → one range m1-m5 with crossesCoveredBy [bFolded]); C pins the real throw path (output matches /Invalid boundary ref/, does NOT match the old flat string); formatRanges asserted in BOTH directions (gate discipline satisfied).
Findings (all non-blocking; all sit in kernel/, so per the "kernel is not small" lane rule they are NOT fixed on the spot — routed through the decision flow below):
- F1 — weak negative test: the A-negative case (test lines ~113-118) constructs an inactive block by hand and asserts
supersedesBlockId === undefinedwithout exercising any sync.ts path — it would still pass if someone later stamped sync.ts:143/151/169. Suggestion: drive the orphan-GC or host-expand path and assert absence there. - F2 — union vs recompute edge (display-only): mergeBatch (recommend.ts:579-580) and the formatRanges positional merge ACCUMULATE
crossesCoveredByby union of the members' flags instead of recomputing over the merged span. Exact miss: a block whose ref range STRADDLES the seam between two merged adjacent groups is flagged by neither member (the seam point is an endpoint of both) yet lies strictly inside the merged span → the merged row bridges an active folded block with no annotation. Reachable geometry on surface-replace hosts where group-splitting puts a seam inside a folded block's ref range. report.ts avoids this by recomputing per row. No effect on foldability. Suggestion: recompute over the final merged span. - F3 — cosmetic edge: an
Errorwith an EMPTY message renders⚠ not foldable:(trailing space, blank detail); the old flat string at least self-explained. Suggestion: fall back to the prior wording when the scrubbed detail is empty. - F4 — process (the real gate for the owner): issue #5667 now has TWO open fix PRs — this #5676 (kernel→0.0.181, slimmer scope) and #5668 (head 9163578, kernel→0.0.182, extra owned-hole sharing-refactor scope, already through two review rounds). Both claim the same issue and both branch off 0.0.180 touching the same file set — merging both would conflict and duplicate the fix. Owner must pick one; see the follow-up comment.
Structured eight questions (中文结构化结论):
- 是什么问题: 嵌套压缩(tier-N 折叠被 tier-N+1 消费)让内核状态账本出现三处失真——lineage 字段无写入者、折叠行显示标签误导、错误被吞成扁平文案。
- 什么原因导致的: A =
supersedes_block_id列引入以来只有读/导出路径、没有写入者;B = recommend 按数组连续性分组,数值标签不知道跨越了被覆盖的洞;C = catch-all 把真实异常压成固定字符串。 - 影响范围与严重程度: p2——仅嵌套折叠会话(tier≥2 蒸馏)触发;A 使死因不可读且 SAVED 少计(记账),B 是展示误导(行本身可折叠,无数据丢失),C 丢诊断信息。无数据丢失、无会话不可用。
- 怎么修复的: A 在唯一消费点补写入者;B 计算严格内部 span 并在四个展示面标注(不参与任何判定);C 透出真实错误(scrub + 截断)。
- 是否有回归问题: 未发现(见②逐项清点);所有行为变更均为有意且已在 PR 正文披露。
- 是否破坏缓存: 否——wire/前缀字节不变,纯账本与展示层。
- 是否改了设计方向: 否——KDD#12 单一投影判定、row-flagged-never-dropped、wire fidelity 全部保持。
- 是否引入了新的配置: 无。
Bottom line: the code is merge-ready on its merits (no regressions found, tests have teeth, CI fully green at bc645d818). The only gates are procedural: owner authorization of the kernel change, and resolving the #5676-vs-#5668 duplication. Details in the follow-up comment.
|
🔶 需要决策 (ai: vllm-qwen/qwen3.8-27b) This PR (#5676) modifies Gated diff: kernel/src/compress.ts (sole writer at the consumption point), kernel/src/types.ts ( Reviewer verdict (full analysis in the review above): code is correct, no regressions found across the touched behavior inventory, tests have teeth (8/8 green locally at head Options:
Label |
(ai: vllm-qwen/qwen3.8-27b) Review 完成(findings-only,未 approve)——已按规则走 🔶 决策流。
结论(八问摘要):
验证:在 head 合并判定:代码本身可合;卡在两个程序性关口——① owner 对 kernel-change 的授权(kernel 禁止 agent approve);② #5668 与本 PR 同修 #5667(#5668 head 9163578、kernel→0.0.182、多一块 owned-hole 共享化重构范围;本 PR 更瘦、kernel→0.0.181),两者都从 0.0.180 分叉、触碰同一组文件,都合并会冲突+重复修复,需 owner 二选一。等 owner 拍板。 |
…esolve kernel version collision at 0.0.193 (master 0.0.192 + this PR's unreleased changes); ingest.ts keeps master's #5744 digest carry AND this PR's supersedesBlockId forwarding; lockfiles regenerated to 0.0.193
(ai: vllm-qwen/qwen3.8-27b) Merge-conflict resolution for PR #5676 — DONE & pushed; full test shards still finishing. What I did this run:
Verified live this run:
What remains / risk: only the full test-shard verdict. Risk is low — the merged tree differs from master solely by the PR's own hunks (byte-identical), and the single cross-side integration point (the ingest.ts line) passed local typecheck + targeted tests. If any shard turns red I will fix it in this lane. 【八问】
结论:冲突已解决并推送( |
(ai: vllm-qwen/qwen3.8-27b) Final verdict: full CI green on PR #5676 is now conflict-free and fully green — ready for human merge. |
[bot] Round-2 review in progress (session was force-restarted mid-run; resuming cleanly — no partial edits survived, worktree verified byte-equal to head 52eb07f). Status so far: new head = round-1 head + one merge of current master (kernel version collision resolved at 0.0.193; true diff vs master unchanged, same 11 files). All round-1 verdicts carry over. Now applying two mechanical fixes directly on the PR branch per the small-findings policy — (F1) rewriting the tautological A-negative lineage test to drive the real sync deactivation paths, (F3) empty-error-message edge in the not-foldable detail rendering — then posting the full structured verdict. Short delay. |
…ineage negative case (#5667 review round 2) The A-negative case built an inactive block by hand and asserted its own field was undefined - a tautology that would still pass if any deactivation site started stamping supersedesBlockId. Rewrite it to run syncBlocks over three real non-consumptive paths (orphan GC, host expand, reconcile re-mark of a recorded lineage edge) and assert none of them stamps.
…age (#5667 review round 2) An Error with an empty message rendered as '⚠ not foldable: ' (trailing space, blank detail). Extract the scrub/trim/truncate into an exported projectionErrorDetail helper that falls back to 'no error detail', keeping the row honest instead of fabricating a cause or leaving a dangling colon.
ranxianglei
left a comment
There was a problem hiding this comment.
(ai: vllm-qwen/qwen3.8-27b)
Round 2 review — head 7237f58 (author's master merge 52eb07f + four reviewer commits). Continues the round-1 findings-only review (pullrequestreview-5768159333); approval is impossible while the kernel/ touch + kernel-change: declaration stand (Kernel Boundary rule 3, human-only tier).
What changed since round 1
- Only new upstream content is the merge of current master (
52eb07f): kernel version collision resolved at 0.0.193 (master 0.0.192 + this PR's delta);src/storage/ingest.tskeeps BOTH master's #5744 digest carry AND this PR'ssupersedesBlockIdforwarding — verified line-by-line at src/storage/ingest.ts:432, resolution correct. - True diff vs current master (
58a8796) = the same 11 files / +327/-13 as round 1; recommend.ts / block-map.ts / nudge-text.ts / report.ts / the test file are byte-identical to what I reviewed in round 1; types.ts gained only master's additive fields. All round-1 verdicts carry over unchanged (stamp-site uniqueness at kernel/src/compress.ts:1981-1982; storage full-duplex on SQLite+MySQL; KDD#12 isolation — no foldability path consumescrossesCoveredBy).
Reviewer fixes pushed to this branch (mechanical-kernel exemption, owner policy 2026-11-06)
- 已顺手修:F1 — the A-negative lineage test was a tautology (hand-built inactive block asserting its own field; exercised zero kernel code — it would still pass if any deactivation site started stamping). Rewritten to run
syncBlocksover three real non-consumptive paths (orphan GC, host expand, reconcile re-mark of a recorded lineage edge) and assert none stampssupersedesBlockId. Mechanically safe: test-only change. Regression pin:kernel/tests/issue5667-nested-fold-ledger.test.ts→ "A: non-consumptive deactivation leaves supersedesBlockId unset". Commit4c06e73. - 已顺手修:F3 — an
Errorwith an empty message rendered⚠ not foldable:(trailing space, blank detail). Extracted exportedprojectionErrorDetail()(scrub lone surrogates → trim → truncate(120), fallbackno error detail) and pinned direct unit cases (empty / whitespace-only / plain string / 500-char truncation). Mechanically safe: additive export, identical prefix format, zero behavior change for non-empty messages. Commit5b406a2. - Version discipline follows the author's own pattern:
c51064abumps kernel 0.0.193→0.0.194 (required — touches kernel/src/report.ts),7237f58syncs both package-locks.
Verification: targeted suite kernel/tests/issue5667-nested-fold-ledger.test.ts → 9/9 pass locally, green at each intermediate commit state; CI was green at 52eb07f per the mirror check cache (re-running now at 7237f58).
Open items (owner decision — see follow-up comment)
- F2 (display-only): mergeBatch/formatRanges accumulate
crossesCoveredByby member union instead of recomputing over the merged span — a folded block straddling the seam between two sub-threshold adjacent groups stays unannotated on nudge/panel/stream surfaces (report.ts avoids it by recomputing per row). A correct fix needs spans/state passed into the formatter (interface change) → not mechanical → decision item. - F4 (process): competing PR #5668 (head
fdc808b, still open,Closes #5667, broader scope incl. owned-hole refactor) targets the same issue. Merging both conflicts and double-fixes; owner must pick one.
Verdict: findings-only, NO approval. The code is sound and merge-ready pending the two owner decisions below.
中文八问(第 2 轮)
- 是什么问题:嵌套折叠(新块消费活跃块)造成三处状态账本失真——A 子块被消费后失去父块血缘、B 区间展示静默跨越存活折叠块、C 真实投影错误被塌缩成一句死板结论。本 PR 修这三处;第 2 轮另含我的两个机械性顺手修复与作者的 master 合并。
- 什么原因导致的:A——写
active=false的点位有多个(消费/reconcile/孤儿GC/宿主展开)却没有血缘字段,失活原因不可诊断;B——可压缩区间构建时不知道底下压着哪些存活折叠块,展示面拿不到跨越信息;C——catch-all 把所有投影异常塌缩成同一句固定文案,丢失真实原因。 - 影响范围与严重程度:纯内部状态与展示失真——线上字节、前缀缓存、折叠判定均不变(KDD#12 单一投影不变式经 grep 验证:无任何折叠资格路径消费
crossesCoveredBy)。受影响面=嵌套折叠场景下面板/nudge/acp_status 的展示与会话重载后的血缘可追溯性。严重程度:可观测性/体验瑕疵级,非可用性缺陷。 - 怎么修复的:A 在唯一消费点(applySingleRange)盖
supersedesBlockId戳并贯通存储列(SQLite+MySQL 全双工);B 在区间构建时计算严格内部跨越并以 display-only 标注随行渲染;C 把清洗/截断后的真实错误文本带进结论行,空消息稳定回退(本轮补上)。 - 是否有回归问题:逐项过完触碰路径的既有行为——deactivation 各路径语义不变(新增测试钉死三条非消费路径不盖戳)、存储 upsert/load/dump 全双工不丢列、四个展示面只增标注不改原有文字、SAVED derivation 有意不动(PR 正文已披露诚实边界)、wire/前缀字节零变化、golden 无 churn。未发现回归。
- 是否破坏缓存:不涉及——纯状态账本+展示层变更,未触碰任何缓存键/重试/游标。
- 是否改了设计方向:无架构转向——在既有账本上加一个可选血缘字段与一个 display-only 标注字段,均为 additive。
- 是否引入了新的配置:无新 env/config/默认值。
合并判定:代码本身可合;卡在两点 owner 决策——① kernel-change 授权(human-only tier),② #5676 vs #5668 二选一(同 issue 竞争 PR)。见下方 🔶 决策请求。
|
🔶 需要决策 Carrying forward the round-1 authorization request (review Gated diff (vs current master A. Authorize the kernel change?
B. Duplicate-PR pick (same issue #5667): #5676 (this PR — three ledger distortions, +327/-13, reviewed twice, tighter scope) vs #5668 (head Per lane rules no new issue was opened; needs-decision label applied on the mirror thread. |
[bot] Round-2 review complete — upstream PR #5676, head now What happened this round:
Verdict: code sound and merge-ready; blocked on two owner decisions:
F2 (display-only seam-annotation edge on merged ranges) stays converted-to-decision inside that request — its correct fix needs an interface change, so it is not mechanical. 中文八问(第 2 轮)
合并判定:代码本身可合;等 owner 拍板 A(kernel-change 授权)与 B(#5676 vs #5668 二选一)。 协调行:round-2 review 已交付(findings-only;顺手修 2 处已推 4c06e73 / 5b406a2 + 版本/锁同步;待 owner 决策 A/B)。 |
[bot] Restart check-in: nothing was lost — round-2 review was fully delivered before this restart (commits |
…esolve kernel version collision 0.0.194 vs 0.0.195 at 0.0.196; lockfiles regenerated to 0.0.196
(ai: vllm-qwen/qwen3.8-27b) PR #5676 — conflict re-resolved AND the one red shard cleared. Full CI green on This run did two things (this lane owns both): 1. Merge-conflict resolution (second round). Since my previous merge, another agent pushed 4 review-round-2 commits to the branch (
2. Red CI fixing. One shard failed on the new head:
PR #5676 is conflict-free and fully green — ready for human merge. 【八问】
结论:冲突已解决( |
[bot] 🏷 Round-3 in progress (status, not final verdict): the author pushed one new commit since my round-2 pass — |
ranxianglei
left a comment
There was a problem hiding this comment.
(ai: vllm-qwen/qwen3.8-27b)
Round-3 review — head 06a25aa68 (findings-only, NOT approving: PR touches kernel/ and carries a kernel-change: declaration → human-only tier per Kernel Boundary rule 3; see the 🔶 comments in-thread).
What changed since round 2 (7237f58): exactly ONE commit — a merge of current master c26c31ace4 into the branch, resolving the kernel version collision at 0.0.196 (master had moved to 0.0.195 via the #5765 blockOps gate). No new PR code; the entire delta vs my round-2 head is master's work (web handoff rendering, #5765 block-lifecycle tools, #6132 compressAtFoldPoint removal, #5432 trailing-system tails) plus lockfile regeneration.
Merge resolution verified clean:
- True diff vs current master = the SAME 11 files as rounds 1–2 (+389/-13, incl. my F1/F3 reviewer fix commits); no scope creep.
- All concern A/B/C hunks intact at their shifted lines: stamp site kernel/src/compress.ts:1977 (
consumed.supersedesBlockId = blockId, sole consumptive writer), kernel/src/block-map.ts:67blocksSpannedByRange, kernel/src/recommend.ts:506 + 579-580 (stamp + mergeBatch union), kernel/src/nudge-text.ts:224 span suffix, kernel/src/report.ts:198projectionErrorDetail+ :515 flagFor catch, kernel/src/types.ts:130 field, src/storage/ingest.ts:432 forwarding coexisting correctly with master's #5744 digest carry. - Cross-merge interaction check (the one real risk this round): master's NEW #5765
kernel/src/block-ops.tsoperates on ACTIVE blocks only and never deactivates or consumes — a full.active = falseinventory at the new head returns exactly the known set (compress.ts:1976 stamped; sync.ts:155/163/191 non-consumptive, unstamped). Master's own guard ("a compress range consuming a retired block is rejected") further confirms consumption stays centralized where the lineage stamp lives. Concern A's invariant holds across the merge. - Version discipline: kernel/package.json = 0.0.196; both package-locks = 0.0.196 (kernel lock L3+L9, root lock
kernelfile-dep entry). CI lock-sync / version-guard / kernel-guard all green. - Local targeted run AT THE MERGED HEAD: issue5667 suite 9/9 (incl. the syncBlocks-driven negative case against master's updated sync.ts) + issue5765-retire-rewrite 9/9 → 18/18 pass.
- CI on
06a25aa68: 30 checks, 0 failed, 0 pending (mirror cache).
Findings terminal state: F1 FIXED (4c06e73), F3 FIXED (5b406a2), F2 CONVERTED TO DECISION (seam-annotation edge, display-only — inside the 🔶 request), F4 (competing PR #5668 still open for the same issue #5667) part of the same request. NO NEW findings this round.
Verdict: code-side merge-ready; blocked solely on the owner rulings (A: kernel-change authorization, B: pick #5676 vs #5668).
|
🔶 需要决策 Update to the still-pending authorization request (round 1: issuecomment-6630492400 · round 2: issuecomment-6794995037) — the ask is UNCHANGED; the gated diff simply re-based onto master again:
|
[bot] 🏷 Round-3 review complete — upstream PR #5676 at head What happened this round: the only new commit since my round-2 pass is a merge of current master (
Verdict: code-side merge-ready; blocked solely on your two rulings — (A) authorize the kernel change (human-only tier), (B) pick #5676 vs #5668 (recommendation: #5676 unless the owned-hole refactor is wanted first). 中文八问(结构化结论)
收工判定:代码可合,等 owner 拍板 A/B(🔶 已挂,标签 needs-decision 在位)。 |
(ai: vllm-qwen/qwen3.8-27b) PR #5676 — verified live this run: no merge conflict exists, CI is green, nothing to push. The round-3 🔶 update that just synced back describes the same state I independently re-verified against live sources before touching anything. Live git state (queried directly from the remote this run):
So the forwarded "dirty / conflict" marker is stale: the last CI-engineer pass already merged CI: at head Change-set integrity: Deliberately did NOT do (and why):
The remaining blocker is purely procedural: owner rulings (A) authorize/request-changes the kernel change and (B) resolve the #5676-vs-#5668 duplication. Until those land the PR sits at 【八问】
收工判定: 本轮零推送、零改动、零垃圾提交;PR 已与最新 master 同步且全绿,唯一剩余是等待 owner 对 kernel-change 的授权(A)与 #5676/#5668 二选一(B)。CI 车道无可再修项,移交 owner 决策。 |
(ai: vllm-qwen/qwen3.8-27b) Re-triggered conflict-forward — re-verified live this run; state is unchanged and there is still nothing to fix. Per status-freshness policy I did not lean on my earlier pass — I pulled fresh remote tips plus a fresh mirror-cache read (refreshed after my last run, ~1h later). Live results this run:
So the forwarded "dirty/conflict" marker is still stale: there is no textual conflict to resolve and no red job to fix. The only real blocker is the human-only kernel-change approval gate (Kernel Boundary rule 3), which is not mine to satisfy and was already escalated via the 🔶 需要决策 request (A/B rulings) in rounds 1–3. Action this run: nothing pushed. No junk merge commit, no PR-body edit, no duplicate 🔶, no re-label, no new issue. Still awaiting owner decisions (A) authorize/request-changes the kernel change and (B) pick #5676 vs #5668 for issue #5667. 【八问】
收工判定: 状态与上轮一致且全绿,CI 车道无可再修项;唯一剩余仍是等待 owner 对 kernel-change 授权 (A) 与 #5676/#5668 二选一 (B)。不重复推送、不重复 🔶/标签。 |
(ai: vllm-qwen/qwen3.8-27b) Third re-trigger — re-verified live this run; state is byte-identical to my last two passes, still nothing to fix. Per status-freshness I pulled fresh remote tips + a fresh mirror-cache read (cache refreshed at 00:30Z, after my prior run).
Action this run: nothing pushed, no PR-body edit, no duplicate 🔶, no re-label, no new issue. The only real blocker remains the human-only kernel-change gate (Kernel Boundary rule 3) plus the #5676-vs-#5668 pick — both awaiting owner rulings (A) authorize/request-changes and (B) pick one PR for issue #5667. 【八问】(本轮状态与前两轮一致)
收工判定: 状态全绿且无冲突,CI 车道无可再修项;唯一剩余仍是等待 owner 对 kernel-change 授权 (A) 与 #5676/#5668 二选一 (B)。不重复推送、不重复 🔶/标签。若此转发再次触发而状态仍不变,说明是 daemon 对 blocked 状态的例行重发,非新缺陷。 |
…ision 0.0.196 vs 0.0.197 at 0.0.198; lockfiles synced
(ai: vllm-qwen/qwen3.8-27b) Conflict resolved and pushed. This run master moved ahead ( What I did this run:
Mirror cache now shows The remaining blocker is not a conflict: it's the kernel-change human-only approval (Kernel Boundary rule 3) plus the #5676-vs-#5668 duplicate pick — both already escalated via 🔶 in earlier rounds and pending your A/B. I did not touch the PR body, re-post 🔶, re-label, or open a new issue. 八问
判定:冲突已解并推送( |
(ai: vllm-qwen/qwen3.8-27b) CI status on State recap: conflict resolved (mergeable_state = |
ranxianglei
left a comment
There was a problem hiding this comment.
(ai: vllm-qwen/qwen3.8-27b)
Reviewed end-to-end: PR body, linked issue #5667, full diff (11 files, +389/-13), the new 8-test regression file, and the touched-module context. CI is green (static-gates / mysql-contract / lifecycle-ledger-guard / architecture-docs all pass; test shards 0 failed).
Verdict: code is correct, no blocking findings, no small findings to fix on the spot — but this PR touches kernel/ and carries a kernel-change: declaration, so per the authorization boundary I am NOT approving. The merge waits on owner authorization (see the 🔶 需要决策 comment below).
What I verified, concern by concern:
A — lineage writer (kernel/src/compress.ts:1972, kernel/src/types.ts, src/storage/ingest.ts:432)
- The SOLE consumption point in
applySingleRangenow stampsconsumed.supersedesBlockId = blockId(blockId= the newly-allocated consumer viaallocateBlockId). Non-consumptive deactivation (orphan GC / host expand insync.ts) is left untouched — that absence is exactly what keeps an inactive block's death cause discriminable. ingest.tsforwardsb.supersedesBlockId ?? null(was hardcodednull);export.ts:339already had the conditional export branch. The field is additive; the displayed SAVED number (sum-over-active-blocks derivation) is untouched.
B — display-only span annotation (kernel/src/block-map.ts, kernel/src/recommend.ts, kernel/src/nudge-text.ts, kernel/src/report.ts)
blocksSpannedByRangereports strictly-interior active blocks (bLo > lo && bHi < hi). The "partial overlap impossible" assumption holds: a covered message is never a range member, so a block can only intersect a range's span as a strict interior hole.buildCompressibleRangesresolvesactiveBlockSpansonce and stampscrossesCoveredBy;mergeBatchunions it (deduped);formatRanges(nudge banner / decide prompt / web panel) andrenderUncompressedRanges(acp_status uncompressed list) append· spans folded bN. Rows are flagged, never dropped — foldability judgment is untouched (KDD#12 single-projection holds).
C — surfaced projection error (kernel/src/report.ts)
- New
projectionErrorDetail(err): scrubs lone surrogates, trims, truncates to 120 chars, falls back to"no error detail". TheflagForcatch-all now surfaces the real detail instead of the flatrefs unresolvable. No existing test pins the flat string, so nothing regresses.
Tests — kernel/tests/issue5667-nested-fold-ledger.test.ts (8 tests, all with teeth): A positive (real applyCompression nested fold) + negative (real syncBlocks orphan-GC / host-expand / reconcile re-mark paths); B unit / integration / format / merge + negative; C real-throw path (BLOCKED endpoint) + edge cases (empty/whitespace/truncation). Deterministic — no port, no network, no timing.
House conventions — kernel version bump 0.0.197→0.0.198 correct (master is at 0.0.197); both package-lock.json and kernel/package-lock.json synced to 0.0.198; no new config surface; golden wire-contract has no reference to the new field/text (no golden churn); no as any / @ts-ignore / console.error; comments explain "why" (defect refs + KDD#12), not "what".
8问 (中文,供人工 reviewer):
- 是什么问题: 嵌套折叠(新块消费活动块)暴露三处状态账目失真——(A)
supersedes_block_id列全仓无写入点,导致 inactive 块死因不可判读、SAVED 账目漏账;(B) range 标签字面跨越已覆盖区间,诱导模型把已折叠内部当新内容重提(冗余重折);(C)flagForcatch-all 把投影异常吞成 flat verdict,误导排查方向。 - 什么原因导致的: (A) 消费弃置点
compress.ts只置active=false,从未写 lineage 字段——接口全链齐备(类型/ingest/export)唯 writer 缺位;(B) surface-replace 视图下 covered 消息离阵不留 segmentation gap,分段器静默桥接两端,推荐/展示面不标注跨已覆盖区间的跨度;(C) catch 块对一切异常返回同一措辞,丢失了具体原因。 - 影响范围与严重程度: (A) 诊断能力 + SAVED 账目准确性(每次嵌套消费确定性漏一次);(B) 冗余重折 → 重复 prefix cache miss + stats 双计(#5508 族小时级无效循环的诱因之一);(C) 误导排查的时间成本。均为诊断/展示/性能类瑕疵,非可用性缺陷,无数据丢失。
- 怎么修复的: (A) 在唯一消费点补写 lineage(非消费性弃置必须不带,双向钉死);(B)
CompressibleRange增显示专用字段crossesCoveredBy,四处渲染统一追加· spans folded bN(rows flagged, never dropped,不改资格判定——KDD#12 单一投影铁律);(C) 透出异常消息(截断 120/surrogate 清理/空值兜底)。 - 是否有回归问题: 无。A 是 additive(新字段仅在嵌套消费时填充,SAVED 推导不变);B 是 display-only(仅当 range 跨已折叠块时追加文本,不影响 foldability);C 是诊断措辞(无既有测试钉死 flat 字符串)。高危模式逐项过:无语义漂移、无 fail-fast 变吞错、无阈值/时序/输出格式漂移(新增显示文本已按 old→new 在 PR body 披露)。
- 是否破坏缓存: 不涉及。B 的显示文本只改展示面、不改 prefix cache 内容;A 的 lineage 字段不影响缓存键;C 的措辞不影响缓存。
- 是否改了设计方向: 不涉及。三处修复都在既有架构/边界内(A 补 writer、B 加显示字段、C 透出错误),无数据流转向。
- 是否引入了新的配置: 不涉及。无新 env/config/默认值。
结论: 代码正确、测试有牙、无回归、无小问题需顺手修。但本 PR 触及 kernel/ 且带 kernel-change: 声明,按授权边界我不批准——合并等待 owner 在下方 🔶 需要决策 评论中授权。
🔶 需要决策 (ai: vllm-qwen/qwen3.8-27b) 本 PR (#5676) 触及 被卡 gated diff(kernel/ 变更,逐文件):
review 结论(详见上方 findings-only review 的 8问): 代码正确、测试有牙、无回归、无小问题需顺手修。技术面无异议,唯一卡点是 kernel 变更的人工审批档。CI 已绿(static-gates / mysql-contract / lifecycle-ledger-guard / architecture-docs 通过,test shards 0 failed)。 请求: 请 owner 授权合并(或指出需调整之处)。 |
…ision 0.0.198 vs 0.0.199 at 0.0.200; lockfiles synced
(ai: vllm-qwen/qwen3.8-27b) Re-merged live master into #5676 — conflict resolved, pushed final head This run (5th conflict-forward, attempt 1/6):
Live state (mirror cache, just picked up the new head):
The sole remaining gate is the kernel-change human-only approval + the duplicate-PR pick (#5676 vs #5668), both already escalated via the 🔶 decision request (pending your ruling). No new issue opened, no PR-body edit, no duplicate 🔶/label. 八问:
判定:冲突已解决、CI 在跑(目前 0 失败)、本地验证绿;唯一剩余门禁是内核变更的人工审批 + 重复 PR 取舍(#5676 vs #5668),两者均已通过 🔶 升级等你拍板,非 CI 工程师可代劳。 |
ranxianglei
left a comment
There was a problem hiding this comment.
(ai: vllm-qwen/qwen3.8-27b)
Re-review at new head 90abc3395 (was c04860a54).
The new head is a merge commit — it merged current master (a446a3c1c8) into the PR branch to resolve a kernel version collision (PR 0.0.198 vs master 0.0.199 → 0.0.200). I verified:
- PR content is byte-identical to the previously-reviewed head. The 11-file contribution vs current master is the same +389/-13; I re-read every file (A:
kernel/src/compress.ts/kernel/src/types.ts/src/storage/ingest.ts; B:kernel/src/block-map.ts/kernel/src/recommend.ts/kernel/src/nudge-text.ts; C:kernel/src/report.ts; the 8-testkernel/tests/issue5667-nested-fold-ledger.test.ts) — all match the prior review exactly. - Version bump 0.0.200 is correct (master is now at 0.0.199; both
package-lock.jsonandkernel/package-lock.jsonsynced to 0.0.200). - CI green on the new head (0 failed, 2 shards still running).
Since the content is unchanged, all findings from my prior review (head c04860a54) still hold: code correct, tests have teeth, no regressions, no small findings to fix on the spot.
Still a kernel change (touches kernel/ + carries kernel-change:) → per the authorization boundary I am NOT approving. The needs-decision label is already applied and the 🔶 需要决策 comment from the prior round stands — the merge waits on owner authorization.
8问 (中文,供人工 reviewer — 与上一轮 head c04860a54 一致,PR 内容未变):
- 是什么问题: 嵌套折叠(新块消费活动块)暴露三处状态账目失真——(A)
supersedes_block_id列全仓无写入点,导致 inactive 块死因不可判读、SAVED 账目漏账;(B) range 标签字面跨越已覆盖区间,诱导模型把已折叠内部当新内容重提(冗余重折);(C)flagForcatch-all 把投影异常吞成 flat verdict,误导排查方向。 - 什么原因导致的: (A) 消费弃置点只置
active=false,从未写 lineage 字段——接口全链齐备(类型/ingest/export)唯 writer 缺位;(B) surface-replace 视图下 covered 消息离阵不留 segmentation gap,分段器静默桥接两端,推荐/展示面不标注跨已覆盖区间的跨度;(C) catch 块对一切异常返回同一措辞,丢失了具体原因。 - 影响范围与严重程度: (A) 诊断能力 + SAVED 账目准确性(每次嵌套消费确定性漏一次);(B) 冗余重折 → 重复 prefix cache miss + stats 双计(#5508 族小时级无效循环的诱因之一);(C) 误导排查的时间成本。均为诊断/展示/性能类瑕疵,非可用性缺陷,无数据丢失。
- 怎么修复的: (A) 在唯一消费点补写 lineage(非消费性弃置必须不带,双向钉死);(B)
CompressibleRange增显示专用字段crossesCoveredBy,四处渲染统一追加· spans folded bN(rows flagged, never dropped,不改资格判定——KDD#12 单一投影铁律);(C) 透出异常消息(截断 120/surrogate 清理/空值兜底)。 - 是否有回归问题: 无。A 是 additive(新字段仅在嵌套消费时填充,SAVED 推导不变);B 是 display-only(仅当 range 跨已折叠块时追加文本,不影响 foldability);C 是诊断措辞(无既有测试钉死 flat 字符串)。高危模式逐项过:无语义漂移、无 fail-fast 变吞错、无阈值/时序/输出格式漂移(新增显示文本已按 old→new 在 PR body 披露)。
- 是否破坏缓存: 不涉及。B 的显示文本只改展示面、不改 prefix cache 内容;A 的 lineage 字段不影响缓存键;C 的措辞不影响缓存。
- 是否改了设计方向: 不涉及。三处修复都在既有架构/边界内(A 补 writer、B 加显示字段、C 透出错误),无数据流转向。
- 是否引入了新的配置: 不涉及。无新 env/config/默认值。
结论: 新 head 仅是 master 合并(版本冲突 0.0.198 vs 0.0.199 → 0.0.200),PR 内容与上一轮 byte-identical,既有结论全部成立。代码正确、测试有牙、无回归、无小问题需顺手修。但本 PR 触及 kernel/ 且带 kernel-change: 声明,按授权边界我不批准——合并等待 owner 授权(needs-decision 标签已打)。
[bot] 🏷 (ai: vllm-qwen/qwen3.8-27b) Re-review done on new head The new head is a merge commit that pulled current master ( Verdict (unchanged from the prior round): code correct, tests have teeth, no regressions, no small findings to fix on the spot. Not approving — this is a kernel change (touches Posted an updated findings-only re-review (with the 8问) on the PR; please authorize or flag anything to change. |
…ision 0.0.200 vs 0.0.201 at 0.0.202; lockfiles synced
(ai: vllm-qwen/qwen3.8-27b)
kernel-change: nested-fold state-ledger correctness (#5667). Three ledger distortions surfaced by nested folding (a new block consuming an active one): (A) supersedes_block_id had no writer, so an inactive block's death-cause was unreadable and SAVED accounting lost the consumed block's tokens; (B) display surfaces emitted bare ref-spans that silently crossed already-covered interior blocks, inviting redundant re-folds; (C) the acp_status projection-error catch-all collapsed every exception into one flat verdict, misdirecting diagnosis. The host side cannot fix A or C (the kernel owns the consumption point and the status renderer), and B's detection primitive belongs next to the other block-span helpers. Owner direction pre-approved in the issue ("建议修法 见 PR").
Fixes #5667
What changes (3 concerns + version bump)
A — lineage writer (
compress.ts,types.ts,ingest.ts)The sole consumption point in
applySingleRangenow stamps each consumed child block with the consuming block's id (supersedesBlockId). Non-consumptive deactivation (orphan GC, host expand) leaves it unset.ingest.tsforwards the value instead of hardcodingnull;export.tsalready had the conditional export branch.B — display-only span annotation (
block-map.ts,recommend.ts,nudge-text.ts,report.ts)New
blocksSpannedByRange()reports the strictly-interior active blocks a range's ref-span crosses.buildCompressibleRangesstamps it (propagated throughmergeBatch);formatRanges(nudge banner / decide prompt / web panel / acp-status) and the acp_status uncompressed list append· spans folded bN. Rows are flagged, never dropped; foldability judgment is untouched (KDD#12 single-projection holds).C — surfaced projection error (
report.ts)The
flagForcatch-all now surfaces the real exception detail (surrogate-scrubbed, truncated to 120 chars) instead of one flatrefs unresolvablestring.Behavior changes (old → new)
supersedes_block_idcolumn: alwaysnull→ populated on nested consumption. Additive; export gains an optional field. Does NOT change the displayed SAVED number (the sum-over-active-blocks derivation is untouched) — it makes the consumed/consumer relationship recoverable and an inactive block's death-cause readable without reverse-scanningdirectBlockIds.· spans folded bNappended to any range whose ref-span crosses an active block (nudge banner, decide prompt, web panel, acp_status uncompressed list). Display-only; no foldability effect.not foldable: refs unresolvable→not foldable: <real detail>(<=120 chars). Diagnostic wording only.No new config surface. The golden wire-contract has no compressibleRanges reference — verified no golden churn (wire-contract suite green locally).
Tests
New
kernel/tests/issue5667-nested-fold-ledger.test.ts(8 tests, all pass): A positive+negative, B unit/integration/format/merge + negative, C real-throw path. Local targeted runs green: the new file,tests/verif-subset-guard.test.ts(Tier-A compress.ts),tests/wire-contract.test.ts, plus the touched-module kernel siblings (recommend/block-map/nudge-text/report/compress). Full-suite verdict deferred to CI on the pushed head.Dedup
Not a straight duplicate. Related families cited in the issue as context, not prior fixes: #5508 (B's display-surface root), #4700/#4723 (A's missing-writer family).