Repository navigation
[PR] fix(#5714): recognize shifted-but-preserved history in the tag-change continuation rung - #5727
ranxianglei wants to merge 5 commits into
Conversation
…ual (#4599) 01fcc5d (#5656/#5584, merged via #5687) diverts tool-less dsh single-shot requests onto the verbatim side lane (kernel no-touch); the residual for main turn 1 is documented in the commit's own comment. Five pre-existing pins assumed turn 1 rides the full pipeline and went born-red at merge (master red since; every PR head inherits it). Test-only realignment codifying the documented behavior: - issue2419/2446/2447/2481 guard-stamp subtests: two turns; the BLOCKED ref is witnessed on the first FULL-PIPELINE turn (turn 2). No fold can happen before turn 2 (nothing compressible, no action surface), so protection against every possible fold is unchanged. - issue2817: stats.requests off by one (turn 1 uncounted); the persona-fold teeth are intact, assertions shifted -1. - issue5403 A/B golden: turn 0 rides the side lane in BOTH phases (the gate ignores the rollout env), so rb[0] is unstamped by design; stamps resume at turn 1. Byte equality holds at i=0 (both phases forward verbatim). No src/, kernel/, config, or version changes. Locally green: all six files + side-lane-invariants + issue5656-single-shot-sidecar + dsh-persona-fingerprint.
… continuation rung A host-side insertion or deletion shifts every later conversation cell by one index; the tag-changed ladder's #4778 continuation rung only compared cells at the SAME index, so a rotated persona on a shifted-but-intact main history scored zero agreement and fell through to derived-persona — orphaning the root lane's folds onto an empty |sub: lane (the grown/shifted counterpart of #5686's shorter-tail case). Measure the longest EXACT content-cell fragment agreement over ANY relative offset instead of just offset zero. The per-cell sha256 comparison is unchanged (MESSAGE-IDENTITY: never fuzzy), so a run of CONTINUATION_MIN_RUN agreements still cannot occur between distinct conversations regardless of where the window sits — stranger / stale-shorter / below-threshold / shallow-blob forks all stay intact (pinned both directions). Early-exit at the threshold bounds the scan on long histories. Fixes #5714
📦 Built Package ArtifactBranch: Latest build — install this exact versionnpm install -g billion-context@0.0.8238-pr.5727.9eb9a55This exact version is immutable and reproducible. The rolling Recent builds (commit → version)
Download artifact
tar xzf billion-context-pr5727.tgz
npm install -g packageInstall instructions are refreshed on each push. |
(ai: vllm-qwen/qwen3.8-27b) 查重: 不重复。 本 PR 针对 #5714( persona 文本轮换 + 宿主侧插入把整段旧历史推移到新索引 → tag-change 阶梯全部 rung 落空 → fork 到空的 标签: bug, dsh, scope/wiring, p1 —— fork-继承被永久放弃类(owner 修订 2026-10-19 ①:root 车道 fold 状态孤儿化,现场为 sub 车道继承 425 refs 但 0 blocks)。 Review 进行中:diff 已通读( |
…idecar residual broke five dsh regression pins
(ai: vllm-qwen/qwen3.8-27b) 结论:红 CI 不是本 PR 的代码问题,是继承性 master 红。已把 ci-fixes 哨兵分支合进 PR 并推送,新 run 已排队。 1. 是什么问题:PR #5727 的全部 10 个 test shard 全红,失败集中在同 4 个测试:#2446/#2447 的「dsh lane stamps the guard onto the effective config」子测试、#2817 cross-wire persona fold、#5418 watermark fastpath A/B。 2. 什么原因导致的:继承性失败,与本 PR 改动无关。#5656(single-shot sidecar,经 #5687 合入)之后,无工具的 dsh 单发请求走 verbatim side lane(turn 1 不再走完整管道),而 5 枚既有回归钉仍假设 turn 1 走全管道——合并那一刻就 born-red,master 从此红。证据链:①本地把 master 的 3. 影响范围与严重程度:波及所有从当前 master 切出的 PR(全部继承红);对用户行为零影响——纯测试钉与已记录行为(#5656 commit 注释里自己写明的 residual)错位。 4. 怎么修复的:不动任何业务代码。在 PR 分支 merge 5. 是否有回归问题:无 src//kernel//配置变更。ci-fixes 的重对齐本身由哨兵验证过且收敛在 ci-fixes 单一出口(例:#2817 的 stats.requests 9→8 只因 turn 1 走 side lane 不计数,fork 断言的牙原样保留)。高危模式逐项过:无语义漂移、无 fail-fast 变化、无阈值/时序/输出格式变化。 6. 是否破坏缓存:不涉及。 7. 是否改了设计方向:不涉及。本 PR 本体(tag-change continuation rung 从同下标对齐放宽到任意偏移扫描)一行未动。 8. 是否引入了新的配置:不涉及。 新 CI run(42004717973 @ 5ee7753)已排队,e2e-codex-persona 已绿;主矩阵结果出来前本轮收工,若再红按 attempt 2/3 处理。 |
…ontinuations stop early The offset sweep started at the most-negative s, so even the fixed scenario (host insertion, shift +k) paid ~n^2/2 comparisons before reaching its diagonal - measured 285ms @5k / 1.1s @10k / 4.4s @20k on exactly the sessions this rung serves (the tag rotates every turn there). Visit s=0 first, then expand by |s|: unshifted (#4778) and small-shift (#5714) continuations return in O(n*(2k+1)) - measured <=1.6ms at all sizes above. The caller only tests against CONTINUATION_MIN_RUN, so visit order cannot change any verdict; a stranger with no qualifying run anywhere still pays the full exhaustive sweep (unchanged).
…tinuation sweep The original suite only exercised positive offsets (host insertion). A host-side DELETION of an early cell shifts the recorded body to NEGATIVE relative offset - pre-fix it forked identically onto |sub:<fp>; now it reanchors. Same topology discipline as the insertion regression: distinct per-cell content, length gate satisfied, skeleton deep-equal assertion.
(ai: vllm-qwen/qwen3.8-27b) Review 完成,建议可合并(CI 在最终 head 结构化八问
过程记录
判定:可合并(合并由人执行,我不合 PR)。两个补 commit 均为标注独立的评审补充(perf / test),不改变 PR 的目的与范围。 |
(ai: vllm-qwen/qwen3.8-27b) 本轮结论:未发现代码缺陷,未改代码;唯一红 shard 已触发重跑(HTTP 201 受理)。 诊断过程(证据链):
八问:
收工判定:等待重跑结果;若转绿,本 PR 即可进入人工合并。 |
(ai: vllm-qwen/qwen3.8-27b) APPROVE — independent review of the full diff vs master Structured verdict (八问)
Behavior change disclosure (旧值→新值)OLD: rotated persona over shifted-but-intact main history → fork Independent evidence
Verdict: APPROVE — code correct, tests have teeth, guardrails pinned both directions, behavior change disclosed, inherited CI red unblocked. |
(ai: vllm-qwen/qwen3.8-27b) PR #5727 review 完成 → APPROVE(以评论形式发布:GitHub 禁止批准自己账号开的 PR,形式上只差 owner 手动点 Approve)。独立审了最终 head 的全 diff(fix + perf + deletion-pin + ci-fixes absorb 四个 commit)+ 行为 A/B(master 上正例钉会红、最终 head 32/32 绿);镜像缓存里的「绿」实为 skip-scoped run 遮蔽了原 push-run 的 10/11 shard 红——经查为继承性 master 红(同签名 4 测试,#5656 sidecar residual),已由 ci-fixes 哨兵吸收解锁(新 head 17c40a2)。无 kernel/、无新配置、行为变更(旧 fork→新 reanchor)已在 PR 正文披露。Review: #5727 (comment) |
(ai: vllm-qwen/qwen3.8-27b) CI 侧收工确认:head
剩余动作只有一项:人工 Approve + Merge(agent 不合并)。PR: #5727 |
What & why
DSH native main requests with a stable client-minted conversation id move onto an empty
|sub:lane when the per-turn system/persona text rotates and a host-side insertion shifts the whole old history to new indices. The root lane's folds are orphaned (field report: a maintenance session landed on a sub lane with 425 inherited refs but 0 blocks, not the root's 32; a ~314s preflight before forwarding on a 700400-token budget).This is the grown/shifted counterpart of two already-shipped rungs:
A host-side INSERTION/DELETION shifts every later conversation cell by one index, so #4778's same-index comparison scores zero agreement AND #5686's length gate (
incoming < recorded) is false → the tag-change ladder falls through toderived-persona, despite the old content being intact.Fix
In
src/session-resolve.ts, the tag-change continuation rung now measures the longest EXACT content-cell fragment agreement over ANY relative offset instead of only offset zero (renamedmaxAlignedFragRun→maxContinuationFragRun). The per-cell sha256 comparison is unchanged — MESSAGE-IDENTITY (never fuzzy similarity) — so a run ≥CONTINUATION_MIN_RUNstill cannot occur between two distinct conversations regardless of where the window sits. A qualifying run returns immediately, bounding the scan on long histories instead of paying the full O(n·m) offset sweep.Behavior change (disclosed)
<id>|sub:<fp(tag)>.reanchor), preserving the root lane's fold state.Tests
tests/issue5714-shifted-persona-continuation.test.ts— the issue's deterministic topology (pre-fix it reproduces the exact|sub:8dfd76270c919cdafork fingerprint from the field report), plus both-direction controls (shifted stranger / stale-shorter / scattered-below-threshold / shallow blob all still fork; the shorter slice still reanchors through #5686 untouched). The full #4778 suite stays green (no regression). Typecheck clean.Notes
Fixes #5714