Skip to content

[PR] fix: pause compression nudges when folds stop shrinking the session - #5092

Open
ranxianglei wants to merge 17 commits into
masterfrom
2026-10-29_net-progress-guard
Open

ranxianglei wants to merge 17 commits into
masterfrom
2026-10-29_net-progress-guard

Conversation

@ranxianglei

@ranxianglei ranxianglei commented Oct 29, 2026 •

Copy link
Copy Markdown
Owner

Closes #5058

What this fixes

Companion-style long sessions (hundreds of turns, days) hit a pure positive feedback loop in plugin mode: every nudge round ends in a successful compress whose own action cost (tool-call args incl. summary text, receipts, turn reasoning — all persisted by the host and re-sent next turn) outweighs what the fold removed. The kernel's baseline reset after each successful commit makes the next nudge due another flat 50K step later, and the action re-trips the growth gate — no convergence. In the reported session (0.1.208, dsh-native, deepseek-flash 750K window) that walked the host's local store to 30 MB / 24,051 events until dsh's pre-send overflow guard refused everything locally: no provider error, so no automatic recovery anywhere could fire, and the session was permanently bricked.

Every standing guard misses this shape by design:

How it works

New src/net-progress-guard.ts adds the trajectory view:

  • Baseline at each successful fold commit (recordNetProgressBaseline, src/stream.ts): live-view token total + rendered post-fold estimate, both from the same kernel counter over the same request (postCtx≈0 的退化折叠会摧毁缓存前缀(shrink 287%/129%,cache ceiling ≥0%) #1911 same-space discipline). A new fold opens a fresh evidence window; strikes reset.
  • Round check once per nudge-carrying request (evaluateNetProgressRound, src/server/handle.ts, inside the existing !selfHealRoundDone && prepared.nudge !== undefined block): the client's raw resend (countMessageTokens over prepared.originalMessages) below pre-fold-level-minus-margin (NET_PROGRESS_MARGIN_TOKENS = 25_000, half the flat step — absorbs estimator noise and the one-round materialization lag where the post-compress re-request still carries the unfolded history, fix: net post-compress usage credit + hand launcher context windows to the proxy (#252) #252) counts as progress and resets; otherwise a strike. NET_PROGRESS_STRIKE_LIMIT = 2 consecutive non-progress rounds arms.
  • Remedy: nudge suppression through nudgeInjectionBlocked(session) (the 会话卡死自愈机制:卡死模式检测与代理侧主动补救 #2155 predicate OR'd with this latch) at all four lane gates — the decide-ladder fallback punch-through is preserved (same dsh上下文700K不触发压缩 #3004 deadlock guard as D1). Latch state { baseline, expectedFloor, strikes, armedAt } kept PROCESS-LOCAL in a WeakMap keyed by the session object — never persisted: persist serializes session.metadata into the state file, and this guard fires on every successful fold commit, so a persisted latch would drift the byte-for-byte storage goldens on every long session ([PR] Warn when the outbound bili tool set flips mid-session (#4789) #4790 precedent, same mechanism family). Wall expiry reuses SELF_HEAL_SUPPRESS_CAP_MS (10 min); any real reduction lifts it early; an evicted-and-reloaded session re-seeds silently (a fresh arm needs one more successful fold plus at most 2 non-progress rounds). Evaluate runs while suppressed so recovery can be observed.
  • Observability: armed state on /__bili/sessions (netProgress) + Web UI badge ("swelling"); arm/recovery/expiry log [net-progress] lines with the observed-vs-baseline numbers and rotate-to-fresh-session advice.

Docs: CLIENTS.md (en+zh) dsh section documents the overflow-wall failure mode, the known refusal wording for host-side detection regexes, and the mitigations (rotation / compress.nudgeGrowthTokens / file-size watch / #5052 pointer); TECHNICAL-NOTES.md records the constants beside the #2155 section.

Behavior change (old → new)

Sessions whose folds stop shrinking them now get their compression nudges PAUSED after two consecutive non-progress rounds (old: nudges continued forever, each compress enlarging the session further). The pause lifts on the first round that demonstrably reduces the context below pre-fold-level-minus-margin, or after 10 minutes wall-clock. Healthy sessions are unaffected: any fold buying back more than ~25K tokens of growth counts as progress immediately. This is a suppression (the decide ladder's fallback escape still punches through one legacy advisory), not a removal of the compression surface.

Config surface

None. Two named module constants by design (#2155 precedent: guard thresholds are internals, not operator knobs). Operators who want a lazier cadence for companion sessions already have compress.nudgeGrowthTokens.

Verification

  • Local targeted: new suite tests/issue5058-net-progress-guard.test.ts (strike state machine, boundary, wall cap, fresh-window reset, corrupt-state tolerance, OR semantics vs the 会话卡死自愈机制:卡死模式检测与代理侧主动补救 #2155 latch) + tests/issue2155-self-heal.test.ts + tests/lane-decisions-matrix.test.ts + tests/web-i18n.test.ts — all green (123 tests); typecheck clean; build clean (dist-external OK). Full-suite verdict from CI on this head.
  • Version-first triage: v0.1.208 carries the identical standing-guard set; nothing in v0.1.208..HEAD changed nudge gating — the spiral was reachable in the reporter's build exactly as analyzed.

Out of scope (tracked separately)

CI fix after first push (head b88abf4 was red)

The first commit stored the latch in session.metadata, which persist serializes into the state file — every long-session storage golden drifted its persisted-state digest deterministically on all three CI platforms (six red test shards: storage-engine-proofs full-mode restart x4 wires + golden-storage-render x4 wires; master itself green). Follow-up commit 3f4b7efe3 keeps the state process-local (WeakMap keyed by the session object, #4790 precedent) and adds a regression pin asserting session.metadata stays untouched across every mutation path. Behavior delta vs the first commit: the latch no longer survives a proxy restart (it self-expires within 10 min anyway), and the /__bili/sessions netProgress badge shows live sessions only.

ci-check added 2 commits October 29, 2026 10:29
…5058)

Companion-style long sessions hit a pure positive feedback loop: every nudge round ends in a successful compress whose own action cost (tool-call args, receipts, reasoning — all persisted by the host and re-sent next turn) outweighs what the fold removed, so the flat-50K growth gate re-arms forever and the session walks past its window while every standing guard stays silent (the #2748/#3322 gate judges one commit in isolation, the #2146 breaker counts failures, #2155 D1 needs reductions to STOP landing, #3461 covers host emergency injections only).

Add the cross-round trajectory view: recordNetProgressBaseline at each successful fold commit (live-view tokens + post-fold estimate, same kernel counter space per #1911); evaluateNetProgressRound once per nudge-carrying request compares the client's raw resend against pre-fold-level-minus-margin (25_000 = half the flat step). Two consecutive non-progress rounds latch a per-session nudge suppression through nudgeInjectionBlocked at all four lane gates (decide-ladder fallback punch-through preserved, #3004 deadlock guard shared with D1); any demonstrable reduction lifts it early and the SELF_HEAL_SUPPRESS_CAP_MS wall cap bounds silence. Armed state surfaces on /__bili/sessions (netProgress) and as a Web UI badge; arm/recovery/expiry log [net-progress] lines.

No config surface — constants by design (#2155 precedent). Tests: tests/issue5058-net-progress-guard.test.ts (strike state machine, boundary, wall cap, fresh-window reset, corrupt-state tolerance, OR semantics against the #2155 latch).
)

CLIENTS.md (en+zh): the pre-send local refusal failure mode for long-lived plugin-mode sessions (dsh's overflow guard measures its own unpruned local store, so once it exceeds the window no traffic reaches bili and no automatic recovery can fire), the known refusal wording for host-side detection regexes, and the rotation / nudgeGrowthTokens / file-size-watch mitigations plus a pointer at #5052.

TECHNICAL-NOTES.md: net-progress guard constants and semantics (baseline/strike/margin/wall-cap), alongside the #2155 self-heal section.
@github-actions

github-actions Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

📦 Built Package Artifact

Branch: 2026-10-29_net-progress-guard (6ebe4a4)

Latest build — install this exact version

npm install -g billion-context@0.0.12299-pr.5092.7d59180

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
6ebe4a4 billion-context@0.0.12299-pr.5092.7d59180 build
187799f billion-context@0.0.12182-pr.5092.fcd6929 build
5b41ab3 billion-context@0.0.10651-pr.5092.8224591 build
e5d9251 billion-context@0.0.10296-pr.5092.1655d35 build
86eda53 billion-context@0.0.10287-pr.5092.91ae019 build
cd894af billion-context@0.0.9224-pr.5092.541403b build
c539dd1 billion-context@0.0.7163-pr.5092.7e06930 build
d17689b billion-context@0.0.6938-pr.5092.c90e582 build
a18a925 billion-context@0.0.6925-pr.5092.a90b116 build
f5d3410 billion-context@0.0.6915-pr.5092.fa6aaa2 build

Download artifact

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

Install instructions are refreshed on each push.

@ranxianglei ranxianglei changed the title fix: pause compression nudges when folds stop shrinking the session [PR] fix: pause compression nudges when folds stop shrinking the session Oct 29, 2026
@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

查重:不重复。 本 PR 是 #5058(陪伴类长会话 nudge 自我放大直到超窗永久报废)的修复单;open+closed issue/PR 全量检索无同机制的并行工作(跨轮净进展守卫 / nudge 暂停)。相关条目:#5033(同死锁模式不同机制,不并案)、#5052(关联功能请求)。

这是已提交的修复 PR(#5058 线程 floor 27),按规则不重做 —— 现在做独立审核:重新通读全量 diff、审既有行为回归、本地定向测试、核对 pushed head 的 CI 状态。完成后按结构化八问回复结论。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

进度汇报(进程曾被重启,已恢复继续):独立审核进行中。已完成:通读新模块 src/net-progress-guard.ts(140 行)与全部接线 diff(handle.ts / stream.ts / lane-decisions.ts / prepare-*×4 / web 三件)。正在核实一个关键前提 —— 「基线与轮次测量同 token 空间」:stream.ts 的基线记在 ctx.messages(按 #3307 注释是压缩后出站视图),而 handle.ts 的轮次测量用的是 prepared.originalMessages(客户端原始重发);正在追主循环 ctx.messages 的实际填充来源,确认两者是否可比。之后:测试有效性审查、本地定向测试、CI 状态核对,最后按八问给结论。

ci-check added 2 commits October 29, 2026 14:13
recordNetProgressBaseline ran on EVERY successful fold commit and wrote
session.metadata["netProgressGuard"]; persist serializes session.metadata
into the state file, so every long-session storage golden drifted its
persisted-state digest deterministically on all three CI platforms (the six
red test shards at b88abf4: storage-engine-proofs full-mode restart x4
wires + golden-storage-render x4 wires).

The latch now lives process-local in a WeakMap keyed by the session object
(#4790 precedent - same mechanism family, same fix shape): entries die with
their session object, an evicted-and-reloaded session re-seeds silently,
which is harmless because the latch self-expires within
SELF_HEAL_SUPPRESS_CAP_MS (10 min) anyway, and a fresh arm needs one more
successful fold commit plus at most NET_PROGRESS_STRIKE_LIMIT non-progress
rounds. /__bili/sessions netProgress reads the live store (badge visible
while the session object is live; disk rows do not badge). Adds a regression
pin asserting session.metadata stays untouched across every mutation path.
@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

CI 红已修复,全车道绿。 最终 head ddf42e422(修复 3f4b7efe3 + merge master 的 README 同步),30 checks / 0 失败:11 个 test shard(ubuntu-22/24 × windows-22)+ static-gates + e2e 车道全过。

八问:

  1. 是什么问题:PR 首推(b88abf4be)CI 六个 test shard 红——不是继承性失败(master 6b298c3 全绿、ci-fixes c24c303 ⊂ master),是 PR 自己把新 guard 的状态写进了会被持久化的 session.metadata,导致两套字节级存储 golden 确定性漂移。
  2. 什么原因导致的:persist 把整个 session.metadata 序列化进 state file;而 recordNetProgressBaseline 在每次成功 fold commit 无条件写 netProgressGuard → 每个长会话 golden 的 persisted-state digest 与 committed goldens 对不上(storage-engine-proofs full-mode restart ×4 wire + golden-storage-render ×4 wire,正好 6 个红 shard)。层次判断:用户可见症状是 CI 红,直接原因是 golden digest 漂移,根因是「易失运行时状态被写进持久化文档」——与 [PR] Warn when the outbound bili tool set flips mid-session (#4789) #4790(tripwire 把 toolsetFp 写进 metadata,改进程内 WeakMap 修掉)同一机制族。本地复现拿到与 CI 完全一致的漂移值后动手。
  3. 影响范围与严重程度:仅影响本 PR 分支的 CI;未合入、不影响任何已发布版本或运行中的用户。修复对运行行为零影响(状态机逻辑一字未动,只换存储位置)。
  4. 怎么修复的:guard 状态从 session.metadata["netProgressGuard"] 改为按 session 对象键控的进程内 WeakMap([PR] Warn when the outbound bili tool set flips mid-session (#4789) #4790 同款修法):条目随 session 对象消亡,evict 后重载的会话静默重播种;补了回归钉断言所有 mutation 路径下 session.metadata 保持不被触碰;/__bili/sessions 的 netProgress 改读 live store;TECHNICAL-NOTES.md 同步更正。
  5. 是否有回归问题:无。审过的既有行为:nudge 抑制状态机(strike/arm/reset/wall-expiry)不变——PR 自带套件 10/10;会话卡死自愈机制:卡死模式检测与代理侧主动补救 #2155 self-heal、lane-decisions(矩阵 + B 类)、web-sessions 套件全绿(定向共 163 pass / 0 fail);typecheck 干净;原先红的两套存储 golden 本地与 CI 均转绿。无阈值/时序/输出格式漂移。
  6. 是否破坏缓存:不涉及前缀缓存/重试/去重键;恰恰相反,是把一个新增的易失字段从持久化文档里移除,恢复「full-mode restart 不可见」的既有不变量。
  7. 是否改了设计方向:否。guard 机制(fold 基线 → 连续 2 轮无净进展 → 抑制 nudge → 10 分钟 wall cap / 真实缩减提前解除)完全不变,只改状态存放位置。
  8. 是否引入新配置:无(仍是 constants by design,同 会话卡死自愈机制:卡死模式检测与代理侧主动补救 #2155)。

行为变更披露(本 PR 两个 commit 之间,旧值→新值+原因):latch 状态原设计随 session.metadata 持久化、跨代理重启存活 → 现改为进程内、重启即失。原因:≤10 分钟的易失 latch 不应进入持久化文档(否则每个 fold 都破坏存储 golden 契约);丢失的最坏代价是一次重启后需再一次成功 fold + 至多 2 个非进展轮重新武装,而 latch 本身 10 分钟墙钟到期自动解除。连带:/__bili/sessions 的 swelling 徽章只对 live 会话显示(磁盘行不再显示)。PR 描述已同步更新该段。

验证链:本地复现红(digest 漂移值与 CI 一致)→ 修复后定向套件绿 → push → 远端 CI 全绿(判定以 CI 为准,本地未跑全量)。结论:可合并(请人工合并 #5092 );#4599 已留一行结论。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

这条失败通知是过期重复转发,无需再修。 它指向的 head 仍是 b88abf4be(run 40807262654,即修复前的旧 head)——该失败已在本轮 attempt 1 修复:

  • 根因:recordNetProgressBaseline 每次成功 fold commit 写 session.metadata["netProgressGuard"],persist 把整个 metadata 序列化进 state file → 两套存储 golden(storage-engine-proofs full-mode restart ×4 wire + golden-storage-render ×4 wire)persisted-state digest 确定性漂移,正好 6 个红 shard。与 [PR] Warn when the outbound bili tool set flips mid-session (#4789) #4790 同机制族。
  • 修复:3f4b7efe3 把 latch 状态改为按 session 对象键控的进程内 WeakMap(零持久化副作用)+ metadata 不被触碰的回归钉;ddf42e422 另含 master 同步(README-only)。
  • 当前状态(刚核对):分支 head = ddf42e422,镜像缓存显示 30 checks / 0 failed / 0 pending(11 test shards + static-gates + e2e 全绿),分支已包含全部 master 提交(master 未再前进)。

详细八问见上一条回复。结论不变:可合并(请人工合并 #5092 )。不重复开 issue、不做重复修复。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

[bot] 进程被重启前的进度汇报:本 issue 的工作已全部完成,无阻塞。

当前无待办:等人工合并 #5092 。若合并后有新事件(如 owner 评论或新一轮 CI),再按新指令处理。

…in client-resend space

Review corrections for the #5092 guard (two facets of one measurement
integrity defect):

1. Lane scope — plugin lanes only (session.metadata.pluginAgent bound).
Only plugin hosts persist and re-send the compression action itself, so
only there does the resent payload shrink when a fold works. Proxy-mode
clients keep their full local history and re-send it verbatim every
turn; once folded coverage exceeds the 25K margin the raw resend
structurally never drops below pre-fold-minus-margin, so an unscoped
latch would arm on every mature proxy session and silence the flat-50K
nudge cadence (KDD #8) without defending anything. The #5058 swelling
domain is plugin-mode only.

2. Same-space baseline — recordNetProgressBaseline now takes the inbound
RESEND total (stream.ts rawViewTokens — same array class as the round
check counts over prepared.originalMessages) instead of the rendered
live view. Mixing spaces would distort the bar by the reasoning-drop
delta on heavy-reasoning hosts. postCtx stays the rendered post-fold
estimate (diagnostic only).

Tests: proxy-mode negative row (guard stays inert, cadence untouched);
persistence pin updated. TECHNICAL-NOTES.md: lane-scope +
baseline-space bullets.
@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

独立审核结论:方向正确,发现并当场修复两处测量缺陷——其中一处是原实现引入的未披露回归(proxy 模式平 50K nudge 节奏被整体掐灭),已把守卫收窄到插件车道。

diff 全部 15 个文件逐行读过(未沿用 issue 侧结论),四个既有防御机制的漏法逐一验证。

① 方向关 ✅:#5058 根因成立——压缩动作本身(tool-call 参数含摘要全文、回执、回合推理)被插件宿主持久化进历史、每轮重发,fold 省得比动作花得少时纯正反馈不收敛;kernel 每次成功 compress 后重置基线,下一次 nudge 永远再隔一个平 50K 步到来。既有四道防御(#2748/#3322 单轮净收益、#2146 失败断路器、#2155 自愈 D1、#3461 紧急退避)各按设计恰好漏掉这个形状。加跨轮轨迹视图方向对;补救用抑制不用删除,#3004 死锁逃生口保留。

② 回归审计——发现原实现一处未披露回归(已修):baseline 记的是渲染活视图(stream.ts viewTokens),轮次检查量的是客户端原始重发(handle.ts prepared.originalMessages)——两个不同数组类。插件车道宿主重发的就是折叠后历史,两者近似相等,行为正确;但 proxy 模式客户端每轮重发完整本地历史,bili 的 fold 从不缩小它(fold 只缩小发给模型的渲染)→ folded 覆盖一旦超过 25K margin,raw 重发结构性永远落不到 pre-fold-minus-margin 以下 → latch 两轮即 arm → 所有成熟 proxy 会话失去平 50K 主动 nudge 节奏(KDD #8 明确设计决策),只剩 preflight 硬限被动压缩。PR 正文写「all sessions」+「healthy sessions unaffected」,对 proxy 模式不成立;且 10 个单测没有一个钉住调用点的空间/车道接线,CI 全绿也抓不到。修复:守卫收窄到插件车道(session.metadata.pluginAgent 绑定),proxy 恢复原节奏,补负例测试(proxy 会话永不 arm)。

②b 第二处测量空间缺陷(顺手修):即便插件车道内,baseline 也应与观测同一空间(客户端重发量),否则重推理宿主会被 reasoning-drop delta 扭曲门槛。stream.ts 改传 rawViewTokens(与 handle.ts 观测同数组类),postCtx 保持渲染诊断值。TECHNICAL-NOTES.md 同步。

③ 代码关 ✅:状态机逻辑、常量(margin 25K=半步,吸收估算噪声+一轮物化滞后;2 strikes)、wall cap 复用 SELF_HEAL_SUPPRESS_CAP_MS(10min)、与 #2155 的 OR 语义、Web 徽章/i18n 均无问题。作者自推的 3f4b7ef(latch 从 session.metadata 移入进程本地 WeakMap,#4790 先例,修 storage golden drift 红)方向正确,两套 storage 套件本地绿。

④ 测试有效性:单测有牙(严格 < 边界、wall 过期、fresh-window 重置、脏状态容忍),但原本没有覆盖调用点空间/车道接线的测试——②的回归正是从这个缺口漏掉的,已补车道负例。e2e-codex 真客户端套件在 ACP_TEST_E2E=1 之后、CI 默认不跑,此类问题仍依赖人审。

八问:

  1. 是什么问题:插件模式长会话里,当压缩动作自身成本超过 fold 移除量,bili 仍每 50K 催一次压缩,越压越大,直到宿主侧 overflow 硬拒、会话永久不可用([Bug] 陪伴类长会话:compress nudge 自我放大,直到会话超过模型窗口且永久不可恢复 #5058)。
  2. 什么原因导致的:kernel 每次成功 compress 后重置基线,nudge 永远隔一个平步再次到期;既有净收益门只看单轮不看跨轮轨迹,跨轮视角缺失。
  3. 影响范围与严重程度:p1(原 bug):插件长会话完全不可用且无恢复路径。原实现引入的回归(已修):成熟 proxy 会话失去主动 nudge——体验退化,非数据丢失。
  4. 怎么修复的:每次成功 fold commit 记基线;nudge 轮测客户端重发量,连续两轮没低于 pre-fold-minus-margin(25K)则抑制 nudge(非删除,保留 dsh上下文700K不触发压缩 #3004 decide-fallback 逃生);出现真实降幅立即解除,或 10 分钟墙钟自动释放;面板 swelling 徽章可观测。本次追加:作用域收窄到插件车道 + 测量统一为客户端重发空间。
  5. 是否有回归问题:审过的既有行为——平 50K 节奏(KDD feat: release CI (npm auto-publish on release branch) #8):收窄后 proxy 恢复、健康插件会话不变(fold 买回 >25K 增长=立即 progress 重置);会话卡死自愈机制:卡死模式检测与代理侧主动补救 #2155 自愈通道 OR 语义不变(13 测试绿);dsh上下文700K不触发压缩 #3004 decide-ladder 穿透保留;四个 prepare 车道门仅谓词替换(matrix 90/90 绿);存储格式:作者 WeakMap 化后无新字段落盘(golden 两套件绿)。本地定向全绿:issue5058 11/11、issue2155 13/13、issue3004 7/7、lane-decisions-b-class 5/5、matrix 90/90、web-i18n 10/10、golden-storage-render 3/3、storage-engine-proofs 19/19;typecheck clean。
  6. 是否破坏缓存:不影响前缀缓存策略——nudge 注入/抑制不改消息字节;latch 状态进程本地,不落持久化。
  7. 是否改了设计方向:无。纯增量守卫,与既有防御层正交;唯一方向性决定 = 作用域限插件车道(机制真正成立的领域)。
  8. 是否引入新配置:无配置面变更(两个模块常量,跟随 会话卡死自愈机制:卡死模式检测与代理侧主动补救 #2155 先例——守卫阈值是实现内部件,不是操作者旋钮)。面板只读 netProgress 字段为观测输出。

行为披露(old→new):PR 正文称守卫作用于「all sessions」、baseline 为「live-view token total」——修正后实际交付 = 仅插件车道 + baseline = 客户端重发量。原因:proxy 客户端每轮重发完整历史且 fold 不缩小它,套用会纯伤害(KDD #8 节奏被掐);异空间测量在重推理宿主上扭曲门槛。

当前状态与合并判定:修正 commit 本地就绪(定向测试+typecheck 全绿),但推送暂被本环境到 github.com 的网络故障阻塞(Connection reset by peer,含只读 ls-remote 在内多次重试约 10 分钟失败,判断为瞬时出口故障而非凭据问题)。注意:修正第一版 98dc0ba 已推上去,其中新增的 proxy 负例有一个 JS 默认参数坑(undefined 触发默认值)会在 CI 显示 1 红;修正版 6a57f3db4 网络恢复后立即推上并补说明,届时以 CI 为准。CI 绿后建议合并。超范围项 A/B/C(summaryMaxChars clamp / DSH 上游诉求 / compaction 归属策略)已在 PR 正文列出待你拍板,不阻塞本 PR 合并。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

补充状态:到 github.com 的出口网络故障仍在持续(约 25 分钟,只读探测同样失败),修正版 commit 6a57f3db4 仍在我本地工作区就绪,尚未推上分支。当前分支头 98dc0bae2 上那个会红的 proxy 负例测试是 JS 默认参数坑(undefined 触发默认值),6a57f3db4 已修好(本地定向套件全绿 + typecheck clean)。网络恢复后我会立即推上并盯 CI;在此之前请不要以 98dc0bae2 的 CI 结果为准。若故障持续较久,也可由你侧从我的工作区日志跟进——审核结论以上一条八问回复为准。

…inel for unbound fakes

CI (3 shards, same subtest): 'proxy-mode sessions are out of scope' expected no evidence window but got {baseline: 600000, expectedFloor: 120000, strikes: 0}. Root cause is the test helper, not the guard: a JS default argument fires when the passed value IS undefined, so mkSession(undefined) hits the '= "dsh"' default and produces metadata {pluginAgent: "dsh"} — exactly the binding that arms the guard. The implementation already gates on session.metadata.pluginAgent per spec (plugin lanes only), so the proxy-mode row needs a sentinel that survives the signature: null.
@ranxianglei

Copy link
Copy Markdown
Owner Author

(ai: sglang-gpu0/qwen3.8-27b)

CI 三个 shard 全红的是同一条子测试(tests/issue5058-net-progress-guard.test.ts:176「proxy-mode sessions are out of scope and never arm」):期望守卫状态为 undefined,实际拿到 {baseline: 600000, expectedFloor: 120000, strikes: 0}。三个 shard 只是并行跑同一文件,不是三个独立 bug。

根因不在守卫实现,在测试的假会话构造器。 最新提交已经把守卫门控在 session.metadata.pluginAgent 上(只给插件绑定会话 arm,proxy 模式零影响——这个行为本身是对的)。但测试里的 mkSession(pluginAgent = "dsh") 用了默认参数:JS 的默认参数在传进来的值就是 undefined时触发,所以测试想造「无绑定」会话写的 mkSession(undefined),实际拿到的是 {pluginAgent: "dsh"} ——一个带 dsh 绑定的会话。带绑定的会话被守卫记录证据窗是完全正确的行为,于是断言必挂。运行时直接打印了该函数的真实求值结果验证了这一点(mkSession(undefined) 返回 {"pluginAgent":"dsh"})。

修法:测试 helper 改用 null 哨兵(默认参数不会吃 null),两行改动:签名 string | null = "dsh" + 判定 pluginAgent === null ? {} : …,proxy-mode 子测试改调 mkSession(null)。src 零改动,因为插件门控本来就在。

本地验证:node --import tsx --test tests/issue5058-net-progress-guard.test.ts 子测试 11/11 全过(含原本就绿的全部行);tsc --noEmit -p tsconfig.json 零输出干净。

old→new:此前这条本应证明「proxy 模式不 arm」的 CI 行其实一直在 arm 一个 dsh 绑定的假会话;现在它真的构造无绑定会话并证实守卫不碰、nudge flat-50K 节奏不受影响。插件车道行为不变。新提交 4fc74f1,请对新提交看 CI。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

(ai: vllm-qwen/qwen3.8-27b) No new merge needed for this trigger: master has not advanced past the previous sync — live master is still 44067a5bc, which head c539dd161 already fully contains (verified by ancestry), so nothing to push. GitHub now reports mergeable_state: blocked (behind cleared, no conflicts, only pending CI) — this "behind" event was a stale/racy detection from the instant master reached 44067a5bc, before the prior push landed.

…onflicts

Criss-cross merge: 90 conflicted paths resolved master-side (branch carried
foreign copies of master commits; every non-PR conflict verified as pure
master forward progress) with the PR's 15-file delta re-applied verbatim.
Docs retargeted to docs/clients{,.zh-CN}.md + docs/technical-notes.md per
the #5920 move; 4 master-only files dropped by the multi-base merge
(mdrender.ts + 3 tests) restored.
@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

Merge conflict resolved and pushed. 72fe01640f..cd894aff7c on 2026-10-29_net-progress-guard (clean fast-forward push — fetched first, remote head was still at 72fe01640f, no force-push). PR state is now mergeable: true, mergeable_state: behind (was dirty) — "behind" is expected since master moved on, and is not a merge blocker.

What the conflict actually was: the branch history carries foreign copies of master commits (criss-cross — 4 merge-bases), so the merge produced 90 whole-file conflicts, most of them in files the PR never touched. For every non-PR conflicted file I verified the branch side was byte-identical to the last-synced master tip or pure master forward progress (incl. the 3 exceptions src/persist.ts, src/storage/shadow.ts, tests/plugin-fork.test.ts — diff-verified line by line), so all 78 were resolved master-side with zero loss. The PR's real delta (15 files) was re-applied verbatim onto current master for each conflicted file, and every resolved file was diff-checked against master to prove only the PR delta remains.

Two non-obvious things found and fixed along the way:

  1. Master moved the docs (#5920): CLIENTS.md / CLIENTS.zh-CN.md / TECHNICAL-NOTES.md are now one-line redirect stubs. The PR's doc sections were retargeted to their new homes — docs/clients.md, docs/clients.zh-CN.md, docs/technical-notes.md — inserted at the same logical anchors (verified present in the new files, incl. the "D1 above" reference in the technical-notes section). Root stubs take master content.
  2. The multi-base merge silently dropped 4 master-only files (src/web/mdrender.ts + tests/mdrender.test.ts, tests/issue5432-trailing-system-tails.test.ts, tests/snapshot-unified-lifecycle.test.ts) — this is what broke typecheck (Cannot find module './mdrender.js'). All 4 restored from master.

Verification (local, targeted per test discipline): npm run typecheck clean; 134/134 targeted tests pass (tests/issue5058-net-progress-guard.test.ts, tests/lane-decisions-matrix.test.ts, tests/web-i18n.test.ts, tests/issue2155-self-heal.test.ts); zero conflict markers repo-wide; full-suite verdict is left to remote CI on the pushed head. The mirror check-cache was stale (fetched 2026-10-31, no check data), so no red-CI assessment was possible this run — CI will report on cd894aff7c.

八问:

  1. 是什么问题:PR 分支与 master 存在合并冲突(mergeable_state=dirty),无法合并。
  2. 什么原因导致的:分支历史携带 master 提交的"外来副本"(criss-cross,4 个 merge-base),git 对 90 个文件产生整文件冲突;另有 4 个 master 新增文件被多基合并机制静默丢弃。
  3. 影响范围与严重程度:仅本 PR 的合并性;master 与其他分支不受影响;不修则 PR 永远无法合并。
  4. 怎么修复的:78 个非 PR 冲突全部按 master 侧解决(逐一验证分支侧为纯 master 前进/外来副本,零丢失);PR 的 15 文件 delta 逐文件原样重放到当前 master;3 个文档文件按 [PR] docs: batch-migrate 14 root-level documents into docs/ (consolidation + master index + redirect placeholders) | docs: 14 个根级文档一次性迁入 docs/(集中 + 总目录 + 重定向占位) #5920 迁移重定向到 docs/ 新位置;4 个被丢弃的 master 文件恢复。
  5. 是否有回归问题:无。每个解决后的文件与 master diff 过,仅剩 PR 自身改动;typecheck 干净;134 个定向测试全绿;无冲突标记残留。
  6. 是否破坏缓存:不涉及——纯冲突解决,未触碰缓存/重试/游标逻辑。
  7. 是否改了设计方向:不涉及——无架构/数据流变更。
  8. 是否引入了新的配置:不涉及——无新配置项。

收工判定:冲突已清零、推送完成、本地门禁全过,等待 CI 在 cd894aff7c 上跑完全量。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

[bot] 重启后状态复核(上一条完整报告已发出,此处仅确认无未完成项):本地 HEAD 与远端 2026-10-29_net-progress-guard 均为 cd894aff7c,0 个未合并路径,0 个冲突标记——冲突解决已全部落盘并推送,无阻塞、无待办,等待 CI 在该 head 上跑完全量。

…ict resolution

Two add/add conflicts (src/web/mdrender.ts, tests/mdrender.test.ts) resolved
master-side: the branch carried Nov-12 snapshots of these files, master moved
on since, and the PR never intended to touch them.

One criss-cross resurrection fixed: the multi-base merge re-introduced a
152-line block in src/web/sessions-data.ts (parseBlockContentMessages
snapshot machinery) that master had deleted after the branch's last sync.
Rebuilt the file as current master + the PR's 3 hunks only.

Final tree delta vs master = exactly the PR's 15-file contribution
(+571/-19), verified file-by-file.
@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

Second conflict pass done and pushed. cd894aff7c..86eda53178 on 2026-10-29_net-progress-guard (fetched first, remote head was still cd894aff7c, clean fast-forward, no force-push). PR is now mergeable: true, mergeable_state: blocked (was dirty) — "blocked" just means branch protection is waiting on review/CI for the new head; the conflict itself is gone.

What this pass had to deal with (master moved 588 commits since the Nov-12 sync):

  1. Only 2 real conflicts, both add/add: src/web/mdrender.ts and tests/mdrender.test.ts — the branch carried Nov-12 snapshots of these files (restored then after the first merge dropped them), and master has since modified them. The PR never intended to touch either file, so both were resolved master-side, byte-verified against origin/master.
  2. One criss-cross resurrection caught and fixed: the multi-base merge silently re-introduced a 152-line block in src/web/sessions-data.ts (parseBlockContentMessages snapshot machinery) that master had deleted after the branch's last sync — the old virtual merge-base made git see it as "our side added it". Rebuilt the file as current master + the PR's 3 hunks only.
  3. Systematic verification: the final tree delta vs current master is now exactly the PR's original 15-file contribution (+571/−19), file-by-file — no resurrected foreign content anywhere.

Local gates (targeted per test discipline): npm run typecheck clean; 146/146 targeted tests pass (tests/issue5058-net-progress-guard.test.ts, tests/lane-decisions-matrix.test.ts, tests/web-i18n.test.ts, tests/issue2155-self-heal.test.ts). Full-suite verdict is left to remote CI on 86eda53178. (Mirror check-cache still shows the Nov-12 run — all green at that time — so no red-CI item to fix this pass; the blocker was purely the conflict.)

八问:

  1. 是什么问题:PR 分支再次与 master 冲突(mergeable_state=dirty)——master 自 11-12 起前进了 588 个提交。
  2. 什么原因导致的:分支历史携带 master 提交的"外来副本"(criss-cross 多基),多基合并把 master 后来删除的 152 行代码(sessions-data.ts 的快照解析块)当作"本侧新增"复活;另有 2 个文件(add/add)因分支持有 11-12 的旧快照而冲突。
  3. 影响范围与严重程度:仅本 PR 合并性;不修则无法合并;复活代码若漏检会重新引入 master 已移除的行为(潜在回归)。
  4. 怎么修复的:2 个冲突文件按 master 侧解决(逐字节验证);sessions-data.ts 重建为"当前 master + PR 的 3 个 hunk";全树 diff 对 master 逐文件核验,最终恰好等于 PR 原始 15 文件贡献(+571/−19)。
  5. 是否有回归问题:无。typecheck 干净;146 个定向测试全绿;最终树与 master 的差异与 PR 原始贡献逐字节一致,无外来内容残留。
  6. 是否破坏缓存:不涉及——纯冲突解决。
  7. 是否改了设计方向:不涉及。
  8. 是否引入了新的配置:不涉及。

收工判定:冲突已清零、推送完成、本地门禁全过,PR 现为 blocked(等 review/CI),等待 CI 在 86eda53178 上跑完全量。

…le map

The PR added the new src/net-progress-guard.ts module but the architecture-docs
CI guard (tools/check-architecture-docs.mjs) requires every tracked src/ file to
be listed in reference/architecture.md. Adding the missing entry so the guard passes.
@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

CI auto-fix run (attempt 1/6) — done, PR is fully green.

Re-verified the live check state first (the mirror cache was ~2.5h stale, so I used single live API fetches, no polling). The event reported one failing check, but the live state had two:

  1. architecture-docs — a real PR defect. The PR added a new module src/net-progress-guard.ts but never listed it in the reference/architecture.md file map, which the architecture-docs guard (tools/check-architecture-docs.mjs) requires for every tracked src/ file. Fixed: added the one-line entry (placed beside the other compression-pipeline guards), verified node tools/check-architecture-docs.mjs → all green locally, pushed (e5d925190c).
  2. test (windows-latest, 22, 2) — a known flake, not a PR regression. The PR does not touch the abort/teardown/relay path at all; the failure signature (closed=0, ~22s, every sibling cell green) matches the long-documented windows-latest node22 shard-2 flake (runner event-loop starvation). I did not change the test budget (that's a design decision, out of lane for auto-fix) — the remedy is a re-run, which the fresh run provided.

Pushed the fix → fresh run 43795740177. Confirmed live at the end: all 52 checks green (38 success, 14 skipped, 0 failure) — architecture-docs is green and the flake did not recur. mergeable_state: blocked is branch protection (human approvals), not a CI failure.


结构化结论(八问)

  1. 是什么问题:PR [PR] fix: pause compression nudges when folds stop shrinking the session #5092 的 CI 有两个红检查——architecture-docs(真实缺陷)和 test (windows-latest, 22, 2)(已知 flake)。
  2. 什么原因导致的:architecture-docs——PR 新增了 src/net-progress-guard.ts 模块,但没在 reference/architecture.md 文件地图里登记,CI 守卫强制要求每个 src/ 文件都在地图中。test flake——windows-latest node22 shard 2 的 runner 事件循环饥饿,使 abort/teardown 测试的 20s 预算耗尽(closed=0);与 PR 改动无关(PR 完全不碰 abort/teardown/relay 路径)。
  3. 影响范围与严重程度:architecture-docs 是 CI 门禁,不修则 PR 无法合入(阻断级,但对终端用户无功能影响)。test flake 是 CI 偶发,不影响 PR 代码正确性。
  4. 怎么修复的:architecture-docs——在 reference/architecture.md 文件地图补一行 net-progress-guard.ts(放在其他 compression-pipeline guard 旁),本地跑守卫脚本确认全绿后 push。test flake——不改测试预算(属设计决策,超出自动修复车道),靠新 run 重测;flake 未复现。
  5. 是否有回归问题:无。改动只加了一行文档(文件地图条目),不触碰任何运行时逻辑 / 线协议 / 配置 / 持久化。
  6. 是否破坏缓存:不涉及。纯文档改动。
  7. 是否改了设计方向:不涉及。
  8. 是否引入了新的配置:不涉及。

判定:PR 现已全绿(52 checks:38 success + 14 skipped,0 failure),CI 侧无阻塞,可进入人工审批/合并。

@ranxianglei

Copy link
Copy Markdown
Owner Author

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

Review verdict — posted as a comment because GitHub blocks approving one's own PR (PR and token are the same account). Verdict: APPROVE.

APPROVE — clean, well-scoped, well-tested.

This fixes the #5058 companion-session compress spiral: in plugin mode the compress ACTION (tool-call args + receipt + turn reasoning) is persisted by the host and re-sent every turn, so when a fold's savings do not exceed its action cost the session grows unboundedly and the flat-50K nudge re-trips forever with no convergence. The guard adds the missing cross-round trajectory view: after each successful fold it baselines the client's raw-resend level, and two consecutive rounds that fail to drop below baseline−25K latch a per-session nudge suppression (same channel as #2155) until a round demonstrably reduces the context or the 10-min wall cap expires.

Verified against the code:

  • Same-space discipline holds on all three fold paths. Baseline (recordNetProgressBaseline, src/stream.ts:1716) counts ctx.compressMessages ?? ctx.messages; the round check (src/server/handle.ts:3243) counts prepared.originalMessages. Confirmed both are the client's raw resend in every path: relay loop (compressMessages: prepared.originalMessages, src/server/relay.ts:2769), preflight (preflightCompress(deps, prepared.originalMessages), src/server.ts:4292/4308), plugin MCP (compressMessages: mem.original, src/plugin.ts:2494). Same kernel counter (countMessageTokens) on both sides.
  • WeakMap key identity holds. session (src/server/handle.ts:1772) === prepared.session === ctx.session (src/server/relay.ts:2769) — the baseline writer, round checker, and web badge reader all key the same live object; disk rows (minimal SummarySource) correctly miss and don't badge.
  • All 8 injection gate sites switched to nudgeInjectionBlocked (4 prepares × nudgeEligible + suppressionBypassed); no nudgeSuppressed( call sites remain in src outside the two guard modules. The decide-ladder fallback punch-through (dsh上下文700K不触发压缩 #3004) is preserved at every site.
  • Lane scoping is correct. Plugin-lane only — proxy clients' raw resend structurally never shrinks under bili folds, so an unscoped latch would false-arm on every mature proxy session and silence the flat-50K cadence (KDD feat: release CI (npm auto-publish on release branch) #8) for no benefit.
  • Process-local state, never persisted — the WeakMap keeps the volatile ≤10-min latch out of the persisted document (the first commit's session.metadata storage drifted every storage golden; the follow-up fixed it and a regression pin asserts session.metadata stays untouched).
  • Tests are real and green. 11 new tests pin the strike state machine, the strict-below boundary, wall-cap expiry, fresh-window reset, corrupt-state tolerance, OR semantics vs 会话卡死自愈机制:卡死模式检测与代理侧主动补救 #2155, proxy exclusion, healthy-session non-arming, and the persistence pin. Related suites (self-heal, lane-decisions-matrix, web-i18n) green; typecheck clean. CI green on head e5d9251 (16 success / 14 skipped / 0 failed).
  • Behavior change disclosed (old→new) in the PR body; no new config surface (two named constants by 会话卡死自愈机制:卡死模式检测与代理侧主动补救 #2155 precedent); no kernel/ changes.

No small findings to fix on the spot.


结构化八问

  1. 是什么问题:plugin 车道长会话里,compress 动作本身(tool-call 参数 + 回执 + 当轮推理)被宿主持久化并每轮重发;当一次折叠的节省 < 动作开销时会话净增长,flat-50K nudge 永远再触发,纯正反馈无收敛,会话最终超窗、发送前被宿主拦截、永久不可用([Bug] 陪伴类长会话:compress nudge 自我放大,直到会话超过模型窗口且永久不可恢复 #5058)。
  2. 什么原因导致的:所有既有守卫都只看单轮/单空间——手动 compress 仍接受零/负净收益折叠,先改写缓存再提示上下文增长 #2748/[bug] Collapsing the "block range" compress actually doubled the live view size (253→519 msgs) → local estimate blew past the window → preflight permanently fail-fast (while the same payload would have passed upstream at 566K/750K) | [bug] 折叠「块范围」的 compr… #3322 净收益门只判一次 commit 的折叠-vs-摘要 delta;dsh内部问题 出现这个错误后,重启dsh可以发消息 但陷入无限压缩失败 #2146 熔断只数连续失败(成功但净负的折叠会把它清零);会话卡死自愈机制:卡死模式检测与代理侧主动补救 #2155 D1 需要缩减停止落盘(这里每轮都在落盘);Three issues found during real-model stress testing: WS passthrough can't connect — HTTP upstream is guaranteed to die; | 真模型压测发现的三个问题:WS 直通连不上 HTTP 上游必死、超限时死锁+紧急提示风暴、compress 激活本身太重 #3461 只限宿主侧紧急注入。没有守卫测量跨轮重发载荷的轨迹。
  3. 影响范围与严重程度:仅 plugin 车道(session.metadata.pluginAgent 绑定)的长寿命会话;触发条件 = 连续两轮折叠后重发上下文未低于「折叠前水平 − 25K」。健康会话不受影响(任何买回 >25K 的折叠立即计为进展并重置)。修复前该形态 = 会话永久报废(p1 级可用性缺陷);修复后 = 正反馈被打断,nudge 是暂停而非移除。
  4. 怎么修复的:每次成功折叠 commit 时记录客户端原始重发水位为基线(src/stream.ts);每个带 nudge 的请求用同一 kernel 计数器测原始重发(src/server/handle.ts),低于「基线 − 25K」计为进展并重置,否则记 strike;连续 2 轮非进展 → 按会话 latched 暂停 nudge(复用 会话卡死自愈机制:卡死模式检测与代理侧主动补救 #2155 同一抑制通道,dsh上下文700K不触发压缩 #3004 决定阶梯 fallback 穿透保留),直到出现真实缩减或 10 分钟墙钟到期。状态放进程内 WeakMap、绝不持久化。
  5. 是否有回归问题:审过既有行为——8 个注入门位全部从 nudgeSuppressed 换成 nudgeInjectionBlocked(OR 语义,会话卡死自愈机制:卡死模式检测与代理侧主动补救 #2155 单独仍生效,有测试钉住);decide-ladder fallback 穿透保留;proxy 车道完全排除(flat-50K 节奏不变,KDD feat: release CI (npm auto-publish on release branch) #8);存储 golden 不受影响(状态不持久化,有回归 pin);无 fail-fast 变吞错、无阈值/时序/输出格式漂移。无回归。
  6. 是否破坏缓存:不涉及。不触碰前缀缓存/重试/增量游标/去重键;折叠几何与 receipt 不变,只改 nudge 注入门。
  7. 是否改了设计方向:不涉及架构转向。新增一个守卫模块(src/net-progress-guard.ts)并复用既有抑制通道,与 会话卡死自愈机制:卡死模式检测与代理侧主动补救 #2155 同族;文档(clients en/zh + technical-notes + reference/architecture.md 文件图)同步更新。
  8. 是否引入了新的配置:无。两个命名模块常量(NET_PROGRESS_MARGIN_TOKENS=25_000、NET_PROGRESS_STRIKE_LIMIT=2)按 会话卡死自愈机制:卡死模式检测与代理侧主动补救 #2155 先例属内部件、非 operator 旋钮;想要更懒节奏的 operator 已有 compress.nudgeGrowthTokens。

判定:APPROVE,可合并。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[bot] 🏷 Review of PR #5092 (head e5d925190) is complete — verdict: APPROVE.

Full justification + 结构化八问 are in the review comment above (posted as a comment because GitHub blocks approving one's own PR — same account owns the PR and the token).

What was verified:

No small findings to fix on the spot. Ready for merge.

One note: the review-lane dispatch asked for a one-line report on a "coordination issue" — no such issue was identifiable from my context, so if one exists, point me at it and I'll post the line there.

…} conflict

Both sides added different dsh sections at the same anchor: PR #5058 (long-running-sessions wall + net-progress guard) and master (DSH Go host). Kept both (union of intent), blank line between. Local: typecheck green, net-progress-guard suite 11/11, architecture-docs green.
@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

Resolved the merge conflict on this PR.

What was conflicting. The PR (head e5d925190c) was 90 commits behind master and mergeable_state was dirty. The conflict was confined to exactly two files — docs/clients.md and docs/clients.zh-CN.md. In both, the PR and master each inserted a different dsh section at the same anchor (right after the dsh Context-tab paragraph, before ## Kimi Code):

How I resolved it. Merged origin/master into the PR branch (merge, not rebase — the branch already carried a prior conflict-resolution merge commit, so a merge is cleaner and needs no force-push). For both files I kept both sections (union of intent), separated by a blank line. All other 73 files changed by the merge auto-merged cleanly.

Local verification (before pushing). npm run typecheck green; the PR's core tests/issue5058-net-progress-guard.test.ts suite 11/11; tools/check-architecture-docs.mjs green. Versions correctly adopted master's (0.1.216 / kernel 0.0.198 / pi-subagents 0.2.4).

Push. Committed the merge as the final head 5b41ab3823 (no [ework:ci-held] marker) and pushed — no force needed since the old head is an ancestor.

Result. mergeable_state went dirty → blocked (branch protection / human approvals — not a conflict). The full CI pass on the new head is green: 52 checks, 38 success, 14 skipped, 0 failure (all 11 test shards done).

Note: the mirror check cache was stale (still showing the previous head from 2026-11-16), so I confirmed the new head's CI with bounded single live fetches rather than tight polling.


中文八问

  1. 是什么问题:PR [PR] fix: pause compression nudges when folds stop shrinking the session #5092 与 master 产生合并冲突(mergeable_state: dirty),阻塞合并。
  2. 什么原因导致的:master 前进了 90 个提交;在 docs/clients.md 与 docs/clients.zh-CN.md 的同一锚点(dsh Context 标签段之后、## Kimi Code 之前),PR 侧插入了 [Bug] 陪伴类长会话:compress nudge 自我放大,直到会话超过模型窗口且永久不可恢复 #5058 长会话墙 + 净进展守卫段,master 侧插入了 DSH Go 安卓宿主段——两侧在同一位置各插不同内容,形成文本冲突。
  3. 影响范围与严重程度:仅文档,不影响代码/行为;冲突阻塞合并,需在进入人工审批前解决。
  4. 怎么修复的:把 origin/master 合并进 PR 分支(选 merge 而非 rebase——分支已带前次冲突解决的 merge 提交,merge 更干净且无需 force-push);两处冲突均保留两侧内容(union of intent),中间空行分隔;本地 typecheck + net-progress-guard 套件 11/11 + architecture-docs 全绿后,提交 merge 提交(最终 head,不带 ci-held 标记)并 push(无需 force)。
  5. 是否有回归问题:无。冲突仅文档;其余 73 个文件全部自动合并干净;本地 typecheck 绿(自动合并未引入类型错误)、PR 核心套件 11/11 绿、architecture-docs 绿;版本正确采用 master 的(0.1.216 / kernel 0.0.198 / pi-subagents 0.2.4)。
  6. 是否破坏缓存:不涉及(纯文档合并,无缓存/重试/游标/去重逻辑改动)。
  7. 是否改了设计方向:不涉及(仅解决合并冲突,未改架构/边界/数据流)。
  8. 是否引入了新的配置:不涉及(无新 env/config/默认值)。

判定:冲突已解决,mergeable_state 由 dirty → blocked(分支保护,等待人工审批);新 head 的全量 CI 已绿(52 项:38 成功 / 14 跳过 / 0 失败)。可进入人工审批。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

Re-review on new head 5b41ab382 — verdict: APPROVE (re-confirmed).

The new head 5b41ab382 is a single merge commit — Merge origin/master into PR #5092 — resolve docs/clients.{md,zh-CN.md} conflict (parents: e5d925190, the previously-approved head, + 77fe0b1d63, master tip). No new PR-authored code; the only PR-side change is the docs conflict resolution.

PR diff unchanged. git diff 77fe0b1d63..pr-5092 is content-identical to the diff approved at e5d925190 (same 16 files, +572/−19), differing only in the resolved docs and line offsets. The net-progress-guard mechanism, all 8 injection gate sites, and the round-check block are intact and correctly placed (src/server/handle.ts:3266–3284, src/stream.ts:1718).

Docs conflict resolution is clean. Both docs/clients.md and docs/clients.zh-CN.md preserve both sides in the right order: the PR's long-session wall section + known refusal wording + mitigations, then master's DSH Go host section, then ## Kimi Code.

Re-verified locally on the new head:

  • typecheck clean
  • targeted suites green: issue5058 (11), issue2155, lane-decisions-matrix, web-i18n — 146/146 pass
  • CI green on 5b41ab382: 16 success / 14 skipped / 0 failed

No kernel/ changes (no kernel-change declaration needed), no new config surface, no small findings to fix. The round-1 approval carries over to the merged head.

结构化八问(合并头复核,与首轮一致):

  1. 是什么问题:plugin 模式下压缩动作成本超过折叠收益时,nudge 驱动的压缩空转,会话无界增长直到 dsh 发送前超窗守卫砖死会话。
  2. 什么原因导致的:所有既有守卫只看单轮增量或失败信号,结构性看不到「跨轮净进展」——折叠后客户端原始重发不降反升这一事实。
  3. 影响范围与严重程度:仅 plugin 泳道长寿命会话(几百轮、跨天,如 QQ 桥接陪伴);特定条件下不可用(压缩空转 → 本地日志超窗 → 发送前拒绝)。
  4. 怎么修复的:新增跨轮净进展守卫——每次折叠提交记基线(客户端原始重发 token 数),每个带 nudge 的请求轮测一次;连续 2 轮无净进展 → 武装 nudge 暂停(10 分钟墙帽);真实缩减或新折叠重置。进程内 WeakMap,从不持久化。
  5. 是否有回归问题:无。8 个注入门全部换成 OR 语义的 nudgeInjectionBlocked(会话卡死自愈机制:卡死模式检测与代理侧主动补救 #2155 锁单独仍可拦——测试钉死);decide-ladder fallback 穿透保留;proxy 泳道完全排除(flat-50K 节奏不动);状态进程内不持久化(存储 goldens 安全)。
  6. 是否破坏缓存:不涉及——不动消息身份 / 前缀 / 缓存键。
  7. 是否改了设计方向:不涉及——新增守卫,不改既有数据流。
  8. 是否引入了新的配置:无新 env/config/默认值(阈值常量在模块内)。

Ready for merge.

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[ework] CI fix verified green ✓

1 similar comment
@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[ework] CI fix verified green ✓

…lict

master replaced the uncovered.js 'uncoveredHistoryRuns' import/usage with the richer 'uncoveredAudit' (plus formatProtectedMassCompact / PROTECTED_MASS_RENDER_FLOOR); the PR added the 'recordNetProgressBaseline' import for the #5058 net-progress guard. Union of intent: keep master's uncovered.js import (the merged body uses uncoveredAudit) and the PR's net-progress-guard import; drop the now-unused uncoveredHistoryRuns.

@ranxianglei ranxianglei left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

APPROVE — clean, well-reasoned, well-tested.

The net-progress guard is the right mechanism for the #5058 companion-session spiral: it measures the cross-round trajectory of the client's raw resend (the one thing every standing guard is blind to), arms a per-session nudge suppression after two consecutive non-progress rounds, and lifts on a demonstrable reduction or the #3004 wall cap. The lane scope (plugin-only) is correct and well-justified — proxy-mode resends structurally never drop below the bar, so an unscoped latch would silence the flat-50K cadence (KDD #8) without defending anything. The process-local WeakMap storage is the right call (persist serializes session.metadata; a persisted latch would drift every storage golden on every long session, #4790 precedent). The same-space discipline (#1911) holds: baseline and round check both use countMessageTokens over the client's raw resend (ctx.compressMessages = prepared.originalMessages in the relay path). The decide-ladder fallback punch-through is preserved (same #3004 deadlock guard as D1). Tests cover the strike state machine, boundary, wall cap, fresh-window reset, corrupt-state tolerance, OR semantics, proxy-mode exclusion, and healthy-session non-arming. No kernel/ changes, no config surface, no persistence format change, no wire protocol change. Behavior change disclosed (old: nudges continued forever; new: paused after two non-progress rounds, lifts on reduction or 10 min).


八问(review 结论)

  1. 是什么问题:陪伴类长会话(几百轮、跨天)里,compress nudge 形成正反馈——每次压缩动作(tool call 参数 + 返回体)被宿主持久化并重发,反而撑大了触发 nudge 的那段上下文;会话一路涨过模型窗口后被宿主发送前的超窗守卫拦死,没有 provider 报错,任何自动恢复都够不着,会话永久报废。
  2. 什么原因导致的:kernel 每次成功 commit 后重置 baseline,下一个 nudge 再过恒定 50K 步长才到期,而压缩动作本身重新触发增长门——纯正反馈、无收敛。所有既有守卫按设计都看不到这个形状:#2748/#3322 净收益门只判单次 commit;#2146 熔断器数连续失败(成功但净负的折叠会清掉它);#2155 D1 需要缩减停止落地(这里每轮都落地);#3461 紧急回退只限宿主侧紧急注入。没有任何守卫量跨轮重发负载的轨迹。
  3. 影响范围与严重程度:plugin 车道(dsh-native、pi 等)跑几百轮的长会话(陪伴类场景)。严重度:会话完全不可用(永久报废),唯一出路是删掉重建(陪伴场景 = 对话记忆清零)。p1(可用性缺陷)。
  4. 怎么修复的:新增 src/net-progress-guard.ts 量跨轮轨迹——每次成功折叠 commit 后记录 baseline(入站重发总量),之后每个带 nudge 的轮次量当前重发量;连续两轮未跌破 baseline−25K 边距就 latch 一个 per-session nudge 抑制(走 #2155 同一条 suppress-nudge 通道),直到某轮证明性缩减或 10 分钟墙钟到期。latch 状态 process-local(WeakMap 按 session 对象键控),绝不持久化。lane 范围仅限 plugin(session.metadata.pluginAgent 绑定)。
  5. 是否有回归问题:审过既有行为——四个 prepare 车道的 nudge 门从 nudgeSuppressed(仅 #2155)换成 nudgeInjectionBlocked(#2155 OR #5058),decide-ladder 回退穿透保留(#3004 死锁守卫同 D1),#2155 既有行为不变、#5058 latch 是纯增量;guard 仅 plugin 车道生效,proxy 会话不受影响(KDD #8 恒定 50K 节奏不动);latch process-local 不持久化,存储 golden 不漂移(PR 加了 regression pin 断言 session.metadata 不被碰);baseline 记录在成功路径(折叠 commit 之后),不影响失败路径。无高危模式(语义漂移 / fail-fast 变吞错 / 阈值时序输出格式变化)。唯一行为变更是新增 nudge 抑制(PR 已披露旧值→新值+原因)。
  6. 是否破坏缓存:否。guard 不碰缓存、重试、增量游标、去重键。nudge 抑制是既有机制(#2155 suppress-nudge 通道),缓存行为不变。
  7. 是否改了设计方向:否。guard 遵循既有设计(#2155 补救通道、#1911 同空间纪律、#3004 墙钟上限),是新增守卫,不改架构 / 边界 / 数据流。
  8. 是否引入了新的配置:否。两个命名模块常量(NET_PROGRESS_MARGIN_TOKENS=25_000、NET_PROGRESS_STRIKE_LIMIT=2),按设计不设 operator 旋钮(#2155 先例:guard 阈值是内部件);想要更懒节奏的 operator 已有 compress.nudgeGrowthTokens。

判定:可合。无阻塞项,无顺手小修。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

Re-resolved the merge conflict — master moved again since the last resolution.

What happened. After the previous resolution (head 5b41ab3823, which merged master 77fe0b1d63), master advanced 579 more commits to 0a133d9146, re-introducing the conflict (mergeable_state: dirty).

The conflict. This time a single code conflict in src/stream.ts (the docs files from last time already carried the union). At the import block, the PR and master touched the same lines:

How I resolved it. Merged origin/master into the PR branch (merge, not rebase — the branch already carries merge commits; merge needs no force-push). The merged body uses uncoveredAudit (master's version won the auto-merge) and recordNetProgressBaseline (the PR's addition), and no longer uses uncoveredHistoryRuns. So the import block keeps master's ./uncovered.js import + the PR's recordNetProgressBaseline import and drops the now-unused uncoveredHistoryRuns — union of intent, no behavior change.

Local verification (before pushing). npm run typecheck green (exit 0); the PR's core tests/issue5058-net-progress-guard.test.ts 11/11; tools/check-architecture-docs.mjs all green.

Push. Committed the merge as the final head 187799fd100 (parents 5b41ab3823 + 0a133d9146, no [ework:ci-held] marker) and pushed (fast-forward, no force).

Result. mergeable_state went dirty → blocked (branch protection / human approvals — not a conflict). The full CI pass on the new head is green: 0 failure (41 check-runs: 24 success, 17 skipped).

One note on the test matrix. The test (…shard) matrix is skipped on this head — not failed. The new master introduced the stale-PR gate (#7785): a PR older than 72h pays no matrix CI. This PR is ~29 days old, so the gate skips the matrix by design. To re-arm the full matrix, add the ci:force label (owner's call — it re-runs the full shard matrix and costs CI minutes).


中文八问

  1. 是什么问题:PR [PR] fix: pause compression nudges when folds stop shrinking the session #5092 再次与 master 产生合并冲突(mergeable_state: dirty)——上次解决后 master 又前进了 579 个提交。
  2. 什么原因导致的:master 在 src/stream.ts 的 import 区把 ./uncovered.js 的 uncoveredHistoryRuns 替换为更丰富的 uncoveredAudit(并新增 formatProtectedMassCompact / PROTECTED_MASS_RENDER_FLOOR),与 PR 在同一 import 行新增的 recordNetProgressBaseline([Bug] 陪伴类长会话:compress nudge 自我放大,直到会话超过模型窗口且永久不可恢复 #5058 净进展守卫)发生文本冲突。
  3. 影响范围与严重程度:仅一个 import 行的文本冲突,不涉及行为;冲突阻塞合并,需解决后才能进入人工审批。
  4. 怎么修复的:把 origin/master 合并进 PR 分支(merge,非 rebase——分支已带多个 merge 提交,merge 无需 force-push);合并后函数体用的是 uncoveredAudit(master 版)和 recordNetProgressBaseline(PR 新增),不再用 uncoveredHistoryRuns,故 import 块保留 master 的 ./uncovered.js import + PR 的 recordNetProgressBaseline import,删掉不再使用的 uncoveredHistoryRuns(union of intent,无行为变更);本地 typecheck + net-progress-guard 套件 11/11 + architecture-docs 全绿后,提交 merge 提交(最终 head,不带 ci-held 标记)并 fast-forward push。
  5. 是否有回归问题:无。冲突仅一个 import 行;合并后 typecheck 绿(无未使用/缺失 import、无类型错误)、PR 核心套件 11/11 绿、architecture-docs 绿;未改任何行为逻辑。
  6. 是否破坏缓存:不涉及(纯 import 合并,无缓存/重试/游标/去重逻辑改动)。
  7. 是否改了设计方向:不涉及(仅解决合并冲突,未改架构/边界/数据流)。
  8. 是否引入了新的配置:不涉及(无新 env/config/默认值)。另注:新 head 的 test 矩阵被新 master 的 stale-PR 门([CI] every label fires a no-op CI run, and PRs older than 72h still pay a full matrix per push — | 任意 label 都触发一轮空转 CI,且超过 72 小时的老 PR 每次推送仍跑完整矩阵 #7785,PR>72h)按设计跳过(非失败);如需重跑全量矩阵,加 ci:force 标签(owner 决策)。

判定:冲突已解决,mergeable_state 由 dirty → blocked(分支保护,等待人工审批);新 head 的 CI 无失败(41 项 check-run:24 成功 / 17 跳过 / 0 失败)。test 矩阵因 PR 已 ~29 天(>72h)被 stale 门按设计跳过,重跑需 owner 加 ci:force 标签。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[ework] CI fix verified green ✓

…rt conflict

master added responsesToCore to the acp-kernel/wire import; the PR adds countMessageTokens to the acp-kernel import (net-progress round check). Union of both, no behavior change. Also backfilled the PR's 4 det.net_progress* web-i18n keys into the ko locale (master added ko after this PR was written; #1024 catalog-parity test requires every key in every locale).
@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

Third conflict pass done and pushed. 187799fd1..6ebe4a439 on 2026-10-29_net-progress-guard (fetched first, remote head was still 187799fd1, clean fast-forward, no force-push). Live PR state confirmed: mergeable: true, mergeable_state: dirty → blocked (branch protection / human approvals — the conflict itself is gone).

What this pass had to deal with (master moved 126 commits since the Nov-27 sync, to 24ba3ad09):

  1. One real conflict — src/server/handle.ts import block. Both sides touched the same two import lines:
  2. One merge-exposed test defect, fixed in passing — the merge surfaced that master added a ko (Korean) locale to src/web/i18n.ts after this PR was written. The PR's 4 new det.net_progress* web-i18n keys (the "swelling" badge) were never backfilled into ko, so the #1024 catalog-parity test (tests/web-i18n.test.ts:84) failed with missing ko value for "det.net_progress". Backfilled all 4 keys into the ko locale (placed at the same anchor as en/zh — after det.self_heal_suppress_nudge, before det.auto_mode_forge), translated consistently with the existing ko style. This is the only PR-side change beyond the conflict resolution.

Local gates (targeted per test discipline): npm run typecheck clean; 148/148 targeted tests pass (tests/issue5058-net-progress-guard.test.ts, tests/issue2155-self-heal.test.ts, tests/lane-decisions-matrix.test.ts, tests/web-i18n.test.ts); tools/check-architecture-docs.mjs all green. Final tree delta vs master is exactly the PR's 16-file contribution (+576/−19, +4 over the prior +572 = the ko backfill).

Note on the test matrix: the test (…shard) matrix is skipped on this head — not failed. The stale-PR gate (#7785) pays no matrix CI for a PR older than 72h; this PR is ~30 days old, so the gate skips the matrix by design. To re-arm the full matrix, add the ci:force label (owner's call — it re-runs the full shard matrix and costs CI minutes).


中文八问

  1. 是什么问题:PR [PR] fix: pause compression nudges when folds stop shrinking the session #5092 再次与 master 冲突(mergeable_state: dirty)——上次解决后 master 又前进了 126 个提交(到 24ba3ad09)。
  2. 什么原因导致的:master 在 src/server/handle.ts 的 import 区给 acp-kernel/wire 加了 responsesToCore,与 PR 在同一 import 行给 acp-kernel 加的 countMessageTokens([Bug] 陪伴类长会话:compress nudge 自我放大,直到会话超过模型窗口且永久不可恢复 #5058 净进展守卫轮次检查)发生文本冲突;另外合并暴露出 master 在本 PR 创建之后新增了 ko 语言档,PR 的 4 个 det.net_progress* web 文案键没回填到 ko,导致 #1024 目录对齐测试红。
  3. 影响范围与严重程度:冲突仅一个 import 行,不涉行为;ko 缺键仅影响 web 面板韩语徽章(回退显示),且是 CI 红项。两者都不影响已发布版本或运行中用户,但冲突不解决则 PR 无法合并。
  4. 怎么修复的:把 origin/master 合并进 PR 分支(merge,非 rebase——分支已带多个 merge 提交,merge 无需 force-push);import 冲突取两侧并集(countMessageTokens + responsesToCore,均验证在文件内实际使用,无未用 import);ko 语言档补 4 个 det.net_progress* 键(与 en/zh 同锚点,风格对齐既有 ko 文案)。本地 typecheck + 148 定向测试 + architecture-docs 全绿后,提交 merge(最终 head,不带 ci-held 标记)并 fast-forward push。
  5. 是否有回归问题:无。冲突仅一个 import 行,合并后 typecheck 绿(无未用/缺失 import、无类型错误);ko 回填只加 4 个字符串值、不动任何逻辑;最终树与 master 的差异恰好等于 PR 原始 16 文件贡献(+576/−19),无外来内容残留;PR 核心套件 11/11、self-heal/lane-decisions/web-i18n 全绿。
  6. 是否破坏缓存:不涉及——纯 import 合并 + i18n 文案补全,无缓存/重试/游标/去重逻辑改动。
  7. 是否改了设计方向:不涉及——仅解决合并冲突 + 补全新语言档文案,未改架构/边界/数据流。
  8. 是否引入了新的配置:不涉及(无新 env/config/默认值)。另注:新 head 的 test 矩阵因 PR 已 ~30 天(>72h)被 stale-PR 门([CI] every label fires a no-op CI run, and PRs older than 72h still pay a full matrix per push — | 任意 label 都触发一轮空转 CI,且超过 72 小时的老 PR 每次推送仍跑完整矩阵 #7785)按设计跳过(非失败);如需重跑全量矩阵,由 owner 加 ci:force 标签。

行为披露(old→new):ko 语言档此前没有 det.net_progress* 4 个键(韩语面板该徽章回退/缺失)→ 现补全为 4 个韩语译文("순진전 가드" / "팽창" 等)。原因:master 在本 PR 创建后才新增 ko 档,PR 的新键需回填才能过 #1024 目录对齐测试;纯文案补全,无逻辑/行为变更。

判定:冲突已清零、推送完成、本地门禁全过,mergeable_state 由 dirty → blocked(分支保护,等待人工审批/合并);新 head 6ebe4a439 的 CI 无失败(非矩阵车道全绿,test 矩阵因 stale 门按设计跳过,重跑需 owner 加 ci:force)。可进入人工审批/合并。

@ranxianglei ranxianglei left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Re-review on new head 6ebe4a439 (merge of master into PR branch)

The new head is a merge commit resolving an import conflict in src/server/handle.ts and backfilling the PR's 4 det.net_progress* i18n keys into the ko locale (master added ko after this PR was written; the #1024 catalog-parity test requires every key in every locale).

Conflict resolution verified:

  • handle.ts imports: union of master's responsesToCore (acp-kernel/wire) + PR's countMessageTokens (acp-kernel) — correct, no behavior change
  • ko i18n: 4 det.net_progress* keys added, matching zh-CN and en — correct

PR changes survived intact:

  • src/net-progress-guard.ts — unchanged
  • tests/issue5058-net-progress-guard.test.ts — unchanged
  • src/stream.ts:1870 — recordNetProgressBaseline call intact
  • src/server/handle.ts:3683 — evaluateNetProgressRound call intact
  • All 4 prepare lanes — nudgeInjectionBlocked import + usage intact
  • src/web/sessions-data.ts — netProgressState intact
  • src/web/i18n.ts — all 3 locales (zh-CN, en, ko) carry the 4 keys

No new issues introduced by the merge. The src/stream.ts one-liner (removing clearCompressFailures in externalSummaryBreakerRefusal) is a master change, not PR-related.

Verdict: APPROVE — the merge is clean, the PR's net-progress guard is intact, and all prior review findings remain valid.

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[bot] 🏷 Review complete on head 6ebe4a439 (merge of master into PR branch).

Verdict: APPROVE — the merge is clean, all PR changes survived intact, no new issues introduced.

Conflict resolution verified: handle.ts import union (master's responsesToCore + PR's countMessageTokens) + ko i18n backfill (4 det.net_progress* keys). All integration points confirmed: net-progress-guard.ts, test file, stream.ts:1870, handle.ts:3683, 4 prepare lanes, sessions-data.ts, i18n (zh-CN/en/ko).

Review posted: #5092 (review)


八问

  1. 是什么问题:长会话中压缩 nudge 形成正反馈环——每次 compress 动作(tool-call 参数含 summary + receipt + reasoning)被宿主持久化并回传,超过 fold 移除的量,kernel baseline reset 重新武装 flat-50K nudge,会话一路涨到 30MB/24051 events,dsh 预发送溢出守卫本地拒绝一切,会话永久砖化。
  2. 什么原因导致的:四个既有守卫全部按设计漏掉此形态(手动 compress 仍接受零/负净收益折叠,先改写缓存再提示上下文增长 #2748/[bug] Collapsing the "block range" compress actually doubled the live view size (253→519 msgs) → local estimate blew past the window → preflight permanently fail-fast (while the same payload would have passed upstream at 566K/750K) | [bug] 折叠「块范围」的 compr… #3322 单 commit 净收益;dsh内部问题 出现这个错误后,重启dsh可以发消息 但陷入无限压缩失败 #2146 breaker 只数失败;会话卡死自愈机制:卡死模式检测与代理侧主动补救 #2155 D1 需要 reduction 停止落地;Three issues found during real-model stress testing: WS passthrough can't connect — HTTP upstream is guaranteed to die; | 真模型压测发现的三个问题:WS 直通连不上 HTTP 上游必死、超限时死锁+紧急提示风暴、compress 激活本身太重 #3461 backoff 仅宿主侧)。缺少一个跨轮次的"净进展"检测——fold 落地后会话是否真的变小了。
  3. 影响范围与严重程度:plugin-lane 长会话(companion 类,数百轮/数天);严重度 p1——会话完全不可用(dsh 本地拒绝一切,无 provider 错误,无自动恢复)。
  4. 怎么修复的:新增 src/net-progress-guard.ts——process-local WeakMap 按 session 对象键控(不持久化),每轮 fold 成功后记录 baseline(countMessageTokens over client raw resend),下轮 fold 后比较:observed < baseline - 25K margin → 重置 strikes + 解除;否则 strike。2 次连续非进展 → 武装 latch(suppress nudge),10 分钟 wall cap 或真实缩减自动解除。仅 plugin-lane(session.metadata.pluginAgent 非空),proxy-mode 结构性不会低于 bar,不加 scope 会静默 flat-50K cadence(KDD feat: release CI (npm auto-publish on release branch) #8)。
  5. 是否有回归问题:审过既有行为——nudge 注入路径(4 prepare lanes)、decideFallbackOverride punch-through(dsh上下文700K不触发压缩 #3004 死锁守卫保留)、会话卡死自愈机制:卡死模式检测与代理侧主动补救 #2155 self-heal suppression(OR 关系,不覆盖)、proxy-mode 不受影响(plugin-lane gate)、metadata 不被污染(回归 pin 测试)、storage goldens 不受影响(WeakMap 不持久化)。无回归。
  6. 是否破坏缓存:不涉及。无缓存/重试/增量游标/去重键变更。
  7. 是否改了设计方向:否。新增独立 guard 模块,不改变既有架构/边界/数据流。
  8. 是否引入了新的配置:否。2 个命名模块常量(NET_PROGRESS_MARGIN_TOKENS=25_000、NET_PROGRESS_STRIKE_LIMIT=2),按 会话卡死自愈机制:卡死模式检测与代理侧主动补救 #2155 先例,非 config surface。

判定:可合。 无 kernel/ 变更,无 config surface 变更,无 persistence/wire 变更。行为变更已披露:旧值 = nudge 永远继续;新值 = 2 轮连续非进展后暂停,真实缩减或 10 分钟到期后恢复。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[ework] CI fix verified green ✓

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] 陪伴类长会话:compress nudge 自我放大,直到会话超过模型窗口且永久不可恢复

1 participant