Repository navigation
recommend/apply 共用一个区间可折叠性判定:acp_status 不再推荐必然被拒的区间 - #3268
Conversation
📦 Built Package ArtifactBranch: Option A — Install this exact build (recommended)npm install -g billion-context@0.0.3850-pr.3268.d9a1e61This exact version is immutable and reproducible. The rolling Option B — Download artifact
tar xzf billion-context-pr3268.tgz
npm install -g packageInstall instructions are refreshed on each push. |
[bot] 🏷 (ai: vllm-qwen/qwen3.8-27b) **查重:不重复。**本 PR 是 #3236(已批准 A 方案)的实现,原 issue 侧查重已核过 #2663/#2778/#3192/#3205/#3204/#2886/#2638/#3185 各面;我又按失败签名在 open+closed 的 issue/PR 里搜了 recommend/apply 一致性、unit-projection、turn-integrity withdraw、"would split" 相关条目,无并行实现或重复立项。 开始独立审核(不复读 PR 描述与 issue 结论):方向关(#3236 根因是否真在此 diff 里被修掉)→ 回归清点(apply 侧既有行为逐项)→ 代码逐段精读(kernel 高危域)→ 测试有效性 → diff 整洁度。涉及 |
#3236) Eligibility and execution used two different definitions of "can this range fold": recommend screened turn-integrity over the GLOBAL compressible set while apply judged each SUBMITTED range alone, on a different array class, and widened boundaries within a capped window. A turn whose partners sat in other advertised units passed global screening yet made every submission throw "Range would split N turn(s)" — a permanent advertise/reject loop (billion-context#3236). - unit-projection.ts: projectUnit extracts applySingleRange's pre-block sequence verbatim (boundary widening -> carrier/coverage/media/ protected-tool carve -> protected-zone carve -> turn-integrity withdrawal -> emptiness); returns the projection or the ready-to-throw fatal error (zone/split). collectCoverage moves here. - applySingleRange delegates to projectUnit; errors/warnings stay byte-identical (existing suite passes untouched). - recommendNode re-screens every FINAL merged unit through projectUnit and demotes fatal units to gaps (no re-merge after filtering). - NodeEffects.applyView: judgment now runs on the EXACT array class applyCompression executes on; absent it, falls back to the pre-prune original (#2663) or the given view. - report.ts: buildStatusReport accepts config + originalMessages; the uncompressed view appends an additive warning flag to rows whose projection is fatal (flagged, never dropped); legacy output unchanged. - kernel/tests/issue3236-recommend-apply-consistency.test.ts: both divergence geometries (delayed results unreachable / reachable, double-burst interleave), healthy-turn non-over-screening, gate intactness on manual submit, and the acp_status flag surface. kernel 0.0.124 -> 0.0.125
Host lanes whose processTurn input is a render/processed view (plugin panel: mem.processed with synthetic separators, #2627; relay loop: processed messages) passed that view to the kernel, so even the pre- prune originalMessages fallback was not the class applyCompression executes on. Pass applyView everywhere it differs: - acp-status: AcpStatusCtx gains compressMessages (structural typing — both LoopCtx and RewriteCtx already carry it); liveCompressionRanges feeds it as applyView; handleAcpStatus passes config + original messages to buildStatusReport so the uncompressed view can flag un-foldable rows. - stream postCompressTail fallback + plugin panel status: applyView set from ctx.compressMessages / mem.original respectively. AGENTS.md: KDD bullet 12 records the shared unit-projection judgment.
73f2a5f to
f8b95a6
Compare
[bot] 🏷 (ai: vllm-qwen/qwen3.8-27b) Review 结论(独立重读全量 diff + 本地验证) 先交代一个操作:PR 基线已落后 master 3 个合并(基于 b2868ca,master 已到 c2a73cc)。我已把它 rebase 到当前 master——零冲突,推回原分支(旧提交 6f05cda/73f2a5f3e → 新 d1c47ba/f8b95a64d,内容不变)。rebase 是必要的前置而非顺手:master 侧 #3213(dead-ref 过滤,#3192/#3204)恰好改了本 PR 触碰的同一批 host 文件,必须在合并视角下确认两套机制共存。 回归清点(逐项审过的既有行为与结论):
一个非阻塞观察:screenRecommendedUnits 对 projectUnit 的任何 throw 统一降为 gap(预期只有 BoundaryNotFoundError),可接受,此处记录在案。 本地验证(rebase 后头 f8b95a6): typecheck 绿;kernel 定向套件 47/47(compress、protect-recent pair-integrity、message-protection、新 issue3236 文件 4 例);bili 定向套件 31/31(含 dead-ref-range-filter / issue3204-dead-ref-nudge-panel / acp-status / nudge-decide / issue2847-doomed-nonretryable-status 全过)。全量回归交给远程 CI。 测试有效性: 新测试复现报障几何(5-call burst 首结果即时 + 4 延迟结果超出 20-slot 扩展窗;双 burst 交错),且双向钉契约——doomed 区间不再被推荐 且 手动提交仍抛同一错误(gate 没有被放宽)、自愈几何照常可折、健康 turn 不被过度过滤、acp_status 标记但不删行。断言有牙,此 bug 回归能抓住。 八问:
合并判定:可合(待远程 CI 全量套件 + Kernel Boundary 人工批准)。代码正确、提取逐字节一致、测试真实钉住契约、stale base 已 rebase 并验证;本回复即 kernel 层人工审核的结构化记录。 |
|
ci不跑了 |
[bot] 🏷 (ai: vllm-qwen/qwen3.8-27b) 查清了,CI 没坏,是主线测试被 fail-fast 挡掉了,根因是 kernel 版本号撞车。已修,说明如下: 现象拆解:上一轮跑在 ea0dbe7 上时, 为什么 kernel-guard 红:版本号撞车。本 PR 把 acp-kernel 从 0.0.124 提到 0.0.125;而先合入 master 的另一个 kernel 提交(164f5d9e4,MCP-form compress 豁免孤儿剥离那个)也占了 0.0.125。两边把同一行改成同一个值,git 自动合并干净无冲突——但副作用是 PR diff 里「版本变更」整行消失了。kernel-guard 规则 2 检查的是「动了 kernel/src 就必须有版本行变化」,于是判成「源码变了没提版本」→ 红。本地用 guard 的原逻辑复现确认:SRC_CHANGED=5 个文件、BUMPED=0,与 CI 报错一致。 修复:在分支顶端加了一个独立小提交 当前状态:新 head 上全套 CI 已重新触发(多 lane 排队中,仓库并发高)。kernel-guard 转绿后 test/static-gates 会照常开跑;如果还有红我会继续跟。 |
[bot] 🏷 (ai: vllm-qwen/qwen3.8-27b) 状态更新(收工摘要):版本号撞车已修复,CI 恢复正常。新 head 此前已完成的两件事回顾:① review 结论(八问 + 六项回归清点)见上条长回复,判定可合(待 CI + kernel 层人工批准);② stale base 已 rebase 到当前 master(零冲突),dead-ref 过滤(#3192/#3204)与本 PR 机制正交共存已验证。 |
📦 Merged Build PublishedThis merge to master was published as npm install -g billion-context@0.0.467-master.b726fb4 # this exact build
npm install -g billion-context@master # always the newest merged build
|
kernel-change: #3236 — 压缩的资格判定与执行此前有两套「区间可否折叠」定义(recommend 侧对全部 compressible 消息做全局判定,apply 侧按提交的每个区间单独判定、且用不同的消息数组),导致 acp_status/nudge 反复推荐被 apply 整段拒绝("Range would split N turn(s)")的区间,形成永久循环。本变更把 apply 的既有判定序列原样抽成共享 projectUnit 函数,两侧走同一入口;涉及 kernel/ 核心判定路径修改,需人工 review。
Closes #3236
改了什么
projectUnit= applySingleRange pre-block 序列的原样提取(边界扩展 → carrier/coverage/media/受保护工具剔除 → 保护区剔除 → turn-integrity 撤回 → 空检查),返回结构化投影或可直接抛出的 fatal error(zone/split)。collectCoverage一并移入。ProcessTurnInput.applyView/NodeEffects.applyView):判定必须跑在 applyCompression 实际执行的那份消息数组类上。plugin lane(DSH native 等)processTurn 输入是 processed view(含合成分隔符,[Bug][Responses] acp_turn_sep 合成分隔符进入持久压缩覆盖集合,导致重复历史漂移误报 #2627),连 pre-prune originalMessages 都不是 apply class——本次由 host 传 mem.original;relay/proxy lane 传 compressMessages(= prepared.originalMessages)。行为变更(旧 → 新,均为有意)
测试
kernel/tests/issue3236-recommend-apply-consistency.test.ts:A 延迟结果不可达(复现原几何)— doomed 区间不再被推荐 + 手动提交仍抛同一错误(gate 完好);A2 延迟结果可达 — 自愈区间照常推荐且可折叠;B 双 burst 交错 — 同一契约 + 手动抛 "2 turns and 4 pairs";健康完整 turn — 照常推荐(不过滤);acp_status ⚠ 只出现在 doomed 行、legacy 输出不变。八问
合并判定:kernel suite + typecheck + 定向集成绿,全量回归待 CI。按 Kernel Boundary 需人工 review。