Repository navigation
fix: tier conflict evidence - read-only viewers neutral, unconfirmed signals never escalate (#2545) - #2549
Conversation
…signals never escalate (#2545)
📦 Built Package ArtifactBranch: Option A — Install this exact build (recommended)npm install -g billion-context@0.0.2730-pr.2549.86826dfThis exact version is immutable and reproducible. The rolling Option B — Download artifact
tar xzf billion-context-pr2549.tgz
npm install -g packageInstall instructions are refreshed on each push. |
…k-unused-exports (#2545) Review of #2549: isConfirmedConflictEvent (conflict-watch.ts) and ParsedPluginConflictDetail (thirdparty-scan.ts) have no cross-module consumers (tests exercise them through public behavior); the unused-exports CI gate fails on them. Make them module-private per the gate's own fix.
[bot] 🏷 Review of #2549 (fixes #2545) — full diff read line-by-line, targeted suites run locally, issue scenario reproduced end-to-end through the real code paths. Verdict: mergeable after CI goes green on the new head (I pushed one small labeled fix, see below). ① 是什么问题 ② 什么原因导致的 ③ 影响范围与严重程度 ④ 怎么修复的 ⑤ 是否有回归问题 ⑥ 是否破坏缓存:不涉及——未触碰任何缓存/重试/增量游标/去重键。 ⑦ 是否改了设计方向:无架构转向——在既有冲突台账设计上扩展显示期分类,数据流不变。 ⑧ 是否引入了新的配置:无新 env/config/CLI。仅 审查过程与证据
结论:方向正确、根因对症(疏而非堵——在分类决策点修,不是掩盖症状)、披露完整。等 a9eb0b0 的 CI 全绿后可合并(合并由人执行:https://github.com/ranxianglei/billion-context/pull/2549)。 |
📦 Merged Build PublishedThis merge to master was published as npm install -g billion-context@0.0.193-master.5246112 # this exact build
npm install -g billion-context@master # always the newest merged build
|
Closes #2545
Problem
The web UI merged two historical
[suspected]ledger records naming the read-only pluginpi-context-inspector(written by pre-#1736 keyword rules, which matched bare "context") with a singleunannounced-rewriteevent into a strong red "检测到压缩冲突…请只保留一个压缩器" warning. The banner severity counted every non-plugin ledger kind as confirmed native evidence (nativeN = events - pluginN) and every non-sibling plugin record as a foreign compressor, so 1 rewrite + 2 suspected across 3 sessions escalated to a "two compressors on one conversation" verdict — cross-session aggregates read as same-session proof.Fix — evidence tiers on every severity surface
Scanner (
src/thirdparty-scan.ts)pi-context-inspectoradded toKNOWN_DISPLAY_ONLY(verified read-only/contextoverlay: registers/context, reads context/tool info, no compression or history-rewrite API) → exempt in every spec form (bare name, npm spec with/without version, path segment) on all client lanes. New records can no longer occur; lookalike names sharing the prefix (my-pi-context-inspector-fork,pi-context-compressor) still flag.parsePluginConflictDetail()+isDisplayOnlyConflictDetail()— stock ledger details written by older versions are neutralized WITHOUT destructive ledger purges (records stay visible inacp_status/stats; the manual clear endpoint is unchanged).isSiblingConflictDetailrefactored onto the same parser (behavior unchanged).Evidence tiers (
src/conflict-watch.ts,src/web/client.ts)native-compactionlanding or a non-suspected plugin finding → only these justify the imperative "keep exactly one compressor".unannounced-rewrite+orphan-reap— observed changes whose cause is NOT identified ("history changed, cause unknown"); never presented as native auto-compaction or a second compressor.neutralOnly).displayOnlyandactiveConfirmed; a fresh unconfirmed signal cannot re-light a stale confirmed ledger as a live alarm (→ historical wording instead).formatConflictSectionladder rebuilt around meaningful vs neutral events; the header double-compression claim is printed only when confirmed/native evidence exists.Behavior changes (old → new)
unannounced-rewrite/orphan-reapno longer count as confirmed native evidence. Old: any non-plugin kind →hasConfirmed→ strong red "请只保留一个压缩器"; new: soft info-styled "unconfirmed signal" tier. The issue's exact 3-event case: strong alarm → unconfirmed diagnosis.activeConfirmed), not any active event; payloads without the field degrade to the previous behavior.acp_statusCOMPRESSION CONFLICTS: rewrite/orphan-reap-only ledgers no longer print "Keep exactly ONE compressor" (now UNCONFIRMED-signal wording); the header double-compression claim requires confirmed/native evidence (old: printed unconditionally); the sibling+signal corner loses the strong footer (the old ladder'sforeignConfirmedincluded siblings — a web报警: billion-context-pi opencode-acp不属于第三方插件,同时安装并没有冲突 #2261 inconsistency); the pure-suspected-all-historical corner gets suspected wording + clear-ledger pointer (old: generic historical wording that asserted a plugin existed).displayOnly,activeConfirmedfields.Tests (targeted suites green locally; full regression via CI)
on_unconfirmed/risk_unconfirmed(no confirmed verdict); display-only-only →neutralOnly; lone rewrite → unconfirmed (was a confirmed alarm before); stale confirmed + fresh signal →risk_historical; fresh confirmed →risk_active; old payloads degrade to pre-change tiers.formatConflictSection: display-only-only stands down neutrally; rewrite + display-only stock stays an UNCONFIRMED diagnosis; stale confirmed stock → verify-then-clear, not a live command.config surface: none (no new env/config keys;
displayOnly/activeConfirmedare additive stats payload fields only).