Skip to content

feat: detect co-resident third-party compression plugins and warn (#1206) - #1212

Merged
ranxianglei merged 2 commits into
masterfrom
2026-09-24_thirdparty-compression-detection
Sep 26, 2026
Merged

ranxianglei merged 2 commits into
masterfrom
2026-09-24_thirdparty-compression-detection

Conversation

@ranxianglei

Copy link
Copy Markdown
Owner

What

Issue #1206 asked for automatic detection of other compression plugins coexisting with bili and warning about them — two compressors on one conversation double-compress and corrupt message refs (消息错乱). Per the issue thread's clarification, the focus is third-party compression plugins installed on the client.

New modules

  • src/thirdparty-scan.ts — best-effort, read-only, 5-minute-cached scan of each client's plugin registry:
    • opencode: global + project config plugin arrays (bare / npm: / versioned / path / object forms)
    • pi: global + project .pi/settings.json packages
    • omp: ~/.omp/agent/config.yml extensions block
    • claude: settings enabledPlugins/plugins keys + ~/.claude/plugins/ dir
    • kimi: $KIMI_CODE_HOME/plugins/installed.json (dir-listing fallback)
    • hermes: ~/.hermes/plugins/ dirs (+ plugin.yaml when present)
    • dsh: profile package.json dependencies
      Two finding tiers: known conflicts (opencode-acp, legacy billion-context-pi) and keyword-suspected entries (compress* / compact* / acp / summar* / context*; full-word matching so context7 does not false-positive; bili's own entries always skipped). Also exports sniffScanClient(headers) so a standalone proxy identifies the client from wire headers (claude session id, opencode session headers; codex UA recognized but yields no scannable registry).
  • src/conflict-watch.ts — per-session conflict ledger (session.metadata.conflictEvents, capped at 20): kinds third-party-plugin / unannounced-rewrite / orphan-reap (+ reserved native-compaction), plus formatConflictSection for acp_status and summarizeConflicts for the stats endpoint.

Where findings surface

  1. Launcher start: runLaunch scans the launched client's registry before spawn and prints each finding to stderr (user sees it immediately in the terminal).
  2. Proxy, first request per session: client identified from x-bili-plugin (plugin mode) or wire-header sniffing (wire mode); findings recorded into the session ledger + one-time warn log with actionable guidance.
  3. Runtime evidence feeds the same ledger: unannounced history rewrites (模型切换后压缩块跨模型失配,新模型收到 61.3 万 token 全量上下文 #1001 detection sites) and orphan-gc deactivations (previously completely silent — the reap return value was discarded at all four call sites) are now logged with guidance and recorded.
  4. Surfaces: acp_status gains a COMPRESSION CONFLICTS section (last 10 events + guidance); GET /__bili/stats gains a conflicts aggregate; web UI shows a banner with counts/kinds.

Design notes

Behavior changes (flagged per policy)

Tests

  • New tests/issue1206-thirdparty-scan.test.ts (16 tests): one fixture home per client via env overrides (hermetic — no real-home leakage), known-conflict vs keyword tiers, self/context7 skipping, all entry forms, cache TTL + invalidation, header sniffing, opt-out flag, ledger cap/ordering, formatConflictSection and summarizeConflicts output.

Pre-flight

  • npm run typecheck ✅
  • npm test ✅ (2367 pass / 0 fail / 2 skipped e2e-gated)
  • npm run build ✅

Closes #1206

@github-actions

github-actions Bot commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

📦 Built Package Artifact

Branch: 2026-09-24_thirdparty-compression-detection (24fd6e7)

Option A — Install from npm PR tag (recommended)

npm install -g billion-context@pr-1212

Each push to this PR publishes a new version under the pr-1212 npm tag.

Option B — Download artifact

  1. Download the artifact from the Actions run
  2. Extract the tarball and install:
tar xzf billion-context-pr1212.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 规范审查 #1212:先审原 issue #1206 方向 → 回归清点 → 代码/测试有效性 → diff 整洁度,并核对 CI。稍后给完整结论。

@ranxianglei
ranxianglei force-pushed the 2026-09-24_thirdparty-compression-detection branch from 6ba09bd to f98941c Compare September 23, 2026 18:24
@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[bot] 🏷 Review complete — verified against current master, can merge.

① Issue direction (#1206): PASS. Matches dog's original ask ("必须报告日志也要打印…让用户知道冲突后可能导致消息错乱") and the floor-4 clarification (focus = third-party compression plugins on the client). Implements exactly the floor-6 adjusted plan: per-client registry scan, two-tier detection (known vs keyword-suspected), findings surfaced at launch time AND during session lifetime via the conflict ledger. Not a duplicate (searched open+closed).

② Stale base fixed. The PR was ~25 commits behind master (incl. release v0.1.140/v0.1.141, #1158 fetch-guard, #1192 plugin-manifest tools, wangbl1010's claude-watchdog PRs). Rebased onto current master aae4de1c — clean, zero conflicts — and force-updated the PR head: 6ba09bdf → f98941c3. CI will re-run on the rebased head.

Pre-flight on rebased head f98941c3:

  • npm run typecheck ✅ · npm run build ✅
  • npm test: 2393 pass / 3 fail / 2 skipped. All 3 failures are in tests/claude-native.test.ts (master's claude-watchdog work, untouched by this PR) — verified pre-existing: identical 3 failures on pure origin/master in a clean worktree (live-ps-walk e2e tests are environment-sensitive in this sandbox). Unrelated to this change.
  • New tests/issue1206-thirdparty-scan.test.ts: 16/16 pass.

③ Regression review — existing behaviors on touched paths:

Path Existing behavior Verdict
server.ts first-request block runs only when session.stats.requests === 0 (increments happen later in prepare* at src/server.ts:2385+); try/catch'd; never touches request/response bytes preserved
4× reapOrphanBlocks call sites same function, same args via reapOrphansLogged; only adds warn-log + ledger record when reaped > 0 semantics preserved; new warn where previously silent — intentional, disclosed
#1001 unannounced-rewrite sites existing warn text byte-identical, ledger record added alongside preserved
/__bili/stats, /__bili/status sessions/blindTunnels/existing fields unchanged; conflicts additive only preserved
acp_status output section appended only when events exist; byte-identical otherwise preserved
runLaunch scan gated by env + try/catch before loadClientConfig; spawn/config logic untouched preserved
web UI banner div hidden by default; loadStatus guards element existence and missing conflicts field (old responses degrade safely) preserved
persistence conflictEvents lives in session.metadata (open bag, like pluginAgent); conflictEventsOf defensively validates shape, old files without the key → [] compatible

No changes to config schema, persistence version, wire protocol, acp-kernel pin, src/update.ts, or session identity.

④ Code review notes:

  • scanClaude self-skip asymmetry — investigated, harmless. KEYWORD_RE's \bcontext\b does match the string "billion-context", and unlike every other scanner, scanClaude has no self-skip. Verified against the installer (src/plugin-install.ts:429-437 managed settings block, :709-710 .claude.json mcpServers, :453-457 commands dir): bili's official claude lane writes nowhere that scanClaude reads (no enabledPlugins/plugins key, no ~/.claude/plugins/ dir), so no false positive from bili itself. A "billion-context" entry actually found there would mean a hand-installed second copy — correctly flagged. No change needed.
  • pi/omp registry keys cross-checked against installers: ~/.pi/agent/settings.json packages ✓, top-level extensions: block in ~/.omp/agent/config.yml ✓ (same parser shape as the installer's own writer at src/plugin-install.ts:350-374).
  • isLegacyBcpEntry intentionally duplicates agent/pi-native.ts (Coexistence: billion-context-pi and the native billion-context pi entry both active = silent double compression #939) with a keep-in-sync comment — documented rationale (avoids running pi-native's bootstrap gate in the proxy process). OK.
  • Minor accepted limitations: scan cache key omits env (fine — single process.env in production); project-local config walks use the proxy's cwd in wire mode (best-effort; global registries are the primary source). Both consistent with the module's declared best-effort contract.

⑤ Test validity: 16 tests, all with teeth — both tiers, all entry forms (bare/npm:/versioned/path/object), self + context7 negatives, cache TTL + invalidation, header sniffing incl. codex negative, opt-out values, ledger cap/ordering (oldest dropped first), formatConflictSection overflow pointer, summarizeConflicts aggregation. Hermetic fixture homes via env overrides — no real-home leakage. Gap noted: no end-to-end test of the server first-request wiring (module-level coverage + thin glue is consistent with repo convention).

⑥ Diff cleanliness: 11 files, +812/-9, every line tied to #1206. No whitespace churn, no generated/lock-file drift. Clean.

Behavior changes (confirming author's flag): purely additive diagnostics — new warn logs/stderr lines appear only when another compressor is actually detected or interference observed; no existing log text, threshold, default, or wire behavior changed. Only deliberate delta: orphan-gc deactivations now emit a warn (were silent) — intended detection signal, disclosed.

Auto-merge gate: not eligible (feat, new capability surface — must stay human-merged). Everything else green.

中文摘要:审查了第三方压缩插件共存检测功能(#1206),方向与需求一致、rebase 到最新 master 后 typecheck/build/测试全部通过(3 个失败为 master 上已存在的环境相关 claude e2e,与本 PR 无关),代码与回归审查无问题——可以合并。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · 独立复审(第二双眼睛)

结论:需小改后合并。 核心设计成立(只读/尽力而为/5min 缓存/逃生开关/hermetic 测试/台账走既有 metadata 通道),无架构或数据安全问题。逐项:

❌ 阻塞:rebase 到当前 master

分支现落后 master 66 提交,试验性合并已在 src/server.ts(热文件)产生内容冲突。按 §7.2 重定基后重跑 typecheck + 全量测试 + build。

⚠️ 需要改的四处

  1. keyword 级告警措辞:server.ts:1705-1707 / launcher.ts:2934 对启发式命中(疑似)与 known(确定性)打同一条 "will double-compress and corrupt message refs"。疑似级必须明确 possible(如 context-fetcher/my-acp-helper 这类名字按设计命中 context/acp 词,但不是事实断言)。
  2. opencode v1: keep opencode-acp legacy sessions working after switching to bili #920 absorbed 条目不应进冲突台账:server.ts:1703 把 by-design 吸收的 opencode-acp 记入台账 → acp_status 顶栏 "COMPRESSION CONFLICTS"、web 横幅建议用户删掉它——与 launcher 侧 note 的立场(launcher.ts:2930-2933 正确降级)自相矛盾。应 info 级或跳过。
  3. hermes 收窄匹配:thirdparty-scan.ts:291-293 对 plugin.yaml 全文做关键词匹配,任何描述里出现 "context"/"summarize" 即命中——收窄为仅名称。
  4. 同步性注释漂移:thirdparty-scan.ts:88-90 声称与 pi-native.ts:46 "Same predicate",但两实现文本不同(npm: 前缀/路径正则)。统一成一个共享函数或修正注释。

🧹 顺手

  • thirdparty-scan.ts:24 resolveDshHome 导入未使用(死代码)
  • omp 手写 YAML 解析的行内 extensions: [a, b] 漏检——best-effort 可接受,加注释声明局限即可
  • 测试缺口:opencode v1: keep opencode-acp legacy sessions working after switching to bili #920 豁免分支、hermes yaml 匹配无测试;opencode 项目向上遍历会越出 fixture 根(无 .git 时走到 /),空结果测试在 runner /tmp 恰有 opencode 配置时可能偶发

已核实无问题的

  • 请求路径:扫描在每会话首请求同步执行(有界,5min TTL,BILI_CONFLICT_SCAN=0 逃生口),启动不阻塞 listen,失败静默降级——可接受
  • context7 豁免(\bcontext\b 全词)✓;路径解析(opencode/pi/claude/kimi/dsh)✓,omp 有上述已知局限
  • 规范:新 server 模块零 console.*,无 as any/@ts-ignore,typecheck ✓
  • 测试 hermetic ✓,两级判定/豁免/缓存 TTL/台账环形上限均有覆盖(16/16 过)
  • web/UI 纯展示层,zh/en 同步,CONFIGURATION.md 双语补文档 ✓

另按 §7.4:feat + 触碰 server.ts 热路径 → 人工合并(本评论即人工评审)。处理完 1-4 项 + rebase 后 ping 我复核。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[bot] 🏷 收到独立复审,四条必改项 + 顺手项全部认领:

  1. keyword 级告警措辞改为 possible(与 known 确定性断言区分)——server warn + launcher stderr 两处。
  2. opencode v1: keep opencode-acp legacy sessions working after switching to bili #920 absorbed 条目不再记入冲突台账(by-design 吸收 ≠ 冲突,消除与 launcher note 的立场矛盾)。
  3. hermes 收窄为仅按插件目录名匹配(不再读 plugin.yaml 全文)。
  4. isLegacyBcpEntry 统一为共享函数(或至少修正注释漂移)。

顺手项一并处理:删未使用的 resolveDshHome 导入、omp 行内 flow-style 局限加注释、补 #920 豁免分支 + hermes 名称匹配的测试、opencode 项目向上遍历在无 .git 时越界到 / 的问题(限定到 cwd)+ 空结果测试 hermetic 化。

master 已前进到 c96d91f7(#1253 claude-native-e2e-gate 等 71 个提交),rebase 到最新后重跑 typecheck + 全量测试 + build,完成后 ping 你复核。

ranxianglei pushed a commit that referenced this pull request Sep 24, 2026
…ut of ledger, hermes name-only, shared isLegacyBcpEntry

- keyword-tier findings now warn 'IF it also compresses context' instead of
  asserting double-compression (server warn + launcher stderr); ledger detail
  gains a [suspected] suffix for keyword matches
- #920 design-absorbed opencode-acp entries no longer enter the conflict
  ledger (isDesignAbsorbed: known opencode-acp under bili's own opencode
  mode) — acp_status/web banner can no longer advise removing a plugin
  bili deliberately absorbs
- hermes scan matches plugin dir names only; plugin.yaml full-text haystack
  removed (descriptions mentioning context/summarize were false positives)
- isLegacyBcpEntry unified into src/agent/native-bootstrap.ts as the single
  canonical predicate (union of both prior implementations); pi-native and
  thirdparty-scan import it — comment drift resolved by construction
- opencode project walk bounded by the .git root (was: climbed to fs root);
  omp inline-flow extensions limitation documented; unused resolveDshHome
  import dropped
- tests: +4 (git-root bounding, no-anchor cwd-only walk env-aware, #920
  exemption matrix, hermes yaml negative fixture)
@ranxianglei
ranxianglei force-pushed the 2026-09-24_thirdparty-compression-detection branch from f98941c to d0efcd9 Compare September 24, 2026 10:08
ranxianglei pushed a commit that referenced this pull request Sep 24, 2026
…ut of ledger, hermes name-only, shared isLegacyBcpEntry

- keyword-tier findings now warn 'IF it also compresses context' instead of
  asserting double-compression (server warn + launcher stderr); ledger detail
  gains a [suspected] suffix for keyword matches
- #920 design-absorbed opencode-acp entries no longer enter the conflict
  ledger (isDesignAbsorbed: known opencode-acp under bili's own opencode
  mode) — acp_status/web banner can no longer advise removing a plugin
  bili deliberately absorbs
- hermes scan matches plugin dir names only; plugin.yaml full-text haystack
  removed (descriptions mentioning context/summarize were false positives)
- isLegacyBcpEntry unified into src/agent/native-bootstrap.ts as the single
  canonical predicate (union of both prior implementations); pi-native and
  thirdparty-scan import it — comment drift resolved by construction
- opencode project walk bounded by the .git root (was: climbed to fs root);
  omp inline-flow extensions limitation documented; unused resolveDshHome
  import dropped
- tests: +4 (git-root bounding, no-anchor cwd-only walk env-aware, #920
  exemption matrix, hermes yaml negative fixture)
@ranxianglei
ranxianglei force-pushed the 2026-09-24_thirdparty-compression-detection branch from d0efcd9 to 32b7ae6 Compare September 24, 2026 10:12
@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

复审四项 + 顺手项已全部处理完毕,分支已 rebase 到当前 master(8e5eb582,含 #1257),请复核。新 head:32b7ae66(feat ce518aab + fix 32b7ae66,线性两提交)。

四项必改

① keyword 级告警措辞 — server warn 与 launcher stderr 现在按 tier 分两种措辞:known 保留确定性断言("it is bili's sibling compressor — …will double-compress…");keyword 改为条件式 "its name matches compression keywords — IF it also compresses context, the two compressors will double-compress…"。台账 detail 对 keyword 命中追加 [suspected] 后缀,与 known 区分。

② #920 absorbed 条目不进台账 — 新增导出谓词 isDesignAbsorbed(finding, pluginAgent)(仅 opencode-acp + known tier + pluginAgent==="opencode"),server 侧冲突循环对其直接 continue:不记台账、不 warn(保持原 info 日志)。acp_status 的 COMPRESSION CONFLICTS 段与 web 横幅从此不会再建议用户删掉一个 bili 刻意吸收的插件;wire 模式(pluginAgent 未绑定)下同一插件仍正常告警。launcher 侧原本就降级为 note,未动。

③ hermes 收窄为目录名匹配 — 删除 plugin.yaml 全文 haystack,只匹配 ~/.hermes/plugins/ 下的目录名(仍跳过 billion-context)。描述里出现 context/summarize 的插件不再误报。

④ isLegacyBcpEntry 统一 — 选"共享函数"而非修注释:规范实现移入 src/agent/native-bootstrap.ts(该文件是既有的无副作用共享管道,pi-native.ts 本身有模块级 bootstrap 副作用、不能被 proxy 模块 import)。语义取两实现的并集(bare / npm: / versioned bare @x.y.z / 路径任意段),逐条核对过 tests/pi-native.test.ts:87-109 的全部用例——旧 pi-native 能识别的形式一个不少,scan 侧新增的 versioned-bare 也保留。pi-native.ts 改为 re-export(测试 import 路径不变),thirdparty-scan.ts 删掉本地副本改 import。注释漂移随副本消失而消除。

顺手项

  • resolveDshHome 死导入已删(grep 确认无使用)。
  • omp YAML 解析处加局限注释:只解析 block-style,inline flow extensions: [a, b] 不解析(best-effort by design,写入方产出 block style)。
  • opencode 项目向上遍历:有 .git 锚点时扫到含根为止(修复过程中发现首版 break 条件会漏掉仓库根那一层——根目录的 opencode.json 恰恰是最常见位置,已修正并钉住测试);无锚点时只扫 cwd,不再爬到 fs 根。
  • 新增 4 个测试:git-root 边界(根上 decoy 不可见)、无锚点 cwd-only($TMPDIR 自身可能在 git worktree 里——断言对环境自适应,两个环境都确定)、opencode v1: keep opencode-acp legacy sessions working after switching to bili #920 豁免矩阵(4 组合)、hermes yaml 负例 fixture(描述含 summarizes/context 不触发)。

Pre-flight(head 32b7ae66,rebase 后重跑)

  • npm run typecheck ✅
  • npm test ✅ 2520 tests / 2511 pass / 0 fail / 9 skipped(e2e/env gated)
  • npm run build ✅
  • GitHub: mergeable=true(无冲突),mergeable_state=blocked 仅为 CI 在跑

行为变更说明(相对本 PR 上一版,尚未发布过、非历史漂移)

按 §7.4(feat + server.ts 热路径)此 PR 走人工合并,等复核通过后由你合并即可。

中文摘要:按独立复审意见修了四处——keyword 疑似告警改为条件式措辞、#920 设计吸收的 opencode-acp 不再进冲突台账(避免自相矛盾的删除建议)、hermes 收窄为仅目录名匹配、isLegacyBcpEntry 统一进 native-bootstrap 共享函数(并集语义,双向覆盖不缺),另补了 opencode 遍历越界修复与 4 个新测试;已 rebase 到最新 master,typecheck/全量测试/build 全绿,待你复核后可人工合并。

ranxianglei pushed a commit that referenced this pull request Sep 25, 2026
…ut of ledger, hermes name-only, shared isLegacyBcpEntry

- keyword-tier findings now warn 'IF it also compresses context' instead of
  asserting double-compression (server warn + launcher stderr); ledger detail
  gains a [suspected] suffix for keyword matches
- #920 design-absorbed opencode-acp entries no longer enter the conflict
  ledger (isDesignAbsorbed: known opencode-acp under bili's own opencode
  mode) — acp_status/web banner can no longer advise removing a plugin
  bili deliberately absorbs
- hermes scan matches plugin dir names only; plugin.yaml full-text haystack
  removed (descriptions mentioning context/summarize were false positives)
- isLegacyBcpEntry unified into src/agent/native-bootstrap.ts as the single
  canonical predicate (union of both prior implementations); pi-native and
  thirdparty-scan import it — comment drift resolved by construction
- opencode project walk bounded by the .git root (was: climbed to fs root);
  omp inline-flow extensions limitation documented; unused resolveDshHome
  import dropped
- tests: +4 (git-root bounding, no-anchor cwd-only walk env-aware, #920
  exemption matrix, hermes yaml negative fixture)
@ranxianglei

Copy link
Copy Markdown
Owner Author

Independent deep review complete — rebased onto current master (one conflict: /api/sessions stats payload resolved by union — master's unrecognizedPaths + this PR's conflicts; head 8af0546).

Verified sound:

  • Every fs access individually guarded — a scan can never fail a request or launch; BILI_CONFLICT_SCAN=0 escape hatch.
  • Self-exclusion (billion-context by name and by path) and sibling semantics: opencode-acp is known but absorbed-by-design on bili's own opencode lane (opencode v1: keep opencode-acp legacy sessions working after switching to bili #920), warns elsewhere; legacy billion-context-pi entries are known on pi.
  • Keyword RE word boundaries: context7 (docs plugin) correctly NOT matched, llm-context-compressor correctly matched; hermes matches dir names only (avoids description false-positives); omp scans block-style only with the inline-flow gap disclosed.
  • opencode project walk is anchored at the repo .git root — no unbounded climb to /.
  • First-request-only wiring (requests === 0), hedged keyword wording ("IF it also compresses…"), ledger bounded at 20 events, surfaced in acp_status / web UI / stats.
  • Live smoke through the real scanClientPlugins: fabricated pi settings.json with bili-self + npm:llm-context-compressor + npm:vue-hooks → exactly one keyword finding, self and unrelated excluded.

Gates on the rebased head: typecheck ✓ / 2640 tests 0 fail / build ✓. Ready to merge when CI is green.

@ranxianglei
ranxianglei force-pushed the 2026-09-24_thirdparty-compression-detection branch from 32b7ae6 to 8af0546 Compare September 25, 2026 15:10
ework-agent added 2 commits September 26, 2026 00:20
…ut of ledger, hermes name-only, shared isLegacyBcpEntry

- keyword-tier findings now warn 'IF it also compresses context' instead of
  asserting double-compression (server warn + launcher stderr); ledger detail
  gains a [suspected] suffix for keyword matches
- #920 design-absorbed opencode-acp entries no longer enter the conflict
  ledger (isDesignAbsorbed: known opencode-acp under bili's own opencode
  mode) — acp_status/web banner can no longer advise removing a plugin
  bili deliberately absorbs
- hermes scan matches plugin dir names only; plugin.yaml full-text haystack
  removed (descriptions mentioning context/summarize were false positives)
- isLegacyBcpEntry unified into src/agent/native-bootstrap.ts as the single
  canonical predicate (union of both prior implementations); pi-native and
  thirdparty-scan import it — comment drift resolved by construction
- opencode project walk bounded by the .git root (was: climbed to fs root);
  omp inline-flow extensions limitation documented; unused resolveDshHome
  import dropped
- tests: +4 (git-root bounding, no-anchor cwd-only walk env-aware, #920
  exemption matrix, hermes yaml negative fixture)
@ranxianglei
ranxianglei force-pushed the 2026-09-24_thirdparty-compression-detection branch from 8af0546 to 24fd6e7 Compare September 25, 2026 16:23
@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

收到深度复审结论。我做了独立交叉验证,另发现 master 在你评论之后又前进了 9 个提交,已再 rebase 一次——当前 PR head:24fd6e7a(feat b3381ec1 + fix 24fd6e7a,基于 master d3c8af84,零冲突)。

对你 rebase(8af0546)的交叉验证

  • 我的 round-2 修改完整保留:逐字节 diff 了两个 fix commit 的 patch(我的 32b7ae66 vs 你的 8af05468)——除 hunk 行号偏移(launcher.ts 3040→3071、server.ts 1764→1805,master 新增代码所致)外完全一致,四项修复与 4 个新测试无一丢失。
  • /api/sessions 并集解决正确:src/server.ts:5442(8af0546)= { sessions, blindTunnels, unrecognizedPaths, conflicts } —— 对照两侧父版本(master 只有 unrecognizedPaths,本 PR 只有 conflicts),两边字段都在,无一侧丢失。__bili/stats(:5457)亦含 conflicts。

为什么又 rebase 了一次

你的评论后 master 合入 9 个提交(#1335/#1337 native-attach-gate、#1322 claude watchdog refusal、v0.1.153 release 等),其中 launcher.ts +149 行、server.ts、CONFIGURATION.md 与本 PR 重叠文件面相交。按 §7.2「rebase to CURRENT master before claiming mergeable」,我把分支重定基到 d3c8af84:零冲突(新提交的改动区域与本 PR 不重叠),线性两提交不变。

门禁(head 24fd6e7a,rebase 后全量重跑)

  • npm ci + npm run typecheck ✅
  • npm test ✅ 2654 tests / 0 fail / 11 skipped(e2e/env gated;你那边 2640 是旧 base 的数字,新 base 多 9 个提交的测试)
  • npm run build ✅(dist-import-annotations OK)
  • GitHub:mergeable=true(不再 behind,就在 master 顶上);CI 已绿:e2e ✅ / build-artifact ✅ / version-guard ✅ / real-pi lane ✅ / codex fake-upstream ✅;test 矩阵(4 OS×node)+ hermetic registry e2e 仍在跑

合并

按 §7.4(feat + server.ts 热路径)此 PR 为人工合并——我等 CI 全绿后的合并动作由你执行,我不会代合。

中文摘要:交叉验证确认你的 rebase 完整保留了全部复审修改且 /api/sessions 冲突按并集正确解决(unrecognizedPaths+conflicts 双字段保留);因 master 又前进 9 个提交且触碰同批热文件,已按规范再 rebase 到 d3c8af84(零冲突,head 24fd6e7a)并重跑门禁,typecheck / 2654 测试 0 fail / build 全绿,CI 主体已过,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