Skip to content

[PR] thirdparty-scan: flag dsh-live-compact as a known conflict (#5984) - #6166

Merged
ranxianglei merged 1 commit into
masterfrom
2026-11-11_dsh-live-compact-known-conflict
Nov 11, 2026
Merged

ranxianglei merged 1 commit into
masterfrom
2026-11-11_dsh-live-compact-known-conflict

Conversation

@ranxianglei

Copy link
Copy Markdown
Owner

#5984 showed a dsh session whose compression substrate was destroyed by a compaction checkpoint landing outside bili's knowledge. Source-level analysis (issue comment) identified the actor: the third-party plugin dsh-live-compact (Tranquillitatis-Lab), which takes over dsh's stock compaction engine:

Before this PR the conflict scan (#1206) only flagged the plugin at the keyword tier (compact token → [suspected], "verify first"), which does not raise the imperative keep-one-compressor alarm.

What

  1. src/thirdparty-scan.ts — scanDsh now matches dsh-live-compact (bare name / npm spec / bounded path segment, new isDshLiveCompactEntry mirroring isOpencodeAcpEntry's discipline) and reports it as a deterministic known conflict (knownId: "dsh-live-compact"). Lookalikes (e.g. dsh-live-compact-viewer) stay at most keyword-suspected.
  2. announcements/remote.json — web notice (Unified Announcement Panel Design (Approved): Built-in declarations + local JSON + remote GitHub raw — a single renderer | 公告面统一设计(已批准):内置声明 + 本地 JSON + 远程 GitHub raw,三来源一套渲染器 #5548) for dsh profiles with the plugin: what it is, why it conflicts, the removal recipe (dsh plugin remove dsh-live-compact), CTA to [Bug][compress] After rebase, the ref reported by acp_status/nudge is inconsistent with the ledger used by compress for | [Bug][compress] rebase 后 acp_status/nudge 报的 ref 与 compress 校验用的台账不一致:提示的区间必然 unknown,连续三次即熔断 #5984. Dismissible (persistent).
  3. docs/configuration.md + docs/configuration.zh-CN.md — known-conflicts list updated (BILI_CONFLICT_SCAN row + 自动识别其他压缩插件存在并在任何可能的情况下报告警告 #1206 section), mechanism in one sentence, EN/ZH in sync.
  4. tests/issue1206-thirdparty-scan.test.ts — 3 new tests (known bare, known versioned spec, lookalike stays keyword) + detail-shape assertions (parses back, no [suspected] tag, not sibling, not display-only) + isDesignBenign === false.

Why the "known" tier

A known (non-suspected) finding is exactly what the conflict banner treats as a "confirmed third-party compressor" → the imperative keep-one-compressor warning surfaces in the web UI, acp_status's COMPRESSION CONFLICTS section, GET /__bili/stats → conflicts, and the launcher pre-launch stderr line. No behavior change for any other entry.

Verification

  • npm run typecheck — clean
  • tests/issue1206-thirdparty-scan.test.ts — 49/49 (46 + 3 new)
  • combined run of issue1206 + issue2861-host-plugin-notice + web-conflict-banner + remote-announcements + local-announcements — 118/118
  • node --import tsx scripts/validate-remote-announcements.ts (the CI announcements-lint gate) — OK, 1 entry valid

Notes

  • The scan stays read-only; nothing is auto-removed. dsh-live-compact is fine for users who want it — the point is that bili's compaction and the plugin's compaction cannot coexist, so affected profiles get a clear, dismissible warning instead of a silent substrate loss.
  • Remote notices have no per-profile scope, so the notice reaches every user's web UI; the DSH-prefixed title makes it clear who it affects, and it is dismissible.

dsh-live-compact is a competing compaction engine that takes over dsh's
stock compaction row (its bundled cordis.patch.yml disables
compaction-basic and registers its own engine row; its preset takeover
renames the preset's compaction row to itself), so bili's load-time
compaction-disable overlay (#3354), which recognizes only the stock row
names, is structurally blind to it. Its checkpoints can land outside
bili's knowledge and destroy the compression substrate - the #5984
session.

- scanDsh: dsh-live-compact entries (bare name / npm spec / bounded path
  segment, isDshLiveCompactEntry mirroring isOpencodeAcpEntry's
  discipline) are now a deterministic "known" finding (knownId
  "dsh-live-compact") instead of a keyword [suspected] one, so the
  conflict ledger / acp_status / web banner surface it as a confirmed
  conflict; lookalikes stay at most keyword-suspected
- announcements/remote.json: web notice (#5548) for dsh profiles with
  the plugin, with the removal recipe (dsh plugin remove
  dsh-live-compact) and a CTA to #5984
- docs: known-conflicts list updated (configuration.md / zh-CN)
- tests: 3 new cases + detail-shape / not-benign / not-sibling /
  not-display-only assertions
@github-actions

Copy link
Copy Markdown
Contributor

📦 Built Package Artifact

Branch: 2026-11-11_dsh-live-compact-known-conflict (403c275)

Latest build — install this exact version

npm install -g billion-context@0.0.9044-pr.6166.c4a377d

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

Recent builds (commit → version)

commit version build
403c275 billion-context@0.0.9044-pr.6166.c4a377d build

Download artifact

  1. Download the artifact from the Actions run
  2. Extract the tarball and install:
tar xzf billion-context-pr6166.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

(ai: vllm-qwen/qwen3.8-27b)

查重: not a duplicate — this thread is the single fix PR for the #5984 detection gap (GitHub #6166, branch 2026-11-11_dsh-live-compact-known-conflict @ 403c275). Open [PR] rows matching the topic: only this one (#5483 "writer conflicts" is a different subject). One-fix-one-PR holds; no parallel second PR.

Live status (checked against the pushed head 403c275, just now): CI fully green — 30 checks, 0 failed / 0 pending. All 11 test shards + static-gates(×2) + mysql-contract + docs-sync + lane-guard + docs-coverage + architecture-docs = success; the e2e lanes are skipped by their file-trigger rules (this PR touches none of their trigger sets). mergeable_state=blocked = awaiting human review/merge (branch protection), not a CI failure.

I reviewed the code and mechanism independently (did not re-run locally — deps aren't installed here and CI already ran the full suite green on this same sha; re-running would only burn shared fleet resources for no new signal):

  • isDshLiveCompactEntry mirrors isOpencodeAcpEntry's bounded-segment discipline verbatim; lookalike dsh-live-compact-viewer correctly falls back to keyword (the char after the stem is -, not / or EOL).
  • KEYWORD_RE contains compact, so pre-PR the plugin landed at the soft [suspected] tier — the PR's "before" claim is accurate.
  • In scanDsh the known-check sits before display-only/keyword with a continue; precedence matches every other client's known-before-keyword pattern, and the dedup key prevents a duplicate keyword finding.
  • No new banner logic needed: isConfirmedConflictEvent (src/conflict-watch.ts:168) already returns true for a non-neutral, non-suspected third-party-plugin finding → the imperative keep-one-compressor alarm. opencode-acp already rides this path; dsh-live-compact just reuses it. isDesignBenign correctly returns false (it's a live competing compressor, not a sibling).
  • Remote notice uses the A source (Unified Announcement Panel Design (Approved): Built-in declarations + local JSON + remote GitHub raw — a single renderer | 公告面统一设计(已批准):内置声明 + 本地 JSON + 远程 GitHub raw,三来源一套渲染器 #5548), validated by the same client-side parseRemoteDoc, desc+CTA present so it renders; docs EN/ZH are in sync.

Tests have teeth: assert match==="known" + knownId, isDesignBenign===false, detail round-trips with suspected===false, not-sibling, not-display-only, the versioned-spec case, and the lookalike negative case with direct predicate assertions.


结构化八问

  1. 是什么问题:dsh profile 装了第三方插件 dsh-live-compact(顶替 dsh stock 压缩引擎),bili 的加载期压缩禁用 overlay(See how to integrate the plugin that automatically disables dsh compression. | 自动关闭 dsh 压缩的插件看如何集成 #3354)只认 stock 行名、对它结构上不可见,于是它的 LLM 摘要 checkpoint 落在 bili 知识之外、摧毁压缩基底([Bug][compress] After rebase, the ref reported by acp_status/nudge is inconsistent with the ledger used by compress for | [Bug][compress] rebase 后 acp_status/nudge 报的 ref 与 compress 校验用的台账不一致:提示的区间必然 unknown,连续三次即熔断 #5984)。改前冲突扫描只靠 compact 关键词命中、把它归到 [suspected] 软层,不触发强制"只留一个压缩器"告警。本质是一个检测盲区。
  2. 什么原因导致的:因果分层——表层症状=substrate 被毁;直接因=两个压缩器并存且 bili 看不见对方的引擎行;检测层根因=扫描判定表里没有这个插件的确定性条目,只能落到 suspected 软层。修的是"缺 deterministic 条目"这个产生误分层的源头,不是在下游过滤。
  3. 影响范围与严重程度:触发面明确——仅"dsh profile 且装了 dsh-live-compact"的用户;对该面属 p1(压缩基底被毁=会话不可用/数据破坏类)。本 PR 自身只新增一种检测 + 一条可关闭 web 通知,不改任何其它 entry 的行为。
  4. 怎么修复的:给 dsh-live-compact 加一个 deterministic known 条目(镜像 isOpencodeAcpEntry 纪律),让它进入"confirmed third-party compressor"档,复用既有的强制 keep-one-compressor 出口(横幅/台账/__bili/stats/launcher stderr),不新造展示逻辑;配套一条可关闭 web 通知 + EN/ZH 文档。疏而非堵。
  5. 是否有回归问题:审过既有行为——scanDsh 其它 entry 分类不变(billion-context 跳过 / display-only / keyword 原样),dsh-live-compact 从 keyword→known 是唯一行为变化(即目标);conflict-watch.ts 横幅/台账逻辑本 PR 未动;remote.json 空数组→1 条(纯新增、可关闭);docs 纯文本同步。高危模式逐项:无语义漂移、无 fail-fast 变吞错、无阈值/时序/输出格式漂移、无缓存/重试策略变化。无回归。
  6. 是否破坏缓存:不涉及。扫描只读、5 分钟缓存逻辑未动;通知走独立 notice 循环(Unified Announcement Panel Design (Approved): Built-in declarations + local JSON + remote GitHub raw — a single renderer | 公告面统一设计(已批准):内置声明 + 本地 JSON + 远程 GitHub raw,三来源一套渲染器 #5548),不碰 prefix cache / 重试 / 增量游标 / 去重键。
  7. 是否改了设计方向:不改架构/边界/数据流。唯一产品决策点:A 源远程通知无 per-profile scope,会推到每个用户 web UI(DSH 前缀标题 + 可关闭)——这是 PR 已声明并接受的取舍,符合 KDD release v0.1.5 #16;精确到受影响 profile 的强制告警其实已由 conflict ledger 横幅承担。
  8. 是否引入了新的配置:不涉及。BILI_CONFLICT_SCAN 为既有键,本 PR 仅在其文档下补一句说明,无新 env/config/默认值。

结论:代码正确、完整、测试有牙、CI 在同一 sha 全绿、无回归、one-fix-one-PR 成立。建议合入。auto-merge 不适用(跨 scan+notice+docs 且带用户可见通知,属产品决策档)→ 走人工 review/merge,与当前 blocked 状态一致。无需改动。

@ranxianglei
ranxianglei merged commit e3220ad into master Nov 11, 2026
49 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

📦 Merged Build Published

This merge to master was published as 0.0.1172-master.e3220ad (rolling master tag).

npm install -g billion-context@0.0.1172-master.e3220ad  # 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.

ranxianglei pushed a commit to john08281/billion-context that referenced this pull request Nov 12, 2026
… round 9)

Master advanced 33104b1 -> c26c31a (ranxianglei#6260, ranxianglei#5441, ranxianglei#6186, ranxianglei#5774,
ranxianglei#6166 et al.). Clean auto-merge, no conflicts: the new window's
blockOps work (ranxianglei#5765/ranxianglei#6166) and this PR's decide-lane keys land in
different regions of every shared file.

Also completes the round-8 docs regeneration that was left unstaged:
the committed head carried the decide-lane keys in the compress.yaml
seed but not in the generated output. Re-ran
node tools/gen-config-docs.mjs generate on the merged seed (341
entries; i18n ok: 256 keys, EN/ZH equal) — generated output now
matches the seed in docs/configuration[.zh-CN].md, website/main.js
and website/docs/index.html (blockOps + decide-lane keys, both
languages).

Verified: tsc --noEmit clean; unused-exports gate clean; targeted
suites green (nudge-decide + issue3004 selfheal + config-surface-guard
+ nudge-model-decided e2e). Full-suite verdict = remote CI.
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.

1 participant