Repository navigation
[PR] fix(server): warn once per session/route when autoFoldTargetTokens clamps inert (#4543) - #4777
ranxianglei wants to merge 8 commits into
Conversation
(ai: vllm-qwen/qwen3.8-27b) 查重: 不重复。 与 #4573 同属父 issue #4543 但机制不同——#4573 修的是出站 egress-gate 的校准计算(calibrated CJK text at final egress),本 PR 修的是 auto-fold arming-state 可见性(显式 target ≥ 路由溢出线时静默失效、无任何提示)。一个 issue(#4543)按 checklist 管理两个机制面、各自独立成 PR,符合「同症状同一 issue、异机制可分 PR」的政策,且两者无合入顺序依赖,不构成拆片。 标签: 初审发现——分支已过期,需 rebase 后重验:
已核验(对 master 现行语义):警告条件 计划:rebase 到当前 master → 最小移植(只抽 |
…amps inert (#4543) An explicit autoFoldTargetTokens at or above a route's overflow bar is clamped to the bar, which leaves growth folding silently disarmed on that route (only overflow folds run). noteAutoFoldIgnored only covers the disabled-chain no-op, so this state had no surfacing at all — an operator believes the pre-forward fold is armed when it is not (#4543 floor-1 finding). Warn once per session per distinct route bar from preflightCompressIfNeeded, naming both the configured value and the route's overflow target plus the remedy. Logging only — zero behavior change. Throttle marker rides session.metadata so a mid-session route switch re-warns for the new bar.
… mitigation pointer (#4543) CONFIGURATION.md en+zh under compress.externalSummary/autoFold: state that the target clamps per-route and arms only while strictly below the overflow bar, that the one-time warning names both values, and how to set one global target for mixed-width routes; point CJK-heavy long-session operators at this rail as the documented mitigation for fold-loss amplification across mid-session model switches (#1921/#3301/#3849).
0454af6 to
058cdc1
Compare
(ai: vllm-qwen/qwen3.8-27b) 冲突已解决:已 rebase 到当前 master( 解了什么
验证(定向): 收敛说明:另一冲突处理实例几乎同时独立完成了功能等价的 rebase(两棵树的唯一差异是一行 八问
结论:冲突已解、已推送、本地定向验证绿;待远程 CI 全量绿后可合并(人工合并)。 |
(ai: vllm-qwen/qwen3.8-27b) 审核完成——结构化八问(对 rebase 后的推送 head
验证证据:
查重结论(首回复已给,此处留痕):不重复——与 #4573 机制不同(egress-gate 校准计算 vs arming 可见性),已核验 #4573 只碰 收工判定:代码审核通过,未发现阻塞问题;分支已在 master tip、定向验证全绿。待 CI 全量绿灯后可人工合并(agent 不合 PR)。CI 结果出来我再补一条。 |
(ai: vllm-qwen/qwen3.8-27b) 状态补报:审核期间分支被并行会话预防性 merge 了 origin/ci-fixes(1fa9373)以避开 master 红簇继承(已在 #4599 留痕),新 head |
(ai: vllm-qwen/qwen3.8-27b) 收工说明(唯一待办 = CI 裁决):审核与全部本地验证已完成,现在卡的是舰队级 runner 拥塞——不是本 PR 的问题:master |
📦 Built Package ArtifactBranch: Latest build — install this exact versionnpm install -g billion-context@0.0.9531-pr.4777.1ea443eThis exact version is immutable and reproducible. The rolling Recent builds (commit → version)
Download artifact
tar xzf billion-context-pr4777.tgz
npm install -g packageInstall instructions are refreshed on each push. |
(ai: vllm-qwen/qwen3.8-27b) 冲突已解决(attempt 2/2),分支已恢复可合并状态。 发生了什么:上一轮把 ci-fixes 并入分支后,master 又前进了 28 个提交(#4832 zstd fork 门控、#4815 compress breaker、#4802 429 governor、#4807 ref chokepoint、kernel 0.0.166 等),本 PR 再次变 dirty。本次冲突面与 PR 自身改动无重叠。 结构化八问
状态:merge commit |
[bot] (ai: vllm-qwen/qwen3.8-27b) 进程卡住 31 分钟被强制重启,现在恢复工作。当前状态核对:PR #4777 仍 open,head |
…tempt 3 — docs moved to docs/, caveat re-applied there)
[bot] (ai: vllm-qwen/qwen3.8-27b) 阶段性成果:冲突已解、已推送,CI 在新 head 上跑。 做了什么
状态:新 head |
[bot] (ai: vllm-qwen/qwen3.8-27b) 本轮收工报告——冲突已解、已推送、本地定向验证全绿;CI 全矩阵在新 head 上跑(当前 7 绿 / 8 进行中 / 0 红)。 结构化八问
验证证据: 状态:mergeable=True,mergeable_state=blocked(等必需检查)。CI 出全量结果后按 #4599 纪律判继承/自有,有红即修;全绿则待 owner 人工合并。 |
[ework] CI fix verified green ✓ |
1 similar comment
[ework] CI fix verified green ✓ |
(ai: vllm-qwen/qwen3.8-27b) APPROVE — clean, single-mechanism, logging-only fix; verified end-to-end on head Justification
结构化八问
收工判定:APPROVE——代码审核通过,未发现阻塞问题,无小发现需要顺手修。分支在 master tip、定向验证全绿、CI 全绿,待 owner 人工合并(agent 不合 PR)。 |
[bot] 🏷 (ai: vllm-qwen/qwen3.8-27b) 收工汇报——本 PR 审核已完成,结论 APPROVE(完整审核 + 结构化八问见上一条评论,comment 80266)。 做了什么
状态:审核通过,待 owner 人工合并(agent 不合 PR)。 |
Refs #4543 — floor-1 finding: an explicit
autoFoldTargetTokensat or above a route's effective overflow bar is clamped to the bar, which leaves growth folding silently disarmed on that route (only overflow folds run).noteAutoFoldIgnoredonly covers the disabled-chain no-op, so this state had no surfacing at all — an operator believes the pre-forward fold is armed when it is not.What changes
src/server.ts(preflightCompressIfNeeded): one-time warning when the configured target is at or above this route's overflow target, naming both values plus the remedy; throttled once per session per distinct route bar viasession.metadata.autoFoldInertBarWarned(a mid-session route switch re-warns for the new bar).tests/external-summary-autofold.test.ts: two gate tests, both directions (Test Blind Spot Retrospective: Reinforcing Negative Assertion Discipline, Tightening Fake Upstream Strictness, Thin Inst | 测试盲区复盘:补反向断言纪律、假上游严格化、薄安装冒烟、形态矩阵与生命周期覆盖 #3617): positive (target above the route bar ⇒ exactly one warn across two turns, throttled) and negative (target below the bar ⇒ zero warns).CONFIGURATION.md+CONFIGURATION.zh-CN.md(en/zh in sync): per-route arming caveat undercompress.externalSummary/autoFold, plus a pointer for CJK-heavy long-session operators at this rail as the documented mitigation for fold-loss amplification across mid-session model switches (Fold-state reconciliation: classify resent-history divergence (edit/fork/new/system-only) and make compression blocks re-anchorable chain units #1921/After an interleaved metadata refresh, the entire history of the same session is resent in a different form, and already-collapsed content fails to re-anchor. | interleaved 元数据刷新后,同一会话整段历史换形态重发,已折叠内容 re-anchor 认不回来 #3301/[Bug] Mid-session wire/dialect switch leaves a permanent unmatched-id residual that rides the wire unfolded and taxes the prefix cache every turn (v0.1.201) #3849).Behavior change disclosure
OLD: silent inert state. NEW: one
[external-summary] auto-fold INERT on this route: …warn line per session per distinct route bar. Logging only — zero behavior change (no config schema, wire, persistence, kernel, or default-value changes). The implicit half-window default can never be inert (overflow/2 < overflow), so only explicitly configured targets can trigger the warning; no healthy deployment gains noise — only sessions already sitting in the silent-inert state this PR exists to surface.Why a separate PR from #4573
#4573 fixes the egress-gate facet of #4543 (calibrated CJK text at final egress) and explicitly scopes out arming-visibility work. This is a distinct mechanism — arming-state visibility/logging, not egress-gate math — and shipping it separately keeps #4573's two-file diff intact. One issue (#4543), facets managed as its checklist.
Verification
node --import tsx --test tests/external-summary-autofold.test.ts→ the two new tests green; local failures 2/7/8 reproduce identically on clean master (environment noise; full-suite verdict = CI lanes).npm run typecheckclean.