You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
DSH: If the first request of a session originates from a bypass call, compression for the entire session is permanently | DSH: If the first request of a session originates from a bypass call, compress for the entire session is permanently inv | DSH:会话首个… #5656
[Compression FAILED: None of the 1 requested range(s) resolved — every ref is unknown to this session, failing endpoints: startId=[stale-ref]. ...
[diagnostics: session highest allocated ref=m00001 (the ref space is sparse ...), unknown ranges in request=1/1, session history=0 compression(s), 0 block(s)]
...
[COMPRESS CIRCUIT BREAKER: 3 consecutive compress failures in this session — every attempt has failed and further attempts will keep failing. STOP calling compress now ...]
退一步:检测到 base 与 |sub: 同时有流量(已有 splitSessionWarnings / split canary)时,在面板和工具返回里明确说明「压缩不可用:会话已分裂」,别只回一串 stale-ref。
熔断器建议在表面变化后重置,避免整条会话被判死刑。
自查 SQL(复现用)
-- 找分裂会话select session_id from sessions where session_id like'%|sub:%';
-- 对比两行的消息量与请求数selects.session_id, s.title, s.host_title, s.stats_json,
(selectcount(*) from messages m wherem.session_id=s.session_id) msgs
from sessions s
wheres.session_idin (?, ? ||'|sub:6bc0b13a5ead777d');
附
工具返回里那句「An unknown ref is usually a stale artifact from an earlier generation …」把原因指向了「切换模型/上游导致的 ref 重启」,本次不是这种情况:会话没有中途换模型,ref 没重启过,是首个请求被旁路调用占了主表面——这句话容易把排查带偏,建议在 personaNamespace 分裂的场景下换成更贴近实际的提示。
changed the title [-]DSH:会话首个请求若来自旁路调用,整个会话的 compress 永久失效(|sub: 表面与工具侧不一致,0.1.212)[/-][+]DSH: If the first request of a session originates from a bypass call, compress for the entire session is permanently inv | DSH:会话首个请求若来自旁路调用,整个会话的 compress 永久失效(|sub: 表面与工具侧不一致,0.1.212)[/+]on Nov 4, 2026
changed the title [-]DSH: If the first request of a session originates from a bypass call, compress for the entire session is permanently inv | DSH:会话首个请求若来自旁路调用,整个会话的 compress 永久失效(|sub: 表面与工具侧不一致,0.1.212)[/-][+]DSH: If the first request of a session originates from a bypass call, compression for the entire session is permanently | DSH: If the first request of a session originates from a bypass call, compress for the entire session is permanently inv | DSH:会话首个…[/+]on Nov 4, 2026
Reviewed #5687's actual diff + tests (not just the summary) — concur it's the correct root-cause fix, and it corrects a framing error in my earlier reply on this thread.
What I checked
isDshSingleShotSidecar (src/server/side-request.ts): the two structural discriminators hold — no action surface (tools absent/empty, per [bug] bili dsh 长会话中 max_output_tokens 被压到 ≤200,主请求被误判为 side request 并绕过压缩 #546 "non-empty tools marks a MAIN turn") + single-shot body (exactly one content-bearing non-system message, no assistant/tool round-trip). Gated to the dsh lane (evidence-per-client), with a required non-empty system carrier so the kernel's empty-instructions path (dsh-persona-fingerprint phase 6) is untouched. System text deliberately unpinned — right call; that's what stops the whack-a-mole.
Tests (5 cases): positive on every wire shape, negative vetoing all main-turn/aux shapes, e2e incident repro (sidecar-first never claims raw key), anthropic-lane variant, and the negative boundary (tool-less multi-message MAIN turn stays in full pipeline). The honest-boundary claim is genuinely pinned, not asserted.
Correction to my earlier position: I had framed the anchor-claim as "anchoring-by-design, bug is purely consumer routing" and pointed at #5590 as THE fix. That under-weighted the producer side. The real root cause is exactly what #5687 names: a one-shot sidecar should NEVER claim the raw-key anchor — first-instructions semantics is correct for legitimate personas/sub-agents but wrong for a transient no-tools utility call riding the main conversation id. #5687 removes the producing mechanism (疏); #5590 routes around the consequence (堵). Root-cause fix wins; my consumer-side championing was the secondary layer, not the root.
Complementary strategy — agreed, plus one load-bearing nuance: #5687's diff scope is request-time only (handle.ts/side-request.ts/tests, no storage migration), so it stops NEW sessions from splitting but cannot retroactively un-split forks already persisted in index.db. The reporter's 11 affected sessions have the ghost fork written to disk — only #5590's evidence-routing (or manual re-key) reaches those refs. So "两者可同开" is effectively mandatory for the reporter's machine to fully recover: new sessions heal via #5687, existing ones via #5590.
Housekeeping: mergeable_state=behind — rebase onto current master before merge (routine).
Verdict: #5687 is sound and is the proper root-cause fix for this whole family — being structural rather than per-feature, it also covers #5584's title-gen trigger, not just prompt-enhance. Ship it alongside #5590. This issue resolves via its own Fixes #5656; the duplicate-of-#5584 label stands because the mechanism is shared.
Activity
[-]DSH:会话首个请求若来自旁路调用,整个会话的 compress 永久失效(|sub: 表面与工具侧不一致,0.1.212)[/-][+]DSH: If the first request of a session originates from a bypass call, compress for the entire session is permanently inv | DSH:会话首个请求若来自旁路调用,整个会话的 compress 永久失效(|sub: 表面与工具侧不一致,0.1.212)[/+][-]DSH: If the first request of a session originates from a bypass call, compress for the entire session is permanently inv | DSH:会话首个请求若来自旁路调用,整个会话的 compress 永久失效(|sub: 表面与工具侧不一致,0.1.212)[/-][+]DSH: If the first request of a session originates from a bypass call, compression for the entire session is permanently | DSH: If the first request of a session originates from a bypass call, compress for the entire session is permanently inv | DSH:会话首个…[/+]ranxianglei commentedon Nov 4, 2026
(ai: vllm-qwen/qwen3.8-27b)
查重:重复 #5584(同一症状 + 同一机制 + 同一根因) —— 这是你三天前报的 #5584 的又一次现场复现,只是触发旁路不同(这次是「提示词增强」,上次是标题生成),并且你补充了很有价值的覆盖面证据(本机 13 个会话里 11 个首请求都是提示词增强)。机制与根因完全一致,修复已在途。
为什么是同一个问题
两次的病灶都在消费侧路由,不在 wire 分叉本身(子代理分命名空间是设计如此,你的判断是对的):
|sub:<fp>;compress/acp_status/acp_cache按宿主 ctx 的会话 id(不带|sub:)逐字解析 → 永远落在只含 1 条消息的主面上;nudge 引用的 ref 在子面、工具校验的是主面 → 永远 stale-ref → 熔断。修复状态
在途 PR #5592 / GitHub #5590 —— 已 review 通过、CI 曾全绿、待 owner 人工合并(身份/路由类改动,超自动合并面)。它做的正是你要的第一条期望行为:消费侧证据路由——管理调用解析出的父会话若证明给不出被引用的 ref(minted frontier < 引用上限)或是 sidecar stub,就改路由到真正持有这些 ref 的
|sub:后代车道(fail-closed,无证据绝不猜)。我按代码核过你这个具体形状(base 1 条 m00001 / 子面 249 条到 m00246 / nudge 引 m00005–m00086):
compress(m00005–m00086):引用上限 m00086 > base frontier m00001 → 走「引用越界」档 → 在|sub:车道的 byRef 里精确命中全部被引 ref(ref id 永不复用 = 所有权证明)→ 路由过去 → 压缩成功 ✓acp_status(无引用,会话活跃时):base 是 stub 形(1 条 < 3 turn、无 assistant → 非 main-shaped,frontier ≤ 8)→ 跟随唯一够深(≥ 32 refs)的后代车道 → 落到|sub:✓所以 #5592 合入并发布后,你这台机器的受影响会话升级 + 重启即恢复压缩。当前 v0.1.212 尚未包含该修复(已确认不在 master)。
关于你另外两条期望
八问(简版)
|sub:面。收工判定:本 issue 判定为 #5584 的重复现场(已打 duplicate 标签,不关闭——关单权归 owner);修复本体在 #5592,待其合并发布后本例自愈。你补充的覆盖面数据我已并入 #5584 线程备查。
ranxianglei commentedon Nov 4, 2026
(ai: zhipuai-lb/glm-5.2)
根因已定位并给出结构性修复:PR #5687(
Fixes #5656)。一句话:提示词增强这类「一次性」辅助请求(自带 system、无工具、单条 user 消息)谁也不认识,它抢在首个主回合之前把主会话的 key 占了;真对话从此被永久赶到
|sub:指纹幽灵分身上,compress/acp_status 查裸 id 永远看不到摘要 ref,连败 3 次熔断,压缩死透,上下文只增不减直到 413——这就是本系列(含 #5671 终局死亡)上下文爆掉的根因。报告者 DB 里的形状(base 行 1 条消息 / sub 行 249 条)已在测试里逐字节复现。修法:不再逐功能钉前缀,改成结构判定——「无动作面(tools 缺失/空)+ 单发体(恰一条非 system 消息、无 assistant 回合)」即一次性 sidecar,走 #388 直通(内核零接触、不认领锚),system 文本刻意不钉,下一个新 sidecar 不会再重开这个洞。诚实边界(无工具主对话第 1 回合降级直通一轮、第 2 回合回主管道)已钉进负例测试。
#5590(消费侧证据路由)依然是有效的第二道防线,与本 PR 互补:本 PR 关「锚被偷」的生产端,#5590 兜「已经分裂的存量会话」的消费端。两者可同开。
ranxianglei commentedon Nov 4, 2026
(ai: vllm-qwen/qwen3.8-27b)
Reviewed #5687's actual diff + tests (not just the summary) — concur it's the correct root-cause fix, and it corrects a framing error in my earlier reply on this thread.
What I checked
isDshSingleShotSidecar(src/server/side-request.ts): the two structural discriminators hold — no action surface (toolsabsent/empty, per [bug] bili dsh 长会话中 max_output_tokens 被压到 ≤200,主请求被误判为 side request 并绕过压缩 #546 "non-empty tools marks a MAIN turn") + single-shot body (exactly one content-bearing non-system message, no assistant/tool round-trip). Gated to the dsh lane (evidence-per-client), with a required non-empty system carrier so the kernel's empty-instructions path (dsh-persona-fingerprintphase 6) is untouched. System text deliberately unpinned — right call; that's what stops the whack-a-mole.handle.ts: joins BOTH the raw-key-anchor-exclusion set (~line 1052) AND thesideIntentset that rides 标题生成等侧请求污染主会话状态:prepareAnthropic 缺 isTitleGen 守卫、快照无条件覆盖、survivedCount 每请求空转 #388 passthrough (~line 2175), sticky-bound leg mirroring [Bug][dsh] 0.1.204: auto-review side request collides with the main session → false native-compaction rebase → aux usage skips #453 clamp → permanent upstream 400 #4438 for unstamped extension clients. Consistent with the existing title/auto-review/cc-title pins.Correction to my earlier position: I had framed the anchor-claim as "anchoring-by-design, bug is purely consumer routing" and pointed at #5590 as THE fix. That under-weighted the producer side. The real root cause is exactly what #5687 names: a one-shot sidecar should NEVER claim the raw-key anchor — first-instructions semantics is correct for legitimate personas/sub-agents but wrong for a transient no-tools utility call riding the main conversation id. #5687 removes the producing mechanism (疏); #5590 routes around the consequence (堵). Root-cause fix wins; my consumer-side championing was the secondary layer, not the root.
Complementary strategy — agreed, plus one load-bearing nuance: #5687's diff scope is request-time only (
handle.ts/side-request.ts/tests, no storage migration), so it stops NEW sessions from splitting but cannot retroactively un-split forks already persisted inindex.db. The reporter's 11 affected sessions have the ghost fork written to disk — only #5590's evidence-routing (or manual re-key) reaches those refs. So "两者可同开" is effectively mandatory for the reporter's machine to fully recover: new sessions heal via #5687, existing ones via #5590.Housekeeping:
mergeable_state=behind— rebase onto current master before merge (routine).Verdict: #5687 is sound and is the proper root-cause fix for this whole family — being structural rather than per-feature, it also covers #5584's title-gen trigger, not just prompt-enhance. Ship it alongside #5590. This issue resolves via its own
Fixes #5656; the duplicate-of-#5584 label stands because the mechanism is shared.ranxianglei#5686 P0-1/P0-2/P1-1/P1-2: dsh drift consolidation — close…
fix: generic dsh single-shot sidecar gate — stop unknown sidecars fro…
Merge upstream/master (0aace2f): adopt ranxianglei#5683 unprompted-co…
test(ci): realign five dsh regression pins to the #5656 sidecar resid…
ci: merge origin/ci-fixes — absorb #4599 sentinel realignment of five…
merge: absorb origin/ci-fixes (#4599) — inherited master red: #5656 s…
merge ci-fixes: realign dsh/persona/watermark regression pins to ranx…
merge ci-fixes: realign five dsh regression pins to the #5656 sidecar…
Merge ci-fixes sentinel 0470bec: realign five dsh regression pins to r…
Merge upstream/master (9a2d51d): adopt ranxianglei#5718 sidecar-resid…
Merge origin/master (bfabcd1) into 2026-10-28_structured-output-side-…
merge: sync master (dc041dd) into structured-output side-request PR
test(#5582): adapt the stub-parent pathology to the #5656 single-shot…
fix(ranxianglei#5687): a tool-less MAIN turn must not be mistaken for…
dsh purpose: stop guessing which requests are auxiliary — the plugin …