Skip to content

[Root Cause] plugin-mode (3 items) #7229

Open

Description

@ranxianglei

同一根本原因(plugin-mode)的 open issue 汇聚,由根因归类板自动维护(10min 刷新,勿手编)。

Members (3)

Task

对本批 issue 做一个根本性修复 PR:

  • PR 描述里用 Fixes #... 逐个列出上面每一个 GitHub issue 号(没有 GitHub 号的写镜像号)
  • 若某个 issue 已有自己的 PR 且方向一致,cherry-pick 其 commit 并保留原作者署名(-x);由你判断是否值得
  • PR 必须打标签:root-cause(固定,来自根因汇聚单)+ 按本 PR 的 diff 独立判断的类别和优先级标签(最高优先用 p1),不要抄任何来源 issue
  • PR 描述末尾必须加标记行 <!-- rcagg:plugin-mode -->(汇聚板靠它自动识别根因 PR 补标签/插队;即使修复拆成多个子单各自提 PR,每个 PR 都要带这行)
  • 回帖本线程必须是最终裁决,结尾固定用中文 8问 清单逐行回答:1 这是啥问题(大白话+触发条件)2 根本原因是啥(组件+机制)3 如何修复(已做的修复或建议修法)4 能否合并/关闭(结论+依据:测试/CI/回归分析)5 URL(相关线程/PR 链接)6 影响面(哪些代码路径/用户)7 测试(什么钉住它)8 风险(还可能坏在哪)。答不实的行写「待验证:原因」,不许漏行

Activity

  1. changed the title [-][Root Cause] plugin-mode (2 items)[/-] [+][Root Cause] plugin-mode (4 items)[/+] on Nov 18, 2026
  2. ranxianglei commented on Nov 18, 2026

    @ranxianglei
    OwnerAuthor

    🤖 Powered by ework · qwen3.8-27b

    [bot] 🏷 根因聚合单 #7229(plugin-mode,2 成员)已完成统一修复 PR:#7231(已开、已打标签 root-cause + bug + p1,PR 描述带 Fixes #5866 / Fixes #7218 + <!-- rcagg:plugin-mode --> 标记)。

    修复内容

    #5866(plugin-lane array-form fold 首轮后全量摘要归零)

    • 根因:kernel hideConsumedCompressCalls 把重发的 compress 调用 summary 截成 200 字前缀(stub),但 host stripKernelSummaries 只查 range-pair 存在性(不查调用是否仍带全文),于是把 in-place anchor 也剥了 → 线上零全量载体。
    • 修法(Option A,host 侧,不动 kernel):stripKernelSummaries 改为完整性感知——仅当某个匹配调用的 summary 与 anchor body 逐字相等时才剥 anchor;stub/漂移/缺失时保留 anchor 作为唯一全量载体。
    • buildCarrierIndex 新增 ensureRangeSummaries(单次 parse 路径跟踪 per-range summary 文本);extractAnchorBody 提取 anchor 的 body(首行 topic 之后)。
    • 回归测试:tests/issue5866-anchor-integrity.test.ts(8 个新测试,钉住 fresh-call 剥 / stubbed-call 留 / content-array / 空 summary / trim 归一 / 混合 fresh+stub / anchor 缺失 / proxy-mode 不受影响)。既有 carrier-index 测试更新(调用 args 补上匹配 summary 字段)。
    • 本地验证:24/24 测试通过(carrier-index 16 + anchor-integrity 8),typecheck 干净。

    #7218(Claude 原生 MCP watchdog 接受 HTTP-200 HTML / {"ok":false})

    • 从 PR [PR] fix: validate Claude watchdog health payloads #7220 cherry-pick(commit 7e69d5b,作者 Afloat,-x 保留署名)。
    • watchdog 默认健康探针改为要求解码 JSON payload ok===true(单次 2000ms 超时);recovery 链(ensure→repin→follow)、阈值(3)、间隔(30s)不变。
    • 新套件 tests/claude-watchdog-health-payload.test.ts(15 测试,base 上 11 红)。
    • 本地验证:15/15 通过。

    行为变更披露

    8问

    1. 这是啥问题:plugin-lane 折叠后第一轮起,线上就只剩 stub 摘要(200 字前缀),全量摘要丢了(模型看到的上下文被截断);另外 Claude MCP watchdog 把 HTTP-200 的 HTML 错误页/{"ok":false} 当健康,跳过 recovery。触发条件:plugin-mode 会话折叠后多轮对话;Claude 客户端 proxy 返回非 JSON 健康响应。
    2. 根本原因是啥:Plugin-lane array-form folds end with zero full summaries on the wire after the first turn (call stubbed + render stripped) #5866 — src/server.ts:2801 stripKernelSummaries 只查 range-pair 存在性,不查调用是否仍带全文(kernel hideConsumedCompressCalls stub 后调用不再带全文,但 anchor 被剥了);Claude watchdog accepts HTTP-200 HTML or not-ok health replies and skips recovery #7218 — src/claude-mcp-entry.ts 的 probeProxyHealth 只看 res.ok(HTTP 状态码),不校验 payload 内容。
    3. 如何修复:Plugin-lane array-form folds end with zero full summaries on the wire after the first turn (call stubbed + render stripped) #5866 — Option A(host 侧完整性感知剥离:调用 summary 逐字等于 anchor body 才剥,否则留 anchor);Claude watchdog accepts HTTP-200 HTML or not-ok health replies and skips recovery #7218 — cherry-pick [PR] fix: validate Claude watchdog health payloads #7220(探针要求解码 JSON ok===true)。
    4. 能否合并/关闭:可合并。依据:本地 24/24 + 15/15 测试通过、typecheck 干净;Claude watchdog accepts HTTP-200 HTML or not-ok health replies and skips recovery #7218 部分已有 [PR] fix: validate Claude watchdog health payloads #7220 CI 全绿(30 checks, 0 failed);Plugin-lane array-form folds end with zero full summaries on the wire after the first turn (call stubbed + render stripped) #5866 部分是 host 侧 wire 行为变更(人工档),需 owner 审核合并。
    5. URL:PR [PR] fix: plugin-fold anchor integrity + Claude watchdog health payload validation #7231(https://github.com/ranxianglei/billion-context/pull/7231);源 issue Plugin-lane array-form folds end with zero full summaries on the wire after the first turn (call stubbed + render stripped) #5866、Claude watchdog accepts HTTP-200 HTML or not-ok health replies and skips recovery #7218;cherry-pick 来源 PR [PR] fix: validate Claude watchdog health payloads #7220。
    6. 影响面:Plugin-lane array-form folds end with zero full summaries on the wire after the first turn (call stubbed + render stripped) #5866 — plugin-mode 会话(所有走 plugin 车道的客户端,如 dsh/opencode/pi);proxy-mode 不受影响。Claude watchdog accepts HTTP-200 HTML or not-ok health replies and skips recovery #7218 — Claude 原生 MCP 客户端的 watchdog recovery 路径。
    7. 测试:tests/issue5866-anchor-integrity.test.ts(8 测试钉住 fresh/stub/content-array/空 summary/trim/混合/anchor 缺失/proxy-mode)+ tests/issue2042-carrier-index.test.ts(16 测试,含复杂度探针)+ tests/claude-watchdog-health-payload.test.ts(15 测试)。
    8. 风险:Plugin-lane array-form folds end with zero full summaries on the wire after the first turn (call stubbed + render stripped) #5866 — 若未来 kernel 改变 anchor 渲染格式(topic line 结构),extractAnchorBody 的「首行之后」假设可能失配(需同步更新);若调用 summary 被合法改写(非 stub),anchor 会保留(多一个载体,不是丢数据,安全方向)。Claude watchdog accepts HTTP-200 HTML or not-ok health replies and skips recovery #7218 — 若 proxy 健康端点未来返回非 JSON 但语义健康的响应(如纯文本 "OK"),watchdog 会误判为不健康并触发 recovery(过度 recovery,不是漏 recovery,安全方向)。
  3. ranxianglei commented on Nov 18, 2026

    @ranxianglei
    OwnerAuthor

    🤖 Powered by ework · qwen3.8-27b

    [bot] 🏷 CI 更新:PR #7231 已 rebase 到当前 master(之前 behind 29 commits),全部 11 个 test shard 通过,所有 static gates 通过(kernel-guard / version-guard / config-surface-guard / architecture-docs / lock-sync / build-artifact 等)。CI 全绿,可合并。

  4. changed the title [-][Root Cause] plugin-mode (4 items)[/-] [+][Root Cause] plugin-mode (1 items)[/+] on Nov 19, 2026
  5. changed the title [-][Root Cause] plugin-mode (1 items)[/-] [+][Root Cause] plugin-mode (4 items)[/+] on Nov 19, 2026
  6. changed the title [-][Root Cause] plugin-mode (4 items)[/-] [+][Root Cause] plugin-mode (3 items)[/+] on Nov 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions