Repository navigation
[PR] fix: fork prefix gate is advisory — adopt drifted fork children with a classified warn (#3741) - #3757
Conversation
…a classified warn (#3741) The ordered-prefix 409 was a permanent dead-end: the rejected first request never incremented stats.requests, so every retry re-hit the same gate with no clear or TTL path (field report: dsh fork child stuck after an in-place proxy upgrade re-keyed message ids, #3642 canonical re-key generation). Routing is the session-id binding (recordPluginSession -> resolveConversation); the byte-exact pre-gate added no correctness fold reconcile (#3641 order-over-hash) doesn't already enforce — it only produced unrecoverable 409s. Now: mismatched first request is adopted, logs one classified warn (#3743 reason taxonomy), publicForkPrefix stays false so the side-lane demotion heuristics keep their normal say. Cost: a divergent child's first request goes out unfolded — a one-time token spike, never corruption. Gate stays one-shot (stats.requests > 0 bypasses it).
📦 Built Package ArtifactBranch: Option A — Install this exact build (recommended)npm install -g billion-context@0.0.4452-pr.3757.22b6935This exact version is immutable and reproducible. The rolling Option B — Download artifact
tar xzf billion-context-pr3757.tgz
npm install -g packageInstall instructions are refreshed on each push. |
…3757 review) The HASH PARITY CONTRACT still described the pre-#3757 behavior (409 FORK_PREFIX_CONFLICT, permanently poisoned child). A mismatched first request is now adopted with a classified warn; the real cost of hash drift is losing the verified-prefix fast path plus one unfolded first request.
#3757 review) Inverting the 409 sub-cases removed the only coverage of the hash-drift-under-same-id and ref-broken verdict branches (including #3743's fix that a pruned ref reports ref-broken alone, never hash-drift). Pin both directly against publicForkInputCheck with negative assertions so a future classifier regression cannot ship silently behind the advisory warn.
…review) lane-guard pairing for the handle.ts lane-adjacent edit, with real coverage: a drift-mismatched first request that is a declared side call (dsh title-gen shape) must be adopted AND still diverted to the #388 passthrough without touching child kernel state — reachable only after the gate stopped rejecting.
(ai: vllm-qwen/qwen3.8-27b) 查重:不重复。 独立复核:按 fork prefix / FORK_PREFIX_CONFLICT / adoption 检索 open+closed issue——只有已关闭历史家族(#2399/#2403/#2625/#2394/#2383)、已合并的诊断 PR #3743、本 PR;近期 15 个 open PR 无一触碰 fork 门或 side-lane 区域(#3745 标题里的「(#3741)」是平台编号撞车,那条是 delegate-wait 措辞,不相关)。 标签: bug / dsh / pi / opencode / scope/kernel / p2 —— fork 子会话卡死是真实缺陷家族,机制在会话核心的 fork 继承路径;受影响宿主是全部三个 plugin fork 家族(dsh/pi/opencode);整体可用但个别会话永久死掉、可新建绕行 → p2(与 #3743 triage 一致)。 审核结论(八问)
审核中发现的问题与处置(均已直接修掉,3 个标注 commit 已推到 fix/fork-prefix-advisory,当前 head d1da179)
行为变更披露(旧 → 新)旧:首请求前缀失配 → HTTP 409 验证状态本地定向:typecheck 干净;tests/plugin-fork.test.ts 49/49(含新增 1)、tests/fork-side-request-lane.test.ts 2/2(含新增 1)、dsh-fork-adopt + pi-omp-fork-adopt 42/42。全量交远程 CI(d1da179a5 上运行中,出结果后跟进)。 判定:技术可合——方向正确(移除产生缺陷的机制而非掩盖症状)、回归清点干净、测试有牙。唯一拦点是第 7 问:PR 引用的「owner 决策」记录在所有公开线程中找不到,请确认或在此明确 sign-off;CI 转绿后人工合并即可。 小注:PR 描述写「src/server/handle.ts,净 -6 行」,-6 实为整个 PR 的净值(handle.ts 因注释块展开自身略增)。 |
(ai: vllm-qwen/qwen3.8-27b) CI 跟进(上条回复承诺的):给 PR 加了 结果:全绿。
最终状态:CI 全绿 + 本地定向验证全过 + 回归清点干净。唯一待办仍是上条第 7 问——PR 引用「owner 在 #3741 拍板」,但公开线程里找不到这条决策记录;请确认或在此明确 sign-off advisory 方向后即可人工合并(合并由你操作)。 |
📦 Merged Build PublishedThis merge to master was published as npm install -g billion-context@0.0.588-master.a8853fe # this exact build
npm install -g billion-context@master # always the newest merged build
|
ai: zhipuai-lb/glm-5.3
Fixes #3741(保守档,基于已合并的 #3743 分类诊断实现,owner 在 #3741 拍板)。
一句话:fork 子会话的首请求与继承前缀不匹配时,不再 409 卡死——照常收养,打一条带分类的 warn。
为什么拆这扇门
改动(src/server/handle.ts,净 -6 行)
loggerLog warn+return true收养;warn 带 [PR] fix: classify FORK_PREFIX_CONFLICT rejections instead of failing blind (#3740) #3743 分类 reason(id-drift / hash-drift-under-same-id / prefix-longer-than-incoming 等)+ protocolpublicForkPrefix漂移时保持 false:side-lane 降级启发照常发言,不让未经证实的前缀一票否决测试(tests/plugin-fork.test.ts 翻转,48/48 绿)
三种漂移形态(语义改写/重排/过短重放)全部:200 + 转发增长 + 父会话 parentRevision 不动 + 子会话 revision 前进 + 恰一条 warn(one-shot 语义钉死)+ 后续请求正常。dsh-fork-adopt 42/42、pi-omp-fork-adopt 含在内全绿,tsc 干净。