Repository navigation
[PR] fix: preserve main folds across expanded short Responses requests - #3845
ranxianglei merged 3 commits into
Conversation
|
ework接单 |
[bot] 🏷 (ai: vllm-qwen/qwen3.8-27b) 查重: 不重复。 本 PR 直接修复来源 issue #3844(Codex Desktop 上短 Responses 请求被 codec 展开后突破 fold-reconcile 的 short-pass 守卫,反复累积 zombie-reap 证据、收割主会话折叠块)。检索 open+closed issue/PR:fold-reconcile 家族在途 PR 有多个(#3734 host rewind/tail truncation、#3316 wire-shape flip 重锚、#3257 增量快路径),但没有任何一个处理「多 part 展开击穿 10-core 守卫」这个机制——症状(主会话块被误收割)与机制(入站 item 数 vs 投影 core 数失配)均不同于上述条目。同一生产事故的另一半(本地 413 后 over-window probe 重开)已由独立 PR #3867 跟踪,与本 PR 无耦合。 标签: bug + codex + scope/kernel + p1(理由:缺陷类;issue 环境为 Codex Desktop/Responses 流量;改动域是上下文管理/会话核心逻辑的折叠对账;p1——主会话压缩块被反复误删属核心承诺失灵类,生产已实际发生)。 初审进展(结论稍后按结构化八问给出):
|
…he openai/anthropic/google wires too (ranxianglei#3844) ranxianglei#3642's canonical per-part granularity defeats the projected core-count guard (SIDE_REQUEST_MAX_MSGS) on every codec, not just Responses: a few multi-part inbound items project into dozens of cores, so repeated short passes accumulate zombie-reap evidence against the main conversation's folds. Extends this PR's inboundMessageCount option to the three sibling wire sites (same two-line pattern as prepare-responses) so a pass whose RAW inbound cardinality is below the side-request threshold can no longer supply deletion evidence on any wire. Adds a both-directions regression per wire (ranxianglei#3617): uncounted expanded short passes reap the main fold (pre-fix behavior); counted passes take no evidence across four passes (byte-identical state), retain the block, and resending main history restores coverage with zero missing.
|
(ai: vllm-qwen/qwen3.8-27b) Added one commit ( Why: #3642's canonical per-part granularity defeats the projected core-count guard on every codec, not just Responses. What changed: the same two-line pattern as Tests: Validation: fold-reconcile 68/68, fold-drift + preflight-fail-fast 16/16, typecheck clean; full-suite verdict left to CI. No kernel, configuration, or version changes. |
(ai: vllm-qwen/qwen3.8-27b) Review 完成。结论:可合(待 CI 绿);我在 PR 分支上补了一个 commit( 八问:
质量判定:PR 本身质量高——三层回归(直接 reconcile / kernel inactivity-recovery / 完整 HTTP pipeline)是真测试且有牙(快照字节相等断言、原代码确实挂断言);guard 语义保真;diff 干净(单 commit,4 文件,每行都为目的服务)。唯一缺口就是三兄弟 wire 的同款路径,已直接补齐(本地验证:fold-reconcile 68/68、fold-drift+preflight-fail-fast 16/16、typecheck 干净;全量交给 CI)。CI 绿后可合。 |
(ai: vllm-qwen/qwen3.8-27b) 接单后先把 CI 的两个红项查清了。结论:与这个 PR 无关——是 master 自身 10-19 起就红的两个静态门禁,拖红了所有 PR;已有专门修复在途(#3871,全绿),等它合入后我把本 PR rebase 到新 master 即可全绿。 证据(本地复现,两个树各跑一遍门禁脚本):
处置(先查重再动手): #3870 已立项记录此事,#3871 就是对应修复(去掉孤儿 export + 重新生成文档表删掉 4 行旧行),其 CI 40 项检查全绿(含 docs-sync、unused-exports 和全部 test lane)。按「一个红 master 通常只有一个根因」的规则,本 PR 不叠加同样的修复 commit,避免与 #3871 的 diff 撞车。 八问(本轮增量,未变项沿用上一轮完整八问):
判定: 本 PR 代码完备、独立可合;当前唯一阻塞 = #3871 待人工合并。#3871 合入后我立即 rebase 本 PR 到新 master 并确认 CI 全绿,然后交你合并。 |
(ai: vllm-qwen/qwen3.8-27b) 状态确认(无新变化):刚查过 #3871 仍为 open(未合并),master 仍在 等 #3871 人工合并后我立即执行:rebase 本 PR 到新 master → 本地定向测试 + typecheck → 推送 → 确认 CI 全绿 → 交你合并。无需你做任何事。 |
📦 Merged Build PublishedThis merge to master was published as npm install -g billion-context@0.0.632-master.24965f3 # this exact build
npm install -g billion-context@master # always the newest merged build
|
Fixes #3844
Six Responses input items with multiple text parts expand past the existing short-pass guard and can accumulate zombie-reap evidence against the main conversation. Preserve the inbound item count before codec expansion and use it alongside the projected count when deciding whether reconciliation can observe history deletion.
Adds direct reconciliation, kernel inactivity/recovery, and complete HTTP pipeline regressions. Four short passes retain the main blocks and coverage, and resending main history restores active folds. Existing full-history deletion controls remain covered. No kernel, configuration, or version changes.
Related: #2231, #2707.
Validation on master
85c27f0e:The Responses preparation path applies in both plugin and proxy modes; the guard only prevents short passes from supplying deletion evidence. It does not bypass compression or rewrite signed content. Full-suite verdict is left to GitHub CI. The separate 413 retry fix is independent.