Repository navigation
[PR] fix(conflict-watch): stop recovered id-churn-adoption from lighting the conflict banner - #5787
ranxianglei wants to merge 1 commit into
Conversation
…he conflict banner #4131 added the `id-churn-adoption` ConflictKind (fold-reconcile re-mints and re-anchors ids across builds, 0 unmatched, NO compaction boundary) but only wired the recording side. Both display classifiers still treated it as an unexplained signal: - web banner severity (bili_conflictSeverity) dumped it into the residual signalN, so a pure id-churn-adoption ledger read landed=true and lit the alarm banner even though the event is fully recovered by design (#3235 policy: recovered stays quiet). - formatConflictSection framed a pure id-churn-adoption ledger as "something OUTSIDE bili touched this conversation" + "[suspected] confirm each named plugin", pointing the user at a phantom second compressor. Carve id-churn-adoption out of signalN (it joins the neutral/recovered bucket) and give formatConflictSection a dedicated churnAdoptOnly header + advice ("bili itself re-minted and fully re-anchored the ids; no second compressor, nothing to act on"). Mixed ledgers still alarm on genuine unannounced-rewrite/orphan signals. Behavior change (old -> new): a session whose only conflict evidence is a recovered id-churn-adoption event PREVIOUSLY showed the web alarm banner and the /acp panel framed it as an outside rewrite; NOW it stays quiet (banner hidden) and is framed correctly. Still recorded in acp_status/stats. Scope: this PR is deliberately limited to the id-churn-adoption variant of the recurring "Compression conflict banner" symptom. The unannounced-rewrite variant (dsh/claude native-compaction landings) is a different mechanism and still alarms by design pending separate attribution work -- untouched here. Closes #5786
📦 Built Package ArtifactBranch: Latest build — install this exact versionnpm install -g billion-context@0.0.8329-pr.5787.9cdf6edThis exact version is immutable and reproducible. The rolling Recent builds (commit → version)
Download artifact
tar xzf billion-context-pr5787.tgz
npm install -g packageInstall instructions are refreshed on each push. |
(ai: vllm-qwen/qwen3.8-27b) 查重:不重复——本线程仅此一个修复 PR(#5787),无并列第二 PR。它关闭的原始缺陷是 #5786,已核对标题与其自带诊断( 核对方式:这是 agent 已完成的工作(带 结构化八问
完整性核查(§7.5 首过不全风险):全仓 grep 测试有效性(§7.2 双向门控): CI:head 行为变更披露确认:PR body 已明确 old→new(旧:点横幅 + /acp 指幽灵压缩器;新:安静 + /acp 正确描述为自恢复跨 build 重铸),符合交付规范第 4 条。 判定:可合。 方向对(修根因——补上漏接的展示分类器,而非过滤症状)、范围干净(4 文件 +68/−3)、双向测试齐备、CI 全绿、无回归、行为变更已披露。建议 owner 直接合并 #5787。 |
(ai: vllm-qwen/qwen3.8-27b) 核验完成(GitHub PR #5791,分支 1. 是什么问题:历史块「毒块」永久杀死 T2 蒸馏合并——一个覆盖切穿回合组(伙伴仍在 span 外可见)的历史块,会让所有跨越它的合并永远硬失败,且两条建议出路(对齐整回合 / 少合几个)对历史块边界都不可执行。 2. 什么原因导致的:根因在 kernel 共享投影判定( 3. 影响范围与严重程度:长会话中存在历史 mid-turn 块的插件车道(dsh threads 模型等宿主)——受影响会话的蒸馏合并整体停摆,上下文只增不缩,核心压缩能力对该类会话不可用。触发条件明确(历史块覆盖切穿回合 + 伙伴在 span 外),非全量用户面。 4. 怎么修复的:三级阶梯,全在 5. 是否有回归问题:审过 diff 触碰的既有行为——turn-integrity 门禁语义(对中性冲突变软,有意变更已披露)、空 span fatal 由 zone 改 split(zone fatal 在 #4521 下本就是 no-op 成功,现改为可行动 split,已披露)、拒绝文案措辞(关键短语保留,#4484 套件通过验证)、覆盖不变量「合并永不丢既有覆盖」(演进版 #4484 套件 + 新套件 post⊆pre 断言双重钉住)。无 fail-fast 变吞错:真冲突照旧拒绝。核验中发现一处未披露的行为变更并已补进 PR 正文:毒块自引用区间(b4..b4)master 上硬失败 → 本 PR 变为幂等 no-op(「folded nothing」警告、状态不动)——同属 refuse→recover 家族,已在 Behavior changes 节补一行。另修了一处测试注释与事实不符(称自引用是「master 既有 no-op 行为、零宽 span」,实测 master 硬失败且 span 嵌套自身)——独立 commit 6. 是否破坏缓存:不涉及——无 wire/cache/persistence 变更;被排除块保持 active、覆盖集不变;消息 ref/id 空间未触碰。 7. 是否改了设计方向:无转向——扩展既有共享单元投影设计(#3236),新增字段 8. 是否引入新配置:无——无 config/env/CLI 新增(diff 核实)。 证据:
判定:代码正确、测试有牙、披露完整,未发现拦下项。Kernel 变更按边界规则需人工评审——等 owner 评审后自行合并(我不合并)。CI 全分片转绿即无任何遗留。 |
(ai: vllm-qwen/qwen3.8-27b)
|
Problem
A session whose ONLY conflict evidence is a recovered
id-churn-adoptionevent was lighting the web compression-conflict alarm banner and being framed in the/acppanel as an outside rewrite / phantom second compressor.Root cause
#4131 introduced the
id-churn-adoptionConflictKind (fold-reconcile re-mints and fully re-anchors ids across builds — 0 unmatched, and it marks NO compaction boundary) but wired only the recording side (prepare-anthropic.ts/prepare-google.ts/prepare-openai.ts). The two display classifiers were never updated, so a pure id-churn-adoption ledger fell into the generic unexplained-signal path:bili_conflictSeverity(src/web/client.ts):signalN = events − plugin − confirmedNative − handledNativedumped id-churn-adoption into the residual →signalN=1→landed=true→ the banner gate fired.formatConflictSection(src/conflict-watch.ts): a pure id-churn ledger hit thesignals.length===0branch → header "something OUTSIDE bili touched this conversation" + "[suspected] confirm each named plugin".Both contradict the #3235 banner policy ("only landed-unrecovered evidence alarms — recovered stays quiet") and misattribute a bili-owned, self-recovered event to an external actor.
Fix
id-churn-adoptionout ofsignalNinbili_conflictSeverity; it now joins the neutral/recovered bucket. A pure ledger readssignalN=0,landed=false,neutralOnly=true(banner hidden); mixed ledgers still alarm on genuine unannounced-rewrite/orphan signals.formatConflictSectiona dedicatedchurnAdoptOnlyheader + advice: "bili itself re-minted and fully re-anchored the ids across builds ([Bug][opencode lane] Cross-version restart replays the whole session: old v0.1.197 and new v0.1.202 write the same sessions dir, 212 folded refs re-anchor onto churned bytes and the ref map is pruned to 392 raw ids #4131/The intermediate message (core) is not protocol-agnostic: switching protocols/models causes identity churn; cross-protoc | 中间消息(core)没有做到协议无关:切协议/切模型制造身份 churn,补齐跨协议映射 #3642) — no second compressor, no auto-compaction to disable, nothing to act on."Behavior change (old → new)
For a session whose only conflict evidence is a recovered
id-churn-adoptionevent:/acpframed it as an outside rewrite pointing at a phantom compressor./acpframes it correctly as a self-recovered cross-build re-mint.Still recorded in
acp_status/stats (recorded-but-quiet tier). Rationale: the event is recovered by design (no compaction boundary, 0 unmatched), and (bug)压缩冲突 #3235 says recovered evidence stays quiet.Config surface
None — no new env/config/default value.
Tests
tests/web-conflict-banner.test.ts: pure id-churn-adoption →landed=false, signalN=0, neutralOnly=true; mixed (id-churn + unannounced-rewrite) →signalN=1, landed=true, conflict.on_unconfirmed.tests/conflict-lifecycle.test.ts: pure id-churn → correct header/advice and NOT the outside-rewrite / suspected / keep-one-compressor / auto-compaction wording; mixed → keeps the UNCONFIRMED tier and does not leak the pure-case advice.Targeted suite green (37/37 incl. 4 new); typecheck clean; full build green.
Scope note
Deliberately limited to the
id-churn-adoptionvariant of the recurring "Compression conflict banner" symptom. Theunannounced-rewritevariant (dsh/claude native-compaction landings) is a different mechanism and still alarms by design pending separate attribution work — untouched here.Closes #5786