Skip to content

[PR] fix(#2155): keep the nudge/self-heal probe armed on headerless zombie rounds (zcode regression from #4372) - #4423

Merged
ranxianglei merged 4 commits into
masterfrom
fix/zombie-nudge-probe
Oct 23, 2026
Merged

ranxianglei merged 4 commits into
masterfrom
fix/zombie-nudge-probe

Conversation

@ranxianglei

@ranxianglei ranxianglei commented Oct 23, 2026 •

Copy link
Copy Markdown
Owner

什么坏了

master 上 tests/issue2155-self-heal.test.ts:270 确定性失败(本地 3/3 复现):僵尸插件会话的 degrade-to-proxy 自愈永不触发。二分锁定 fdbddd0..8d24bf9 = #4372(zcode MCP dialect)。

机制链:

  1. [PR] fix: zcode never compresses — compress prompts advertised a tool the model could not see or call #4372 给 zcode 加了 toolsHostScopedByDefault profile([Feedback] Noticed during testing that Zcode doesn't seem to trigger compression very often. | [反馈]在测试途中发现Zcode好像不怎么会触发压缩 #4344 本意:桥不健康就别宣传工具);
  2. lane-decisions.ts 的 compressReachable 对"没声明任何工具"的插件轮返回 false → compressSurfaceOn=false;
  3. prepare-*.ts 的 nudgeEligible/willInjectNudge 以 compressSurfaceOn 为前提 → nudge 全灭;
  4. 会话卡死自愈机制:卡死模式检测与代理侧主动补救 #2155 的僵尸检测靠 nudge 轮计数攒 zombieStreak → 永远攒不满 → selfHeal 永不记录。会话卡死自愈机制:卡死模式检测与代理侧主动补救 #2155 测试用的宿主恰好就是 zcode。

打桩证据(src/session-self-heal.ts evaluateSelfHealRound 输入 dump):绿版本 r2–r6 nudgeActive=true,红版本全部 false。

怎么修(判别式:头在不在)

resolveLaneDecisions 新增可选输入 pluginHeaderPresent(undefined = 观测不到,矩阵/旧调用方不触发);pluginMode && pluginHeaderPresent === false 时 compressReachable=true。四个 prepare 从 pluginAgentHeader(req.headers) 现场计算传入。

降级发生后本来就切到代理注入工具,headerless 轮表面保持 ON 只是让探测器活着,无副作用;#4344 自己的测试(issue4344)全部带 header,不受影响(已验证)。

搭车的 master 卫生修复(cherry-pick 自 #4416,等价内容)

master 本身带着两个 hygiene 红(lock-sync、unused-exports、LIVE_FILES),所有从 master 切的 PR 都会撞上;cherry-pick 了 #4416 的三个提交让本 PR 自洽,与 #4416 内容一致,先后合并无冲突。

kernel-change: sync kernel/package-lock.json version lines to 0.0.160 (lockfile metadata only, no kernel source change)

测试

  • 新矩阵行 ×4 线:zcode headerless zombie round keeps the surface (#2155 probe must stay armed),与既有 zcode no-tools drops the surface (#4344) 构成正负对;
  • 全部本地验证:issue2155-self-heal 12/12(master 红)、issue4344-mcp-dialect 6/6、lane-decisions-matrix 90/90、anthropic-lane-nudge 3/3、issue3004-nudge-decide-selfheal 7/7、issue3910-lane-nudge-wiring 2/2、issue1470-anthropic-nudge 2/2、fork-nudge-deadzone 3/3、fork-nudge-trigger 3/3;tsc --noEmit 干净。

Fixes #2155 回归(由 #4372 引入);与 #4344 语义共存。

… rounds

#4372's zcode profile (toolsHostScopedByDefault) made every no-tools
plugin round read as unreachable, which starved zombieStreak — the #2155
degrade-to-proxy recovery could never fire for zcode sessions (red on
master: tests/issue2155-self-heal.test.ts:270, 3/3).

Discriminator: #4344's silent bridge sends the lane HEADER with an empty
tool list; the zombie shape (plugin gone from the client) sends NO header
on a sticky plugin-bound session. resolveLaneDecisions now takes
pluginHeaderPresent and keeps compressReachable=true for headerless
plugin rounds; the four prepares pass it from the live request headers.
#4344's header-present silent case is untouched (matrix row pair added).
@ranxianglei ranxianglei added the ci:full Run the FULL CI matrix (all e2e lanes + 12-leg test matrix) on this PR label Oct 23, 2026
@ranxianglei ranxianglei changed the title fix(#2155): keep the nudge/self-heal probe armed on headerless zombie rounds (zcode regression from #4372) [PR] fix(#2155): keep the nudge/self-heal probe armed on headerless zombie rounds (zcode regression from #4372) Oct 23, 2026
@github-actions

github-actions Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

📦 Built Package Artifact

Branch: fix/zombie-nudge-probe (6ad2901)

Latest build — install this exact version

npm install -g billion-context@0.0.5296-pr.4423.01101a1

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
6ad2901 billion-context@0.0.5296-pr.4423.01101a1 build
b369740 billion-context@0.0.5293-pr.4423.3e0b336 build

Download artifact

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

Install instructions are refreshed on each push.

ework-agent added 3 commits October 23, 2026 21:55
…ly symbols

lock-sync: kernel/package.json is 0.0.160 but the root package-lock.json
kernel entry still said 0.0.159 — the bump missed the lockfile regen, so
'npm install --package-lock-only' dirtied the tree and lock-sync failed.

unused-exports: tests/corrupt-index-child.ts exported
ENGPROOF_CHECK_NAMES / BANNER_CHECK_NAMES / CorruptIndexCheck /
CorruptIndexVerdict but only the child module itself uses them (the
parent tests import the derived ENGPROOF_CHECKS/BANNER_CHECKS arrays and
the view helpers). Drop the export keyword; parents stay green
(web-storage-banner, storage-engine-proofs both fail=0 locally).
The lock-sync guard regenerates BOTH lockfiles (root + kernel); the bump
missed kernel/package-lock.json's two version lines too.
…_FILES

The #4216/#4249 storage work made tests/storage-engine-proofs.test.ts and
tests/web-storage-banner.test.ts spawn the corrupt-index-child helper, but
they were never added to LIVE_FILES — the run-ci-tests SPAWN_RE tripwire
(#3182/#1248) failed every ubuntu leg in 20s. Append-only per the slot
note: existing zone bands are untouched.
@ranxianglei ranxianglei reopened this Oct 23, 2026
@ranxianglei
ranxianglei merged commit 402da66 into master Oct 23, 2026
93 of 100 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

📦 Merged Build Published

This merge to master was published as 0.0.770-master.402da66 (rolling master tag).

npm install -g billion-context@0.0.770-master.402da66  # 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

ci:full Run the FULL CI matrix (all e2e lanes + 12-leg test matrix) on this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

会话卡死自愈机制:卡死模式检测与代理侧主动补救

1 participant