Skip to content

fix: exempt @openma/deepseek-harness-acp from name-only conflict scan (#2969) - #2971

Merged
ranxianglei merged 1 commit into
masterfrom
2026-10-13_acp-adapter-false-positive
Oct 13, 2026
Merged

ranxianglei merged 1 commit into
masterfrom
2026-10-13_acp-adapter-false-positive

Conversation

@ranxianglei

Copy link
Copy Markdown
Owner

Closes #2969

What

The third-party compression scanner flags @openma/deepseek-harness-acp (a dsh ACP protocol adapter) as [suspected] compressor: its -acp suffix hits the ecosystem-marker keyword acp, but in this package it names the Agent Client Protocol, not acp-kernel. The adapter is verified NOT to compress — its shipped cordis.patch.yml disables dsh's native compaction features (compaction-basic / command-compact / tool-result-pruner) — yet every scan re-records a false-positive ledger entry, and the conflict surfaces append an imperative "disable auto-compaction / route around bili / start a fresh session" fix footer even though nothing was ever confirmed.

Changes

  1. Scoped exact-name exemption (src/thirdparty-scan.ts): added @openma/deepseek-harness-acp to the verified non-compressor list (internal const renamed KNOWN_DISPLAY_ONLY → KNOWN_NON_COMPRESSORS; exported identifiers isKnownDisplayOnlyPlugin / isDisplayOnlyConflictDetail and the stats field displayOnly are unchanged). Exact-token match only — lookalikes (-fork, unscoped, other scopes) still flag.
  2. Windows path-segment matching for scoped names (src/thirdparty-scan.ts): the bounded path-segment regex treated the inner / of scoped names as literal, so path-form entries on Windows escaped the exemption. The inner separator now widens to [/\\]; no-op for unscoped entries.
  3. Stock-record neutralization: existing [suspected] records naming this package re-classify at display time automatically (isDisplayOnlyConflictDetail → displayOnly tier → neutral stand-down wording; banner hidden). No data migration.
  4. Pure [suspected] ledgers lose the imperative fix footer (src/conflict-watch.ts, src/web/client.ts): when EVERY event is a name-only match, acp_status/launcher show verify-first advice only (no Fix (<client>): disable the client's own auto-compaction … line + docs pointer), and the web banner omits the per-client hint block. Confirmed and unconfirmed-signal tiers keep remediation; mixed ledgers stay verbatim (the feat: surface identity-loss takeovers with an identity-orphan conflict event (#2791) #2802-review gate is preserved — the skip requires zero orphan/signal/confirmed events). Additive showHints field on the browser-side bili_conflictSeverity return (not an HTTP payload change).
  5. Docs: CONFIGURATION.md "Detecting other compression plugins" section updated for both the protocol-adapter exemption class and the footer change.

Behavior changes (intentional, flagged)

Surface Old New Why
dsh scan @openma/deepseek-harness-acp recorded [suspected] on every scan not recorded verified non-compressor; name collision
stock adapter records counted into suspected severity; banner alarmed neutralized (stand-down text; banner hidden) same mechanism as #2324/#2545
pure-[suspected] ledger (acp_status/launcher) appended Fix (<client>): disable the client's own auto-compaction (or route this session around bili), then start a fresh session + docs pointer verify-first advice only, no Fix footer commanding corrective action on an unverified name match (#2969)
web banner, suspected-only ledger per-client hint block always rendered hint block omitted; verify-first risk text kept same reason
neutral-only advice wording "verified read-only plugin (display-only by design)" "verified non-compressing plugin (read-only viewer/tool, or protocol adapter whose name merely collides …)" covers both evidence classes

Unchanged: wire formats, ledger record shape, keyword rules, real-compressor detection, native-compaction / history-rewrite evidence paths, config surface, stats payload fields.

Tests

  • 7 new tests in tests/issue1206-thirdparty-scan.test.ts: exemption spec-form coverage + lookalike rejection (incl. Windows paths); dsh scan (adapter alone → zero findings, real compressor still flagged); stock-record neutralization; summarizeConflicts tier counting; adapter-only ledger stand-down without footer; pure-[suspected] footer drop with signal-tier retention; native tier intact beside an adapter record.
  • 2 new tests in tests/web-conflict-banner.test.ts: showHints gating across tiers + old-payload degradation.
  • Targeted suites green (128 tests): issue1206-thirdparty-scan, web-conflict-banner, conflict-remediation, conflict-lifecycle, issue2432-breaker-awareness, issue2709-dsh-native-compaction-attribution, web-i18n, web-sessions. Typecheck + build clean.

…#2969)

- add the dsh ACP protocol adapter to the verified non-compressor list
  (its 'acp' suffix names Agent Client Protocol, not acp-kernel); exact
  token match, lookalikes still flagged; stock [suspected] records are
  neutralized at display time, no data migration
- widen the path-segment matcher so scoped names match Windows paths too
- pure [suspected] ledgers drop the imperative per-client fix footer /
  web hint block (acp_status + banner); confirmed and unconfirmed-signal
  tiers keep remediation, mixed ledgers stay verbatim (#2802 gate)
- CONFIGURATION.md scanner section updated to match
@github-actions

Copy link
Copy Markdown
Contributor

📦 Built Package Artifact

Branch: 2026-10-13_acp-adapter-false-positive (e325694)

Option A — Install this exact build (recommended)

npm install -g billion-context@0.0.3363-pr.2971.4888807

This exact version is immutable and reproducible. The rolling pr tag tracks the newest test build across all PRs.

Option B — Download artifact

  1. Download the artifact from the Actions run
  2. Extract the tarball and install:
tar xzf billion-context-pr2971.tgz
npm install -g package

Install instructions are refreshed on each push.

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[bot] 🏷

已按 PR Review 规范审完 #2971(Closes #2969)。这是 [PR] 标记的已完成工作,我按「拉分支核对代码 + 查 CI」处理,未重做。

审查过程(逐项过既有行为):

  • 方向关:[Bug] ACP 接駁套件名稱誤報 / False positive for @openma/deepseek-harness-acp in compression scanner #2969 成立——KEYWORD_RE = /\b(compress\w*|compact\w*|acp|summar\w*)\b/i(src/thirdparty-scan.ts:116)的 acp 生态标记与该协议适配器的 -acp 后缀纯名称碰撞(ACP=Agent Client Protocol);scanDsh()(src/thirdparty-scan.ts:433)先查 isKnownDisplayOnlyPlugin 再跑关键词,豁免生效路径正确。修法沿用 [bug] pi-compact-transcript 被误判为压缩插件,Overview 将疑似记录显示为压缩冲突 #2324/[Bug] Web UI 将 pi-context-inspector 历史误报与 unannounced-rewrite 合并为已确认压缩冲突 #2545 成熟模式,打的是根因不是症状。
  • 回归关(逐条判定):关键词规则未动→真压缩器检测完整;isKnownDisplayOnlyPlugin 新增 scoped 名后,lookalike(-fork/非 scoped/其他 scope)经正则回溯验证仍被标记,内 / 放宽为 [/\\] 对无 / 的既有条目(pi-compact-transcript、pi-context-inspector)是 no-op→既有行为保持;isDisplayOnlyConflictDetail 复用 isKnownDisplayOnlyPlugin(全仓 grep 确认 KNOWN_DISPLAY_ONLY 零残留,rename 完整);footer 抑制新增 pureSuspectedTier 分支——confirmed/signal/mixed tier 全保留(feat: surface identity-loss takeovers with an identity-orphan conflict event (#2791) #2802 gate 经 !meaningful.some(identity-orphan)+confirmed/signals 计数保住),neutral-only 本就 meaningful.length===0 无 footer,层级计算核对无误;web showHints 为浏览器侧新增字段(非 HTTP 载荷变更),旧 payload 降级到 showHints=true 全确认视图;stats 字段 displayOnly 保留(wire 稳定)。CONFIGURATION.md 文档同步。未发现无意回归,PR 表格里的行为变更均为有意且已披露。
  • 测试有效性:7 个扫描/冲突测试 + 2 个 banner 测试有牙——spec 形态矩阵+lookalike 拒绝、e2e dsh 扫描(带真压缩器对照)、存量记录中和、tier 计数、纯-[suspected] footer 去除且 signal-tier 保留、native-tier 共存、旧 payload 降级;断言都是具体子串/布尔值而非恒真,各面回归都能被抓到。
  • diff 整洁度:单 commit,7 文件 +174/-31,每行都与目的相关,无无关改动/空行噪声/lockfile churn。干净。

结构化八问:

  1. 是什么问题:扫描器把 dsh 协议适配器 @openma/deepseek-harness-acp 因名称含 acp 误报为疑似压缩插件;且零确认证据的纯名称 [suspected] ledger 仍被追加强制处置指令("关闭自动压缩/绕过 bili/开新会话")。
  2. 什么原因导致的:同一机制族两层——① KEYWORD_RE 的 acp 标记与该协议包纯名称碰撞且不在任何豁免内;② formatConflictSection/web banner 只要存在 meaningful 事件就无条件输出强制 per-client 脚注,与 suspected-only 已有的 verify-first advice 自相矛盾。
  3. 影响范围与严重程度:装了该适配器的所有 dsh 用户每次扫描落一条误报记录 + banner/acp_status 显示误导指令。诊断面误报+误导处置级别,无真实双压缩、无数据损坏。
  4. 怎么修复的:① 确切包名窄豁免(bare/npm spec/path 各形态含 Windows;lookalike 仍标记);② 存量 [suspected] 记录显示时经 isDisplayOnlyConflictDetail 自动中和,无需迁移;③ 纯-[suspected] ledger 去掉强制 Fix 脚注/hint block(acp_status+banner),confirmed 与 unconfirmed-signal tier 保留,mixed ledger 按 feat: surface identity-loss takeovers with an identity-orphan conflict event (#2791) #2802 gate 原样。
  5. 是否有回归问题:无。关键词规则/真压缩器检测/native-history-rewrite 证据路径/ledger 记录形状与 wire/stats 字段/旧 payload 降级全部逐项核过未破坏;PR 披露的行为变更均有意。
  6. 是否破坏缓存:不涉及。5 分钟扫描 TTL 缓存逻辑未变,前缀缓存/wire 字节零变化,ledger 去重键(entry+source)未变。
  7. 是否改了设计方向:没有。架构/边界/数据流不变;仅在既有「已验证非压缩器」证据清单按纪律加一条(内部常量更名以覆盖两类证据,导出 API 名与 stats 字段 wire 稳定)。
  8. 是否引入新配置:没有。无新 env/config/默认值。

CI:static-gates(ubuntu 22/24)+ 全部 guard 作业(kernel/pi-subagents/lane/config-surface/docs/version/build-artifact/lock-sync/unused-exports)= 全绿;全量 test(ubuntu/windows × node 22/24)仍在跑。收工判定:可合并(待 test 矩阵绿;合并由人执行)。你现有的 3 条误报记录升级后会在显示层自动中和(banner 消失),想立刻清掉可 POST /__bili/conflicts/clear。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[bot] 🏷

CI 已全绿 ✅ —— commit e325694 的 18 个 check run 全部 success:static-gates(ubuntu/windows × 22/24)+ 全量 guard(kernel/pi-subagents/lane/config-surface/docs/version/build-artifact/lock-sync/unused-exports)+ 完整 test 矩阵(ubuntu/windows × node 22/24)。

代码审查结论见上一条(八问体例,可合并)。现无任何阻塞,可合并(合并由人执行)。

@ranxianglei
ranxianglei merged commit 1f936a3 into master Oct 13, 2026
18 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

📦 Merged Build Published

This merge to master was published as 0.0.357-master.1f936a3 (rolling master tag).

npm install -g billion-context@0.0.357-master.1f936a3  # this exact build
npm install -g billion-context@master  # always the newest merged build

npm view billion-context@master prints the current version at any time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] ACP 接駁套件名稱誤報 / False positive for @openma/deepseek-harness-acp in compression scanner

1 participant