Skip to content

[PR] fix(agent): hold in-flight launcher respawns under the spawn budget in dsh/omp/opencode lanes - #5510

Open
ranxianglei wants to merge 3 commits into
masterfrom
2026-11-02_lane-respawn-hold-parity
Open

ranxianglei wants to merge 3 commits into
masterfrom
2026-11-02_lane-respawn-hold-parity

Conversation

@ranxianglei

@ranxianglei ranxianglei commented Nov 2, 2026 •

Copy link
Copy Markdown
Owner

Part of #5507 (question 4 — the gate waiting for a replacement before refusing).

What

pi-native has held model requests racing an in-flight launcher respawn under the launcher's own bring-up budget since #4516 (state.spawnWaitMs = SPAWN_BUDGET_MS + 10_000, 70 s with default budgets). The other three self-spawning lanes — dsh, omp, opencode — never set that seam, so while a sanctioned cold start (budget 60 s: BILI_SPAWN_WAIT_MS 20 s + BILI_SLOW_START_GRACE_MS 40 s) was still in flight, their degraded path capped at the generic 15 s readiness timeout and then either direct-sent the turn or refused it with bili_gate_oversize_refusal_fallback (HTTP 422) — exactly the "proxy died, no replacement came up" window this issue reports on 30–45 MB DSH sessions.

Every launcher-spawn transition now arms the same hold:

Lane Plan-time spawn arm Attach → spawn fallback tail Self-heal re-spawn
dsh added added (spawnFallback) added (maybeRetry inline arm)
omp added added n/a (no such site)
opencode added added n/a
pi already present (#4516) added n/a

Lazy attach-mode arms (verifyAttachAndRecover via singleFlight) are unchanged: their actual spawns route through the covered fallback tails. Inline-mode arms never launch a proxy process and are untouched.

Behavior change (old → new)

Degraded-path hold while an in-flight respawn settles, per request: 15 s → SPAWN_BUDGET_MS + 10 s (70 s default) for dsh/omp/opencode; worst-case total including the 15 s readiness cap ~30 s → ~85 s. This matches what pi has done since #4516, so the lanes are now consistent instead of divergent. A healthy attach or an off-switched lane arms nothing (pinned by the negative-direction tests). No config surface, wire protocol, or kernel changes.

Tests

New tests/issue5507-lane-respawn-hold.test.ts pins BOTH directions per lane (#3617 discipline): dead attach target → fallback-to-spawn transition arms exactly SPAWN_BUDGET_MS + 10_000; healthy attach settles on the target with no hold armed. Touched-lane suites re-run green locally (dsh/omp/pi/opencode native, #2082 recovery, #4516 mechanism).

Full-suite verdict from CI on the pushed head.


Review supplement (agent review, commits 045a298 + 3706dce)

Review found one gap in the original head and one pre-existing defect:

Gap — OpenCode 2.x model traffic was not actually held. createLiveOriginResolver (src/agent/native-intercept.ts) is the route OpenCode 2.x model requests flow through (createNativeRoute → V2 setup route). On a dead attach target / bootstrap failure it did state.ready = state.respawn(); await readyOrigin(state) — waiting only the generic 15 s readiness cap and never reading state.spawnWaitMs. The armed holds above therefore never applied to the primary path of opencode self-spawn installs (the fetch-intercept lanes dsh/omp/pi were covered). Fixed: readyOrigin takes an optional waitBudgetMs override and the resolver passes state.spawnWaitMs; disarmed states are byte-identical to before. Both directions pinned in this PR's suite (armed → adopts a late spawn landing past the 15 s cap; disarmed → degrades at the cap). Behavior change for that one path: degraded-path hold while an in-flight respawn settles, 15 s → SPAWN_BUDGET_MS + 10 s (70 s default), same as the other lanes now get; no change when no respawn is armed.

Pre-existing defect — the suite did not typecheck on the original head. The Lane.reset hook was typed () => void but dsh's _resetRegisterForTest takes a required base parameter (TS2322 on this file). Widened the hook signature; other lanes' zero-arg resets stay assignable.

@github-actions

github-actions Bot commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

📦 Built Package Artifact

Branch: 2026-11-02_lane-respawn-hold-parity (e9adf8f)

Latest build — install this exact version

npm install -g billion-context@0.0.10892-pr.5510.636972f

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
e9adf8f billion-context@0.0.10892-pr.5510.636972f build
57ee18c billion-context@0.0.10103-pr.5510.6cca6a3 build
5faa385 billion-context@0.0.8901-pr.5510.57a77eb build
3706dce billion-context@0.0.7828-pr.5510.0410873 build
6e1c3aa billion-context@0.0.7826-pr.5510.7d4df84 build

Download artifact

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

Install instructions are refreshed on each push.

@ranxianglei ranxianglei changed the title fix(agent): hold in-flight launcher respawns under the spawn budget in dsh/omp/opencode lanes [PR] fix(agent): hold in-flight launcher respawns under the spawn budget in dsh/omp/opencode lanes Nov 2, 2026
@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[bot] 🏷 (ai: vllm-qwen/qwen3.8-27b)

查重: 不重复。 全仓检索(含已关闭)无其他 PR 触碰同一机制——最近邻是 #4546(已合,#4516 的 pi 车道 + 共享 intercept 侧 hold),本 PR 是把那条 seam 补到 dsh/omp/opencode,方向与 #5507 Q4 一致。

标签: bug dsh omp opencode pi scope/wiring p2(四车道降级路径在慢冷启动窗口内提前放弃的缺陷;有重试绕行,非不可用)。

Review 进行中(分支已拉取,单 commit、5 文件 +271/-3,基于最新 master)。初步发现一个待验证点:opencode V2 路由走的是 createLiveOriginResolver,其 respawn 等待用的是 readyOrigin(15s 上限),并不读 state.spawnWaitMs —— 即 OpenCode 2.x 的模型请求路径可能仍停在 15s 旧行为,而 PR 描述称 opencode 已对齐 70s。正在核对 V1/V2 两条路径的实际流量归属并本地跑定向测试,结论稍后按八问给出。

@ranxianglei

Copy link
Copy Markdown
Owner Author

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

注:GitHub 不允许对本人所开 PR 提交正式 approve 事件(422),故以本评论给出审查结论;判定为 APPROVE。

结论:APPROVE —— 代码正确、测试双向钉住、行为变更已披露,无阻塞项。

八问

  1. 是什么问题:dsh / omp / opencode 三条自启动车道在「替换代理正在冷启动」的窗口里,竞争请求只按通用 15s 就绪上限等待,而这条车道的 launcher 实际启动预算默认是 60s。慢冷启动(Boot full-scan of historical corpus: 3.9 GB store cold start at 34 s+ → hits the 60 s hard budget on native spawn → inev | 启动 boot 全量扫描历史语料:3.9GB store 冷启动 34s+,撞上 native spawn 的 60s 硬预算 → 必然降级直连(随后以未压缩历史撞上游窗口) #4515)时,本可被几秒后就绪的代理正常服务的回合被提前判死——走直连或 422 oversize 拒发(Event-loop-watchdog self-exit + split-brain under 30–45 MB sessions: proxy disappears mid-request (422 oversize refusal) and two instances commit the same session #5507 第 4 问)。pi 车道自 [pi] Direct connection fallback after proxy disconnect: no oversized rejection, no self-healing, no visible alerting (al | [pi] 代理失联后的直连兜底无 oversized 拒绝、无自愈、无可见告警(opencode/dsh 都有)—— 1.06M token 原始历史被直接送进上游 #4516 起已按启动预算持有,其余三条没对齐。
  2. 什么原因导致:消费端读 state.spawnWaitMs ?? readyTimeoutMs ?? 15_000(src/agent/native-intercept.ts),但 dsh/omp/opencode 从没在任何 launcher 派生转换处写入 spawnWaitMs,于是永远落到 15s 兜底。另有一处:opencode 2.x 主模型流量走 createLiveOriginResolver,它调 readyOrigin(state) 时没把 armed 预算传进去——就算 arm 了也读不到。
  3. 影响范围与严重程度:触发面 = 这三条车道在冷启动 / 代理死亡重生窗口(通常 1–3s,慢机可达数十秒)内收到请求;严重度 = 特定条件下有问题(该窗口内的回合被提前降级为直连或 422 拒发),非完全不可用、可绕行(稍后重试)。p2。
  4. 怎么修的:在每条车道的每个真实 launcher 派生转换点(plan-time spawn 模式、attach→spawn 回退、self-heal 重生)arm state.spawnWaitMs = SPAWN_BUDGET_MS + 10_000(launcher 自身启动预算 + health-settle 余量);同时让 opencode V2 resolver 用 readyOrigin(state, state.spawnWaitMs) 读到 armed 预算。fetch-intercept 的消费分支本就是车道无关共享代码,arm 后自动生效。
  5. 是否有回归:审过这些既有行为——①healthy attach / inline / refuse-to-spawn 路径不 arm(保持 undefined → 通用上限);②readyOrigin 新增的是可选参,disarmed 调用方字节级不变;③mid-session 恢复路径(recover / reroute / compaction)仍走通用上限,未变;④singleFlight 去重未动。高危模式逐项过:无语义漂移、无 fail-fast 变吞错、唯一阈值变化即本次有意变更且已披露、输出格式不变。无回归。
  6. 是否破坏缓存:不涉及——纯 readiness-wait 时序,不动 prefix cache / 增量游标 / 去重键。
  7. 是否改设计方向:不涉及——沿用 [pi] Direct connection fallback after proxy disconnect: no oversized rejection, no self-healing, no visible alerting (al | [pi] 代理失联后的直连兜底无 oversized 拒绝、无自愈、无可见告警(opencode/dsh 都有)—— 1.06M token 原始历史被直接送进上游 #4516 既有 seam(spawnWaitMs 字段 + 车道无关消费端),只是补齐到其余三条自启动车道并让 opencode V2 resolver 也读到,无架构转向。
  8. 是否引入新配置:不涉及——复用既有 BILI_SPAWN_WAIT_MS / BILI_SLOW_START_GRACE_MS(二者之和 = SPAWN_BUDGET_MS),无新 env / config / 默认值。

测试有效性:每车道双向钉住(fallback-to-spawn 精确 arm 到 SPAWN_BUDGET_MS+10_000 / healthy attach 不 arm 保持 undefined)+ V2 resolver 双向(armed 采纳落在通用上限之后、armed 预算之内的晚到 spawn / disarmed 在通用上限处降级);probe 归一化路径确认断言有牙(boolean probe → alive verdict,见 native-intercept.ts:845)。precondition 钉「fresh state 无 hold」。

一处非阻塞观察(可选精修,不拦合并):SPAWN_BUDGET_MS + 10_000 在 4 个文件重复 9 次;launcher.ts 已有同类命名惯例(STARTING_MARKER_TTL_MS = SPAWN_BUDGET_MS + 30_000)。若日后要统一调 margin,可提成具名常量(如 INFLIGHT_RESPAWN_HOLD_MS)。跨文件属风格取舍,留给作者定夺,不影响本次合并。

CI:review 时镜像缓存显示 head 3706dcee7 各分片 in_progress;本判定基于代码审查(未发现阻塞项)+ 前序 head 曾绿。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

(ai: vllm-qwen/qwen3.8-27b) review-worker-r1 完成:审查结论 APPROVE,已作为评论发布到 GitHub PR #5510(正式 approve 事件因「本人 PR」被 GitHub 422 拒绝,判定载于评论正文,含结构化八问 + 测试有效性核查)。无阻塞项;一处非阻塞 DRY 观察(SPAWN_BUDGET_MS + 10_000 跨 4 文件重复 9 次,可提具名常量)已在评论注明、不拦合并。head 3706dcee7 各 CI 分片 review 时 in_progress。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[bot] 🏷 (ai: vllm-qwen/qwen3.8-27b) 审查完成:PR #5510(内部 #5512)在当前 head 3706dcee7 上端到端审毕,结论 APPROVE。4 条自启动车道在每个真实 launcher 派生转换点 arm SPAWN_BUDGET_MS + 10_000,opencode V2 resolver 也已读到 armed 预算;测试双向钉住、行为变更(降级等待 15s→70s 默认)已披露、无回归、不碰 kernel/wire/config。正式 approve 事件因「本人 PR」被 GitHub 422 拒绝,判定与结构化八问已作为评论发布到 PR(comment id 6569197956)。一处非阻塞 DRY 观察(跨 4 文件重复的 derived budget 可提具名常量)已在评论注明、不拦合并。待 owner 合并。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

PR #5510 审核完成 — 结论:可合(CI 全绿)

方向正确、arm 点与 PR 表格逐一对上。审核发现 1 个真实漏掉的路径 和 1 个原 head 自带的 typecheck 红,已直接在 PR 分支修掉(两个新 commit,CI 重跑后全绿):

  1. OpenCode 2.x 模型流量实际没被保护:createLiveOriginResolver(src/agent/native-intercept.ts)是 V2 模型请求走的路由,attach 死亡时只等通用 15 s cap,从不读 state.spawnWaitMs —— 即 opencode self-spawn 安装的主路径没吃到这个 hold。修法:readyOrigin 加可选 waitBudgetMs 参数,resolver 传入 state.spawnWaitMs;未 arm 时行为字节级不变。双向测试钉死(arm → 等过 15 s cap 采纳迟到落地;未 arm → 在 cap 处降级)。
  2. 原 head 自己不过 tsc:suite 的 Lane.reset hook 签名与 dsh 的 _resetRegisterForTest(base: string | undefined, …)(必填参)不兼容(TS2322,tests/issue5507-lane-respawn-hold.test.ts:119)。已放宽 hook 签名,其余车道零参 reset 仍兼容。

结构化八问

  1. 是什么问题:launcher 自愈重生窗口(预算最长 60 s)内,dsh/omp/opencode 车道的模型流量不等替换进程起来,15 s 后就降级直发或 422 拒发——正是 Event-loop-watchdog self-exit + split-brain under 30–45 MB sessions: proxy disappears mid-request (422 oversize refusal) and two instances commit the same session #5507 报的「proxy 死了、替换还没起来」窗口。
  2. 什么原因导致的:pi 车道在 [pi] Direct connection fallback after proxy disconnect: no oversized rejection, no self-healing, no visible alerting (al | [pi] 代理失联后的直连兜底无 oversized 拒绝、无自愈、无可见告警(opencode/dsh 都有)—— 1.06M token 原始历史被直接送进上游 #4516 建立了 spawnWaitMs = SPAWN_BUDGET_MS + 10_000 的 hold 机制,另外三条自启动车道的 spawn 转换点从未设置这个 seam;且 opencode 的 V2 resolver 路径即使设置了也不读它(本次审核发现)。
  3. 影响范围与严重程度:仅在冷启动/自愈重生窗口触发(30–45 MB 大会话重启场景最典型);有绕行(稍后重试可恢复)= p2。影响 dsh/omp/opencode 及 pi 的 attach→spawn fallback 尾部的 self-spawn 安装。
  4. 怎么修复的:每个真正拉起 proxy 进程的转换点(plan-time spawn、attach→spawn fallback 尾、dsh maybeRetry)在 state.respawn = start 旁 arm 同一 hold;降级路径统一按 spawnWaitMs ?? readyTimeoutMs ?? 15 s 取等待预算。lazy attach arm 与 inline arm 刻意不 arm——前者实际 spawn 路由经过已覆盖的 fallback 尾,后者根本不拉进程。
  5. 是否有回归问题:逐项审了既有行为——健康 attach(无 respawn)什么都不 arm、行为不变(负向测试钉住);inline 模式不动;resolver 未 arm 路径字节级不变(新测试钉住在通用 cap 处降级);dsh/omp/pi/opencode native、dsh中工具会突然消失 #2082 recovery、[pi] Direct connection fallback after proxy disconnect: no oversized rejection, no self-healing, no visible alerting (al | [pi] 代理失联后的直连兜底无 oversized 拒绝、无自愈、无可见告警(opencode/dsh 都有)—— 1.06M token 原始历史被直接送进上游 #4516 机制、[Bug?] Under high load, health check timeouts appear to be misinterpreted as "proxy unavailable": large session requests | [Bug?] 高负载下 health 探活超时疑似被当成「代理不可用」:大会话请求被本地拒发(0.1.199 / plugin native) #3654 三态探测既有套件全绿(本地定向 198/198 + 远程 CI 全量绿)。未发现无意回归。
  6. 是否破坏缓存:不涉及——不动缓存/重试/增量游标/去重键,只改降级路径的等待预算。
  7. 是否改了设计方向:不涉及——把四条车道对齐到 [pi] Direct connection fallback after proxy disconnect: no oversized rejection, no self-healing, no visible alerting (al | [pi] 代理失联后的直连兜底无 oversized 拒绝、无自愈、无可见告警(opencode/dsh 都有)—— 1.06M token 原始历史被直接送进上游 #4516 已确立的机制,消除车道间分歧,无架构转向。
  8. 是否引入新配置:不涉及——复用现有 BILI_SPAWN_WAIT_MS / BILI_SLOW_START_GRACE_MS,无新 config surface/wire/kernel 变更。

行为变更披露(old → new):in-flight respawn 期间降级路径每请求等待 15 s → 70 s(SPAWN_BUDGET_MS + 10 s,dsh/omp/opencode;pi fallback 尾同步),含 15 s readiness cap 的最坏总时长 ~30 s → ~85 s;未 arm 时零变化。此变更正是 issue 声明的对齐目标。

交付:分支 2026-11-02_lane-respawn-hold-parity @ 3706dcee7(原 6e1c3aa43 + 审核修复 045a298ab + 测试修复 3706dcee7);PR 描述已追加 review supplement。CI:30/30 绿(typecheck、static-gates、ubuntu/windows × node22/24 全部 test shard)。本地定向:suite 10/10 + 触碰车道 198/198 + tsc 干净。

判定:可合,等 owner 合并。

@ranxianglei

Copy link
Copy Markdown
Owner Author

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

Re-review @ head 5faa385dd(纯 rebase,内容零变化)— 维持 APPROVE

说明:本 PR 作者与我的 PAT 同账号,GitHub 拒绝「approve 自己的 PR」(POST /pulls/N/reviews → 422),故判定以评论给出。

本轮做了什么(head 由 3706dcee7 移到 5faa385dd)

  • 该移动是纯 rebase 到更新的 master(基 ee0dcc7c4 → 4dea18eab,其间 master 推进 865 提交),3706dcee7 不是新 head 的祖先。
  • PR 自身逻辑载荷跨 rebase 逐字节一致:提取新旧两基的 +/− 净载荷各 304 行,diff 为空 —— 我前两轮已逐点核验过的改动一行未变。
  • master 这 865 提交虽重度改动了 native-intercept.ts / launcher.ts,但 PR 挂钩的区域上下文稳定(patch 干净重放、无冲突改写);关键消费点全部在位:spawnWaitMs 字段(native-intercept.ts:76)、加宽的 readyOrigin(state, waitBudgetMs?)(:1116 / :1121)、fetch-intercept respawn 等待消费(:2101 / :2106)、opencode V2 resolver 消费(:1391);其余 readyOrigin 调用方(recover / compaction 等)仍走通用上限,未误挂。
  • 预算常量语义未漂移(src/launcher.ts:183/188/191):SPAWN_WAIT_MS(BILI_SPAWN_WAIT_MS 默认 20000)+ SLOW_START_GRACE_MS(BILI_SLOW_START_GRACE_MS 默认 40000)= SPAWN_BUDGET_MS=60000,arm 值 +10_000=70000;四车道 9 处 arm 全在位(dsh×3 / omp×2 / opencode×2 / pi×2)。
  • CI(镜像缓存,sha=5faa385dd):failed=0、pending=13;build-artifact / gate / test-import-graph / mysql-contract 已绿,e2e 车道按门控 skip。测试矩阵收尾中,无失败。

结构化八问

  1. 是什么问题:dsh/omp/opencode 车道在冷启动替换启动(attach 失败→fallback spawn / plan-time spawn)的 1–3s 窗口内,把进行中的 launcher respawn 纳入 spawn 预算持有,避免过早降级直发大历史会话而触发 422 超大拒发(Event-loop-watchdog self-exit + split-brain under 30–45 MB sessions: proxy disappears mid-request (422 oversize refusal) and two instances commit the same session #5507 Q4)。
  2. 什么原因导致:这些车道的进行中 respawn 未按 spawn 预算被等待,过早降级为直发 → 大会话撞 422 上限。
  3. 影响范围与严重程度:仅冷启动 respawn 窗口;降级路径等待上限默认 15s→70s、最坏 30s→85s(PR 正文已披露)。属可用性改善,非破坏性。
  4. 怎么修复:在每个真实 spawn 转换点 arm state.spawnWaitMs = SPAWN_BUDGET_MS + 10_000;两个消费面(fetch-intercept respawn 等待 + opencode V2 resolver)都读 armed 预算,disarmed 时字节级回退原通用上限。
  5. 是否有回归:无。纯 rebase、载荷逐字节一致、挂钩区上下文未变、消费点/arm 全在位、CI 无失败;语义漂移 / fail-fast 变吞错 / 阈值·时序·输出格式漂移 逐项过,均不涉及。
  6. 是否破坏缓存:不涉及(未动缓存 / 重试 / 增量游标 / 去重键)。
  7. 是否改了设计方向:不涉及。
  8. 是否引入新配置:无新增(BILI_SPAWN_WAIT_MS / BILI_SLOW_START_GRACE_MS 均为既有变量,默认值未变)。

结论:APPROVE —— 代码正确性与回归面已核清;CI 测试矩阵收尾中、目前 0 失败。无阻塞项、无遗留待办。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[bot] 🏷 (ai: vllm-qwen/qwen3.8-27b) review-worker-r1 完成(第 3 轮,head 5faa385dd):确认该移动为纯 rebase、PR 自身逻辑载荷跨新旧基逐字节未变,前两轮已核验的改动一行未改,维持 APPROVE;判定已评论到 PR #5510(comment id 6761796851)。CI 测试矩阵收尾中、目前 0 失败。无阻塞项、无遗留待办。

@ranxianglei
ranxianglei force-pushed the 2026-11-02_lane-respawn-hold-parity branch from 5faa385 to 57ee18c Compare November 15, 2026 06:23
@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

Conflict resolution complete — PR rebased onto current master and force-pushed.

七问 summary

  1. What was the blocker? The PR head 5faa385dd was based on master 4dea18eabf; master had advanced 428 commits since, and the PR branch was dirty (merge conflict) against it.

  2. What did I do? Rebased the 3-commit PR branch onto current master 1ee510c528, resolved the conflicts, verified, and force-pushed (the sanctioned conflict-rebase force-push). New head: 57ee18c1c4.

  3. How were the conflicts resolved? Two files conflicted, both the same benign shape — master and the PR each added different test hooks at the same spot in the test-hook block:

  4. Is the PR payload preserved? Yes — byte-identical. Net +/- payload is 326 insertions / 6 deletions across the same 6 files before and after the rebase; a sorted line-by-line diff of old-base vs new-base payloads is empty. No logic line changed.

  5. Regression risk from the rebase? None introduced by the rebase itself. The only edits I made were the two union resolutions above (pure additive test hooks, no behavior). The PR's own logic payload is unchanged, so the previously-reviewed behavior (degraded-path hold 15s → 70s on dsh/omp/opencode, opencode V2 resolver honoring the armed budget) stands as reviewed.

  6. Verification run (targeted, local):

    • npm run typecheck → clean (exit 0).
    • tests/issue5507-lane-respawn-hold.test.ts → 10/10 pass (one first run was a transient fixed-port spawn flake, re-run green).
    • Touched-lane suites pi-native / omp-native / opencode-native / dsh-native / native-intercept / issue4516-pi-direct-fallback → 228/228 pass.
    • Full-suite verdict is the remote CI test lanes on the pushed head.
  7. Current state / next: GitHub now reports mergeable: true (conflict cleared). mergeable_state: blocked is branch-protection gating (required checks/reviews) awaiting CI on the new head — not a merge conflict. The mirror check cache was still stale (last fetched 2026-11-10, old sha) at the time of this reply, so I could not read the new head's CI states from it yet; CI is running on 57ee18c1c4. No decision needed, no new issue — this was a mechanical conflict rebase.

Commits on the new head: 77113c0403 (main fix) → 2f8c47c12f (opencode V2 resolver) → 57ee18c1c4 (test-hook typecheck fix).

@ranxianglei

Copy link
Copy Markdown
Owner Author

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

Re-review @ head 57ee18c1c(第 4 次 rebase,内容仍零变化)— 维持 APPROVE

说明:本 PR 作者与我的 PAT 同账号,GitHub 拒绝「approve 自己的 PR」(POST /pulls/N/reviews → 422),判定以评论给出。

本轮(head 5faa385dd → 57ee18c1c)

  • 又一次纯 rebase 到更新的 master:新 head 直接基于当前 master tip 1ee510c528;上一 head 5faa385dd 不是新 head 的祖先。
  • PR 自身逻辑载荷与第 3 轮逐字节一致(提取两 head 的 +/− 净载荷各 304 行,diff 为空);numstat 与前几轮完全相同(dsh 21+1 / native-intercept 10+3 / omp 24+1 / opencode 24+1 / pi 14+0 / test 233+0 = +326 −6)。即我前几轮已逐点核验的改动一行未变。
  • 预算常量语义未漂移(src/launcher.ts:183/188/191):SPAWN_WAIT_MS(BILI_SPAWN_WAIT_MS 默认 20000)+ SLOW_START_GRACE_MS(BILI_SLOW_START_GRACE_MS 默认 40000)= SPAWN_BUDGET_MS=60000,arm 值 +10_000=70000;消费点全在位(spawnWaitMs 字段 :77、opencode V2 resolver :1411、fetch-intercept respawn 等待 :2125/:2130)。
  • CI(镜像缓存,sha=57ee18c1c):failed=0、pending=13(6 queued + 7 in_progress)、success 5、e2e 车道按门控 skip 12。测试矩阵收尾中,无失败。

结构化八问

  1. 是什么问题:dsh/omp/opencode 车道在冷启动替换启动(attach 失败→fallback spawn / plan-time spawn)的 1–3s 窗口内,把进行中的 launcher respawn 纳入 spawn 预算持有,避免过早降级直发大历史会话而触发 422 超大拒发(Event-loop-watchdog self-exit + split-brain under 30–45 MB sessions: proxy disappears mid-request (422 oversize refusal) and two instances commit the same session #5507 Q4)。
  2. 什么原因导致:这些车道的进行中 respawn 未按 spawn 预算被等待,过早降级为直发 → 大会话撞 422 上限。
  3. 影响范围与严重程度:仅冷启动 respawn 窗口;降级路径等待上限默认 15s→70s、最坏 30s→85s(PR 正文已披露)。属可用性改善,非破坏性。
  4. 怎么修复:在每个真实 spawn 转换点 arm state.spawnWaitMs = SPAWN_BUDGET_MS + 10_000(四车道共 9 处);两个消费面(fetch-intercept respawn 等待 + opencode V2 resolver)都读 armed 预算,disarmed 时字节级回退原通用上限。
  5. 是否有回归:无。第 4 次纯 rebase、载荷逐字节一致、numstat 不变、挂钩区上下文稳定、消费点/arm 全在位、CI 无失败;语义漂移 / fail-fast 变吞错 / 阈值·时序·输出格式漂移 逐项过,均不涉及。
  6. 是否破坏缓存:不涉及(未动缓存 / 重试 / 增量游标 / 去重键)。
  7. 是否改了设计方向:不涉及。
  8. 是否引入新配置:无新增(BILI_SPAWN_WAIT_MS / BILI_SLOW_START_GRACE_MS 均为既有变量,默认值未变)。

结论:APPROVE —— 内容自第 1 轮起逐字节未变,正确性与回归面已核清;CI 测试矩阵收尾中、目前 0 失败。无阻塞项、无遗留待办。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[bot] 🏷 (ai: vllm-qwen/qwen3.8-27b) review-worker-r1 完成(第 4 轮,head 57ee18c1c):确认为又一次纯 rebase(新 head 直接基于当前 master tip 1ee510c528),PR 自身逻辑载荷与第 3 轮逐字节一致、numstat 不变(+326 −6),内容自第 1 轮起未变,维持 APPROVE;判定已评论到 PR #5510(comment id 6890628804)。CI 测试矩阵收尾中、目前 0 失败。无阻塞项、无遗留待办。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[bot] 🏷 (ai: vllm-qwen/qwen3.8-27b) 收尾说明:第 4 轮 review 已完成——head 57ee18c1c 为又一次纯 rebase(基于当前 master tip 1ee510c528),PR 逻辑载荷与第 3 轮逐字节一致、numstat 不变(+326 −6),内容自第 1 轮起未变,维持 APPROVE(GitHub 判定评论 id 6890628804)。CI 测试矩阵收尾中、目前 0 失败。

提示:本线程最后一条是我自己同步过来的 GitHub review 评论(upstream-sync 标记),不是新的提问,无需再处理。无阻塞项、无遗留待办,球在 owner 处合并。

…n dsh/omp/opencode lanes (#5507)

Part of #5507 (question 4). pi-native held model requests racing an
in-flight launcher respawn under the launcher's own bring-up budget
(SPAWN_BUDGET_MS + 10s margin, #4516), but dsh/omp/opencode never set
state.spawnWaitMs — their degraded path capped at the generic 15s
readiness timeout while their sanctioned cold-start budget is 60s, so
a slow-but-legitimate boot degraded turns to direct-send or 422 oversize
refusal before the replacement could land.

Every launcher-spawn transition now arms the same hold:
- plan-time spawn arm (dsh/omp/opencode; pi already had it)
- attach -> spawn fallback tails (all four lanes)
- dsh maybeRetry self-heal inline arm

Behavior change (old -> new): the degraded-path hold while an in-flight
respawn settles is 15s -> SPAWN_BUDGET_MS + 10s (70s with default
budgets) for dsh/omp/opencode, worst-case total ~30s -> ~85s including
the readiness cap, matching pi since #4516. No config, wire, or kernel
changes.

tests/issue5507-lane-respawn-hold.test.ts pins both directions per lane:
the fallback-to-spawn transition arms the budget; a healthy attach never
does.
ci-check added 2 commits November 19, 2026 05:00
createLiveOriginResolver awaited readyOrigin(state) on dead-origin / bootstrap-failure, capping at the generic 15 s readiness cap even when an in-flight respawn had armed state.spawnWaitMs (#4516 seam). That resolver serves OpenCode 2.x model traffic (createNativeRoute via the V2 setup route), so those installs never actually held under the spawn budget as intended.

readyOrigin now takes an optional waitBudgetMs override (spawnWaitMs passed by the resolver); disarmed behavior is byte-identical. Both directions pinned in tests/issue5507-lane-respawn-hold.test.ts: armed state adopts a late spawn landing past the generic cap; disarmed state degrades at the cap.
Small pre-existing defect on this PR head: the suite's Lane type declared reset as () => void while dsh's _resetRegisterForTest takes a required base parameter (string | undefined), so tsc failed on the PR's own new test file (TS2322). Widened to (base?: string, toolsReady?: boolean) => void; the other lanes' zero-arg resets stay assignable.
@ranxianglei
ranxianglei force-pushed the 2026-11-02_lane-respawn-hold-parity branch from 57ee18c to e9adf8f Compare November 18, 2026 21:03
@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

Second conflict rebase complete — PR rebased onto current master and force-pushed (final head, full CI pass).

七问 summary

  1. What was the blocker? The PR head from the prior run (57ee18c1c4, based on master 1ee510c528) was dirty again — master had advanced a further 265 commits to a446a3c1c8 (batch11-wave11 and others merged in).

  2. What did I do? Rebased the same 3-commit PR branch onto current master a446a3c1c8, resolved the conflict, verified, and force-pushed. New head: e9adf8f1ea.

  3. How was the conflict resolved? One file conflicted, at the import block src/agent/omp-native.ts:24 — master and the PR each added a different named import on adjacent lines:

    • master added createOmpDirectSendGuard to the ./pi.js import;
    • the PR added SPAWN_BUDGET_MS to the ../launcher.js import.
      Resolved by union (both imports kept). Verified both symbols are actually used in the file (createOmpDirectSendGuard ×2, SPAWN_BUDGET_MS ×3). All other payload files auto-merged clean.
  4. Is the PR payload preserved? Yes — byte-identical. A sorted line-by-line diff of the net +/- payload (src+tests) between the old head vs its base and the new head vs its base is empty. No logic line changed by the rebase.

  5. Regression risk from the rebase? None introduced by the rebase. The only edit was the import-union above (pure additive, both symbols already used). The PR's reviewed behavior (degraded-path hold 15s → 70s on dsh/omp/opencode; opencode V2 resolver honoring the armed budget) stands unchanged.

  6. Verification run (targeted, local):

    • npm run typecheck → clean (exit 0).
    • tests/issue5507-lane-respawn-hold.test.ts + touched-lane suites (pi-native / omp-native / opencode-native / dsh-native / native-intercept / issue4516-pi-direct-fallback) → 238/238 pass.
    • Full-suite verdict is the remote CI test lanes on the pushed head.
  7. Current state / next: GitHub reports mergeable: true (conflict cleared). mergeable_state: blocked is branch-protection gating awaiting CI on the new head — not a merge conflict. Per the CI-hold push discipline, this push is the branch's final head (verified locally before pushing) and therefore carries no [ework:ci-held] marker — it triggers the one full CI pass. The prior head 57ee18c1c4 also carried no marker (it was that run's verified final head). No decision needed, no new issue — mechanical conflict rebase.

Commits on the new head: c052393fbf (main fix) → 5b3a6e2e8a (opencode V2 resolver) → e9adf8f1ea (test-hook typecheck fix).

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

No action needed this run — the conflict was already resolved in the prior run. Verified live; the wake's "dirty" state is stale.

七问 summary (no-op run)

  1. What was the reported blocker? The wake reported the PR as dirty (merge conflict with base).

  2. What did I do? Verified the LIVE state before touching anything (per the status-freshness rule): fetched origin, test-merged, and queried the live GitHub PR object. I did not rebase or push — there was nothing to do.

  3. What the live sources actually show:

    • PR head e9adf8f1ea is based on master a446a3c1c8, which is the current master head — master is 0 commits ahead of the PR branch (it was already rebased onto it in the prior run).
    • git merge-tree test-merge: no conflicts (clean).
    • Live GitHub PR object: mergeable: true, mergeable_state: blocked. The blocked is branch-protection gating (required checks/reviews) awaiting CI on the head — not a merge conflict.
  4. Why the "dirty" report is stale: The wake's merge-state snapshot predates the prior run's rebase+push. The mirror check cache is also stale — it still shows the previous head 57ee18c1c4 (fetched 2026-11-16, mergeable_state: behind), not the current e9adf8f1ea. The live GitHub API is the source of truth here and shows the conflict is already cleared.

  5. Regression risk: None — no rebase, no push, no file touched this run.

  6. Verification: Live git merge-tree (clean) + live GitHub PR object (mergeable: true). No local code changes to typecheck or test.

  7. Current state / next: The PR is mergeable on current master; it is blocked only by branch protection pending CI on head e9adf8f1ea (the prior run's unmarked final head, which carries the single full CI pass). I did not push again — re-pushing an already-current branch would only burn another CI pass with no new work. No decision needed, no new issue. If CI on e9adf8f1ea comes back red, that's the red-CI half of this lane and I'll pick it up on the next wake.

@ranxianglei

Copy link
Copy Markdown
Owner Author

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

Re-review @ head e9adf8f1e(第 5 次 rebase,内容仍零变化)— 维持 APPROVE

说明:本 PR 作者与我的 PAT 同账号,GitHub 拒绝「approve 自己的 PR」(POST /pulls/N/reviews → 422),判定以评论给出。

本轮(head 57ee18c1c → e9adf8f1e)

  • 又一次纯 rebase 到当前 master tip:新 head 直接基于 a446a3c1(merge-base == master tip);上一 head 57ee18c1c 不是新 head 的祖先。
  • PR 自身逻辑载荷与第 4 轮逐字节一致(提取两 head 的 +/− 净载荷各 304 行,diff 为空);numstat 与前几轮完全相同(dsh 21+1 / native-intercept 10+3 / omp 24+1 / opencode 24+1 / pi 14+0 / test 233+0 = +326 −6)。即我前几轮已逐点核验的改动一行未变。
  • 预算常量语义未漂移(src/launcher.ts:183/188/191):SPAWN_WAIT_MS(BILI_SPAWN_WAIT_MS 默认 20000)+ SLOW_START_GRACE_MS(BILI_SLOW_START_GRACE_MS 默认 40000)= SPAWN_BUDGET_MS=60000,arm 值 +10_000=70000;9 个 arm 点全在位(dsh 3 / omp 2 / opencode 2 / pi 2),消费点全在位(spawnWaitMs 字段 :77、opencode V2 resolver :1411、fetch-intercept respawn 等待 :2125;其余 readyOrigin 调用方保持通用上限)。
  • CI(镜像缓存,sha=e9adf8f1e):failed=0、pending=1(1 in_progress)、success 17、e2e 车道按门控 skip 12。测试矩阵收尾中,无失败。

结构化八问

  1. 是什么问题:dsh/omp/opencode 车道在冷启动替换启动(attach 失败→fallback spawn / plan-time spawn)的 1–3s 窗口内,把进行中的 launcher respawn 纳入 spawn 预算持有,避免过早降级直发大历史会话而触发 422 超大拒发(Event-loop-watchdog self-exit + split-brain under 30–45 MB sessions: proxy disappears mid-request (422 oversize refusal) and two instances commit the same session #5507 Q4)。
  2. 什么原因导致:这些车道的进行中 respawn 未按 spawn 预算被等待,过早降级为直发 → 大会话撞 422 上限。
  3. 影响范围与严重程度:仅冷启动 respawn 窗口;降级路径等待上限默认 15s→70s、最坏 30s→85s(PR 正文已披露)。属可用性改善,非破坏性。
  4. 怎么修复:在每个真实 spawn 转换点 arm state.spawnWaitMs = SPAWN_BUDGET_MS + 10_000(四车道共 9 处);两个消费面(fetch-intercept respawn 等待 + opencode V2 resolver)都读 armed 预算,disarmed 时字节级回退原通用上限。
  5. 是否有回归:无。第 5 次纯 rebase、载荷逐字节一致、numstat 不变、预算常量/9 arm 点/消费点全在位、master 漂移干净、CI 无失败;语义漂移 / fail-fast 变吞错 / 阈值·时序·输出格式漂移 逐项过,均不涉及。
  6. 是否破坏缓存:不涉及(未动缓存 / 重试 / 增量游标 / 去重键)。
  7. 是否改了设计方向:不涉及。
  8. 是否引入新配置:无新增(BILI_SPAWN_WAIT_MS / BILI_SLOW_START_GRACE_MS 均为既有变量,默认值未变)。

结论:APPROVE —— 内容自第 1 轮起逐字节未变(连续 5 次纯 rebase),正确性与回归面已核清;CI 测试矩阵收尾中、目前 0 失败。无阻塞项、无遗留待办。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[bot] 🏷 (ai: vllm-qwen/qwen3.8-27b) review-worker-r1 完成(第 5 轮,head e9adf8f1e):确认为又一次纯 rebase(新 head 直接基于当前 master tip a446a3c1),PR 自身逻辑载荷与第 4 轮逐字节一致、numstat 不变(+326 −6),内容自第 1 轮起未变,维持 APPROVE;判定已评论到 PR #5510(comment id 6992116056)。CI 测试矩阵收尾中、目前 0 失败。无阻塞项、无遗留待办。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[bot] 🏷 (ai: vllm-qwen/qwen3.8-27b) 收尾说明:本线程最后一条(FLOOR 34,upstream-sync 标记)是我自己同步过来的第 5 轮 GitHub review 评论(GitHub comment id 6992116056),不是新的提问,无需再处理。

第 5 轮 review 已完成——head e9adf8f1e 为又一次纯 rebase(基于当前 master tip a446a3c1),PR 逻辑载荷自第 1 轮起逐字节未变(+326 −6),维持 APPROVE;CI 测试矩阵收尾中、0 失败。无阻塞项、无遗留待办,球在 owner 处合并 PR #5510。

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant