Repository navigation
[PR] fix: dsh lane self-heals after a respawn give-up (#4755) - #4773
Closed
ranxianglei wants to merge 5 commits into
Closed
ranxianglei wants to merge 5 commits into
ranxianglei wants to merge 5 commits into
Conversation
A runtime give-up lands the register base-less while toolsReady stays true (#3380). The recovery timer's tick cleared itself on toolsReady alone — exactly that shape — so an armed timer died on its first tick without calling maybeRetry, and fireGiveUp never armed one; degraded model traffic never reaches headersFor either. The lane stayed permanently direct/uncompressed until an /acp command or a host restart, so with a healthy replacement proxy already listening the client never re-attached, over-window bodies were refused locally (422), and the session became unrecoverable. - armRecoveryTimer: treat base-less as unhealthy even when tools are ready - fireGiveUp: arm the recovery driver at the moment of give-up
Owner
Author
(ai: vllm-qwen/qwen3.8-27b) 查重: 不重复。独立检索 + 代码比对确认:本 PR 的机制(恢复定时器 tick 门在「无 base + toolsReady」形状上自杀 + fireGiveUp 不装定时器)与同家族条目均不同——#2082 是定时器的引入者(只驱 tools-down 态)、#3380 是前提(toolsReady 跨代理死亡存活)、#4125/#4389 只改 give-up 日志措辞、#4516 只看板展示。无一触碰 tick 门或 arm-on-give-up。 标签: bug / dsh / scope/wiring / p1(保留 pr)— 缺陷类;dsh 宿主接线层(src/agent/dsh-native.ts 插件侧恢复驱动);give-up 后会话永久不可用属 owner 2026-10-19 修订的 p1 类别。已打。 结构化八问
验证证据(独立跑过,非转述)
两点非阻塞备注
判定可合并。方向正确、diff 最小(13 行源码 + 1 个新测试文件)、测试双向钉住、相邻行为清点无回归、披露完整。等 head 上 CI 绿即可由人合并(我不合并 PR)。 |
Contributor
📦 Built Package ArtifactBranch: Latest build — install this exact versionnpm install -g billion-context@0.0.6145-pr.4773.bf0dfb5This exact version is immutable and reproducible. The rolling Recent builds (commit → version)
Download artifact
tar xzf billion-context-pr4773.tgz
npm install -g packageInstall instructions are refreshed on each push. |
added 3 commits
October 26, 2026 10:14
master window commits 293ae65/de5e03659 bumped kernel/package.json to 0.0.165 without regenerating the lockfiles; lock-sync re-resolution then rewrites the stale recorded versions (root 0.0.163, kernel 0.0.164) and fails. Pure recorded-version sync via npm install --package-lock-only; no dependency or semantic change.
This was referenced Oct 26, 2026
Owner
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #4755
What this fixes
After a runtime give-up ("proxy respawn gave up — model traffic goes direct"), the dsh lane stayed permanently direct/uncompressed even when a healthy replacement proxy was listening on the lane port — in the field case of #4755 every turn re-sent the full history, over-window bodies were refused locally (422), and the session became unrecoverable.
A give-up lands the register in the shape
{base: undefined, toolsReady: true}(#3380: host-context tool registrations survive a proxy death). Two defects left exactly that shape with NO self-heal driver:register.toolsReadyalone — exactly the post-give-up shape — so an armed timer died on its first tick without ever callingmaybeRetry.maybeRetry's own gate had been fixed for Plugin tool registration self-lock: after a failed proxy respawn, re-registration is blocked by its own prior registrations — identity headers lost forever (wire mode) → 413 preflight_compress_failed on large sessions | [Bug] 插件工具注册状态自锁:proxy respawn 失败后重注册被自己挡死,永久失去身份头(wire 模式)→ 大会话 413 preflight_compress_failed #3380 ("the base-less state heals through the RESPAWN branch even when toolsReady is true"), but the timer callback still carried the pre-Plugin tool registration self-lock: after a failed proxy respawn, re-registration is blocked by its own prior registrations — identity headers lost forever (wire mode) → 413 preflight_compress_failed on large sessions | [Bug] 插件工具注册状态自锁:proxy respawn 失败后重注册被自己挡死,永久失去身份头(wire 模式)→ 大会话 413 preflight_compress_failed #3380 gate.fireGiveUpnever armed the timer, and degraded model traffic never reachesheadersFor(origin resolution fails first), so nothing else re-drove the respawn loop until an/acpcommand or a host restart.Fix
armRecoveryTimer: the tick now treats base-less as unhealthy even when tools are ready (dead || (toolsReady && base !== undefined)).fireGiveUp: arms the recovery driver at the moment of give-up, so healing starts within one interval instead of never.Once a base lands, the same gate clears the timer as before — no background churn in the healthy state (pinned by churn assertions in the new test).
Behavior change (old → new)
/acpcommand or a host restart — permanently if neither happened.BILI_DSH_RECOVERY_INTERVAL_MS) until a base lands again. No other defaults, thresholds, or wire behavior changed.Config surface
None — no new config keys or env vars;
BILI_DSH_RECOVERY_INTERVAL_MSalready exists and is unchanged.Dedup check
查重: 不重复。Closest family: #2082 (timer drives only base-less+tools-DOWN states), #3380 (registrations survive give-up — the premise here), #4125/#4389 (give-up log reason suffix), #4516 (lane table). This mechanism (tick gate + missing arm-on-give-up) is distinct from all of them; full comparison in the issue thread.
Tests
tests/issue4755-dsh-giveup-selfheal.test.ts: drives the production give-up hook into the{base:undefined, toolsReady:true}shape, then proves the recovery timer ALONE (zero model traffic) re-bases onto a replacement proxy and clears itself once healthy. Verified to FAIL on the pre-fix code (stash-and-rerun) and pass with the fix.issue2082-dsh-recovery,issue3380-dsh-rereg-selflock,issue4125-giveup-reason(15/15). Typecheck clean. Full-suite verdict = CI on this head.Out of scope (tracked in the issue thread): whether spawn-mode instance adoption should accept a strictly-newer resident build (cross-version adopt, #1225/#3544 territory) — needs owner decision.