Skip to content

[PR] fix(#7821): compress failure path — one-line parse, in-flight-ref message, armed-refusal no-increment - #7822

Open
ranxianglei wants to merge 11 commits into
masterfrom
2026-11-27_fix-7821-compress-failure-path
Open

ranxianglei wants to merge 11 commits into
masterfrom
2026-11-27_fix-7821-compress-failure-path

Conversation

@ranxianglei

Copy link
Copy Markdown
Owner

⚠️ MODEL-FACING TEXT CHANGE: three model-visible strings changed (one-line parse acceptance, in-flight-ref error message, armed-refusal receipt cause). See per-facet notes below.

kernel-change: fix two provably-mechanical defects in the compress failure path

Both kernel changes are mechanical (wrong parse of a documented one-line form; wrong error message for the in-flight case), each with a reproducing regression test. The host change (facet 3) is a behavior change requested by the issue.

What this fixes (Closes #7821)

A long DSH plugin-native session (1005 msgs, 147 blocks) after a generation change entered a compress retry loop: 25 calls in 8 minutes, 0 acp_status, ending at a 22-failure armed refusal. Three distinct defects compounded:

Facet 1 — one-line entries rejected as 'missing summary' (kernel)

parseLineEntry() only read the summary after a newline; text after the refs on the header line was treated as the topic. A one-line m09309–m09309 Final. was rejected even though the error message says the summary may be on 'the same or the next line'.

Fix: when there is no newline, the text after the refs IS the summary. Header-only entries (no text after the refs) are still rejected.

Model-facing change: one-line entries with text after the refs are now ACCEPTED (previously rejected). The model's natural one-line form now works.

Facet 2 — in-flight-ref (highest+1) gets a dedicated message (kernel)

startId at exactly highest+1 (the in-flight assistant message being written, which has no ref yet) was refused with the generic 'stale artifact from an earlier generation' message — which is wrong (it's not stale, it's the current turn).

Fix: a dedicated message tells the model the ref belongs to the message it is currently writing, that it has no ref yet, and that it should continue the turn.

Model-facing change: the error message for startId == highest+1 changed from 'stale artifact from an earlier generation, or a typo' to 'the assistant message you are currently writing — it has no ref yet (refs are minted on the next request). Do not compress it now; continue the turn and it will be compressible on a later call.'

Facet 3 — armed refusals no longer increment the streak (host)

BEHAVIOR CHANGE (old → new + why):

  • OLD: every compress failure while the breaker is armed incremented the streak counter (n) and refreshed lastAt, so the 10-minute decay could never elapse while the model kept retrying — the model was locked out indefinitely (25 calls in 8 minutes, counter climbed to 22, decay unreachable).
  • NEW: a failure while the breaker is already armed is a REFUSAL, not a new failure — it does NOT increment n and does NOT refresh lastAt. The count stays at the threshold while armed, so the decay can actually elapse after 10 minutes from the last non-armed failure. The armed receipt also carries the last failure's cause (invalidReasons[0]) so the model can self-correct instead of blindly retrying.
  • WHY: the old behavior turned the breaker (a 10-minute cooldown) into a permanent lockout whenever the model kept retrying, which is exactly what the DSH plugin-native session in [Bug][dsh] compress: one-line entry rejected as missing summary -> retry loop arms breaker, armed receipt hides cause #7821 showed.

Model-facing change: the armed-refusal receipt now includes 'Last failure: ' so the model can self-correct. The counter no longer climbs while armed (stays at the threshold).

Behavior change disclosure (required by §7.3)

Surface Old New Why
One-line parse m09309–m09309 Final. rejected ('missing summary') Accepted (summary = 'Final.') The error message already said 'same or the next line'; the code only accepted 'next line'.
In-flight-ref error 'stale artifact from an earlier generation, or a typo' 'the assistant message you are currently writing — it has no ref yet…continue the turn' The in-flight message is not stale; it's the current turn. The old message sent the model on a stale-ref hunt.
Armed-refusal counter Climbs while armed (n: 3→4→5→…→22) Stays at threshold while armed (n=3) Climbing + lastAt refresh made the decay unreachable while the model retried.
Armed-refusal receipt Generic one-liner (no cause) Includes 'Last failure: ' The model couldn't self-correct without knowing WHY the call failed.

Tests

  • Kernel (facet 1): 2 new tests in parse-compress-input.test.ts (one-line pair + one-line single-ref); 3 existing tests updated (header-only cases now use bare refs lines).
  • Kernel (facet 2): 2 new tests in issue4521-retry-livelock.test.ts (startId at highest+1 gets dedicated msg; startId above highest+1 keeps stale-ref msg).
  • Host (facet 3): 5 new tests in issue7821-armed-breaker-no-increment.test.ts (armed parse-failure no-increment, cause in receipt, un-armed still increments, armed stale-ref no-increment, decay can elapse).
  • Existing tests updated: issue2146-compress-loop-breaker.test.ts (count stays at threshold while armed), issue4812-armed-breaker-short-receipt.test.ts (count stays at threshold, not climbing).

Not implemented (design decision, flagged for owner)

The issue's suggested fix #5 ('consider not arming on parse failures at all') is a DESIGN DECISION — I have NOT implemented it. It would change the breaker's semantics (parse failures would never arm the breaker, only stale-ref/substrate failures would). Flagging for owner decision.

Files changed

  • kernel/src/parse-compress-input.ts — facet 1 (one-line parse)
  • kernel/src/boundaries.ts — facet 2 (in-flight-ref message)
  • kernel/package.json — version bump 0.0.200 → 0.0.201
  • kernel/tests/parse-compress-input.test.ts — facet 1 tests
  • kernel/tests/issue4521-retry-livelock.test.ts — facet 2 tests
  • src/stream.ts — facet 3 (armed-refusal no-increment + cause in receipt)
  • tests/issue7821-armed-breaker-no-increment.test.ts — facet 3 tests (new)
  • tests/issue2146-compress-loop-breaker.test.ts — updated for new behavior
  • tests/issue4812-armed-breaker-short-receipt.test.ts — updated for new behavior

Closes #7821

ci-check added 2 commits November 27, 2026 09:11
⚠️ MODEL-FACING TEXT CHANGE: two model-visible error strings changed.

Facet 1 (parse-compress-input.ts): a one-line entry with text after the
refs (e.g. 'm09309–m09309 Final.') was rejected as 'missing summary' even
though the error message says the summary may be on 'the same or the next
line'. The parser only read the summary after a newline; text after the
refs on the header line was treated as the topic. Fix: when there is no
newline, the text after the refs IS the summary. Header-only entries (no
text after the refs) are still rejected.

Facet 2 (boundaries.ts): startId at exactly highest+1 (the in-flight
assistant message being written, which has no ref yet) was refused with
the generic 'stale artifact from an earlier generation' message. Fix: a
dedicated message tells the model the ref belongs to the message it is
currently writing, that it has no ref yet, and that it should continue
the turn.

kernel-change: fix two provably-mechanical defects in the compress
failure path (wrong parse of a documented one-line form; wrong error
message for the in-flight case). Both have reproducing regression tests.

Bumps kernel version 0.0.200 -> 0.0.201.
…7821)

⚠️ MODEL-FACING TEXT CHANGE: the armed-refusal receipt now includes the
last failure's cause ('Last failure: ...'), so the model can self-correct
even while the breaker is armed.

BEHAVIOR CHANGE (old -> new + why):
- OLD: every compress failure while the breaker is armed incremented the
  streak counter (n) and refreshed lastAt, so the 10-minute decay could
  never elapse while the model kept retrying — the model was locked out
  indefinitely (25 calls in 8 minutes, counter climbed to 22, decay
  unreachable).
- NEW: a failure while the breaker is already armed is a REFUSAL, not a
  new failure — it does NOT increment n and does NOT refresh lastAt. The
  count stays at the threshold while armed, so the decay can actually
  elapse after 10 minutes from the last non-armed failure. The armed
  receipt also carries the last failure's cause (invalidReasons[0]) so
  the model can self-correct instead of blindly retrying.
- WHY: the old behavior turned the breaker (a 10-minute cooldown) into a
  permanent lockout whenever the model kept retrying, which is exactly
  what the DSH plugin-native session in #7821 showed.

Applies to both the parse-failure path and the stale-ref failure path in
applyRanges. The preflight lane (loopTracking:false) is unaffected (it
never arms the breaker).
@ranxianglei ranxianglei added bug Something isn't working p2 labels Nov 27, 2026
@ranxianglei ranxianglei changed the title fix(#7821): compress failure path — one-line parse, in-flight-ref message, armed-refusal no-increment [PR] fix(#7821): compress failure path — one-line parse, in-flight-ref message, armed-refusal no-increment Nov 27, 2026
…fusalReceipt + kernel version conflicts

- kernel/package.json: master moved 0.0.200 -> 0.0.211 while this PR bumped
  0.0.200 -> 0.0.201; this PR carries kernel source changes, so the bump
  continues on master's head: 0.0.211 -> 0.0.212.
- src/stream.ts armedRefusalReceipt: union of intent — keep this PR's cause
  parameter + 'Last failure:' note, keep master's wording (ce07358 removed
  the JSON-array format note; da7bda3 moved the disarm wording to 'one
  substantial fold (a trivial one that saves almost nothing does not count)').
  Both master changes are intentional model-facing text changes; the PR's base
  was simply stale.

Targeted tests green on the resolved head: kernel parse-compress-input /
issue4521-retry-livelock / compress / issue3302-sparse-ref-unknown (149 pass),
host issue7821 / issue2146 / issue4812 breaker suites (20 pass), typecheck clean.
@github-actions

github-actions Bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

📦 Built Package Artifact

Branch: 2026-11-27_fix-7821-compress-failure-path (49c4298)

Latest build — install this exact version

npm install -g billion-context@0.0.12638-pr.7822.307bc4b

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
49c4298 billion-context@0.0.12638-pr.7822.307bc4b build
d571fd6 billion-context@0.0.12481-pr.7822.334062a build
897c25d billion-context@0.0.12464-pr.7822.060ef54 build
1a27543 billion-context@0.0.12280-pr.7822.869f6b7 build
06b6061 billion-context@0.0.12230-pr.7822.9897a04 build
6d47bc3 billion-context@0.0.12203-pr.7822.02a230a build
082380b billion-context@0.0.12195-pr.7822.89cd6f1 build
7fc97d4 billion-context@0.0.12190-pr.7822.1f5f5c7 build
6c97503 billion-context@0.0.12189-pr.7822.4a3c436 build

Download artifact

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

Install instructions are refreshed on each push.

…3782 class)

The original bump commit (0.0.200 -> 0.0.201) left kernel/package-lock.json
unsynced; CI never ran on that head because the branch was dirty against
master, so the lock-sync gate never saw it. Same fix master applied for
0.0.211 in 7b609ee.
@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

查重: 不重复 — no other open PR targets #7821; this is the only fix PR for the thread.
标签: bug + p2 (already on the PR; matches my independent judgment from the diff: defect fix, compression locked out while breaker armed but the session itself stays usable — no data loss, no cache leak, so p2 not p1).

What I did this round (PR #7822, branch 2026-11-27_fix-7821-compress-failure-path):

The PR was dirty against master (mergeable_state: dirty) — CI had never run on its head (zero check runs on c312db9). I merged master in and resolved two conflicts:

  1. kernel/package.json — master had moved 0.0.200 → 0.0.211 while this PR bumped 0.0.200 → 0.0.201; since the PR carries kernel source changes, the bump continues on master's head: 0.0.211 → 0.0.212.
  2. src/stream.ts armedRefusalReceipt — union of intent: kept the PR's cause parameter + Last failure: note, kept master's wording (ce07358 deliberately removed the JSON-array format note; da7bda3 deliberately moved the disarm wording to "one substantial fold (a trivial one that saves almost nothing does not count)"). Both are intentional master model-facing-text changes; the PR's base was simply stale.

Drive-by fix (own commit 7fc97d4ec8e): the original bump never synced kernel/package-lock.json (still 0.0.211) — CI never ran on the dirty head so the lock-sync gate never saw it; it failed on the first real CI pass after my merge. Synced to 0.0.212 (same fix master applied for 0.0.211 in 7b609ee).

Verification on the resolved head (targeted, per local-test discipline): kernel parse-compress-input / issue4521-retry-livelock / compress / issue3302-sparse-ref-unknown — 149 pass; host issue7821 / issue2146 / issue4812 breaker suites — 20 pass; typecheck clean. CI on head 7fc97d4ec8e: 10 static gates green (incl. kernel-guard), test shards + mysql-contract still running at time of writing.

八问(PR #7822 审核结论):

  1. 是什么问题:长 DSH plugin-native 会话(1005 msgs)在 generation 变更后陷入 compress 重试循环——8 分钟 25 次调用、0 次 acp_status,最终 22 连败 armed refusal。三个缺陷叠加:单行条目 mNNNNN–mNNNNN 摘要 被拒、in-flight 消息(highest+1)收到误导性的 "stale artifact" 报错、breaker armed 期间每次失败都累加计数导致 10 分钟 decay 永不可达。
  2. 什么原因导致的:(a) parseLineEntry 只在新行后读 summary,单行条目里 refs 后的文本被当 topic,summary 恒为空 → 拒发(与文档承诺 "same or the next line" 不符);(b) boundaries.ts 对 startId == highest+1 没有专门分支,落入通用 stale-ref 文案,把模型引去"找有效编号";(c) armed 期间的失败仍走 noteCompressLoopFailure,n 递增 + lastAt 刷新,decay 计时器被不断重置 → 断路器从"10 分钟冷却"退化成"永久锁死"。
  3. 影响范围与严重程度:所有 plugin 车道长会话,一旦 breaker armed 且模型继续重试即无限期失去压缩能力(上下文持续膨胀直到窗口上限);p2——会话本身仍可用,无数据丢失、无缓存泄露,有绕行(停止重试等 decay),但模型实际不会停,体验明显受损。
  4. 怎么修复的:(a) 单行条目:refs 后文本即 summary(纯 header 仍拒);(b) startId == highest+1 专属文案:告诉模型那是它正在写的消息、还没有 ref、继续当前回合即可;(c) armed 期间的失败 = 拒绝而非新失败:不增 n、不刷 lastAt,decay 可正常走完;armed receipt 附带 Last failure: <cause> 供模型自我纠正。
  5. 是否有回归问题:逐项核过触碰路径的既有行为——arm 时刻 receipt(n==threshold 的完整教学+暂停段)保留(新分支只在"已 armed"时拦截,第 3 次失败仍走完整路径);preflight 车道(loopTracking:false)不受影响;spec 级 出现持续压缩失败,无法自动恢复 #847 ledger 在 armed 期间照常记账;substrate-destruction / loop-noise 分段逻辑保留;kernel 侧多行条目解析不变、header-only 单行仍拒、远高于 highest+1 的 refs 仍走 stale-ref 文案(既有测试钉住)。一处边缘差异:breaker 以 external-summary 原因 armed 后若出现普通 total failure,现在保留旧 cause(master 会因 cause 失配重置 streak)——decay 现在可达,10 分钟内自愈,且该路径罕见(需 external summary 配置 + 部分成功 + kernel 拒收)。armed receipt 文案与 master 的 billion-context 0.1.216 — compress no-op: symptoms, root cause, and proposed patch | billion-context 0.1.216 — compress 空转:现象、根因、可提的补丁 #7300/ce073589a7a 措辞已按"两者意图都保留"合并。
  6. 是否破坏缓存:不涉及——未动任何缓存键、重试游标、去重键;breaker streak 是会话元数据,不是缓存状态。
  7. 是否改了设计方向:无架构转向。一处 issue 要求的语义变更:armed refusal 从"新失败"改为"拒绝"(断路器回归 10 分钟冷却的本义)。issue 建议的 fix feat: persistent + namespaced sessions, multi-tenant session isolation, stream robustness #5(parse 失败完全不 arm)未实现,属设计取舍,已在 PR 正文 flag 给 owner 拍板——不阻塞本 PR 合入。
  8. 是否引入了新的配置:无新 env/config/默认值。

状态:PR 已可合并(mergeable: true,blocked = 等 CI/人工合并),kernel 版本 0.0.212,lock-sync 已修。等 CI 全绿后由 owner 合并。

…nc, #3782 class)

The root package-lock.json records the file:./kernel dependency's version;
the original bump commit missed it (and the kernel lockfile, fixed in
7fc97d4). lock-sync failed on the first real CI pass for this reason.
@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

Follow-up — second lockfile drift found and fixed (drive-by, own commit 082380b430d):

The first CI pass on the merged head failed lock-sync after all: the ROOT package-lock.json also records the file:./kernel dependency's version (its kernel entry was still 0.0.211). The original bump commit (0.0.200 → 0.0.201) missed BOTH lockfiles — my earlier drive-by (7fc97d4ec8e) only covered kernel/package-lock.json. Verified the fix against the exact diff CI's regen produced (one line: kernel entry 0.0.211 → 0.0.212), pushed.

Status on head 082380b430d: 29 check runs already green (all e2e lanes that ran: success), static gates + test shards still queued/running (runner queue is slow right now). I'll post the final CI verdict when it lands.

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

CI fix run — lock-sync red on PR #7822: already fixed on the branch, verified locally, CI re-running.

Live state verified this run (mirror cache + one-shot API, head 082380b430):

  • PR is mergeable (no conflict) — the earlier dirty state was resolved by the merge commit 6c97503f4a; mergeable_state: blocked is checks-only.
  • The reported lock-sync failure (run 45922292631, head 7fc97d4ec8) is already fixed on the branch: commit 082380b430 "chore: sync root lockfile kernel entry with the 0.0.212 bump" landed 09:33:36 from a parallel run of this same lane.
  • I independently prepared and verified the identical fix locally before seeing the push — the remote tree is byte-identical to my verified head (diff empty), so I did not push a duplicate commit.
  • What the failure was: the original kernel bump commit moved kernel/package.json 0.0.211 → 0.0.212 but left the root package-lock.json kernel entry at 0.0.211 (the kernel's own lockfile had been synced in 7fc97d4ec8). The lock-sync job's npm install --package-lock-only + git diff --exit-code therefore failed on the root file only.
  • Local verification on the identical tree: replicated the lock-sync job exactly (root + kernel npm install --package-lock-only → zero drift in both lockfiles); targeted suites green — host breaker family 39/39 (issue7821/issue4812/issue2146/compress-observability), kernel 111/111 (parse-compress-input/issue4521-retry-livelock); npm run typecheck clean.
  • CI on the fixed head: 0 failures so far — 16 gates success, 13 skipped, 9 queued (lock-sync, kernel-guard, version-guard, test lanes waiting on runners; queue has been stable ~10 min, no movement, no red).

No further action taken this run — nothing left to push. If any check goes red on head 082380b430, the next wake picks it up.

八问

  1. 是什么问题:PR 的 lock-sync 门禁红了——根 package-lock.json 里 file:./kernel 依赖的版本号还停在 0.0.211,而 kernel/package.json 已 bump 到 0.0.212,锁文件再生成后产生漂移。
  2. 什么原因导致的:原始 kernel bump 提交只改了 kernel/package.json(0.0.211→0.0.212),漏掉了根锁文件的 kernel 条目;kernel 自己的锁文件在 7fc97d4ec8 补过,根锁文件一直没人补,所以第一次真跑 CI 时 lock-sync 红。
  3. 影响范围与严重程度:仅 CI 门禁,不影响运行时行为;不修则 PR 无法合并(阻塞级,但一行修复)。
  4. 怎么修复的:根 package-lock.json 的 kernel 条目 0.0.211 → 0.0.212,与 master 既有的 lock-sync chore 提交同一模式([PR] kernel: sync package-lock.json to 0.0.136 (lock left at 0.0.133 by the bump chain) #3782 类)。
  5. 是否有回归问题:无——纯锁文件版本行同步,零代码/行为面;修复后的树与本地全绿验证的树逐字节一致(定向测试 39/39 + 111/111、typecheck 干净、lock-sync 作业本地复现零漂移)。
  6. 是否破坏缓存:不涉及。
  7. 是否改了设计方向:不涉及。
  8. 是否引入了新的配置:不涉及。

判定:lock-sync 红已在分支上修好(082380b430),本地验证通过,CI 重跑中(暂无失败);本轮无需再推任何提交,等 CI 出结果即可。

…l' parse #7821 introduced

This PR's facet 1 (one-line entries: text after the refs IS the summary)
broke the #3780 host salvage's invariant — 'a no-real-newline string always
yields zero ranges undecoded'. A double-escaped payload like
'm00001–m00002 example topic<literal backslash-n>folded summary body' now
'parses' undecoded with the literal backslash-n glued into the summary, the
salvage gate (failed parse only) never fired, and the corrupted summary would
have been folded. CI caught it: test (windows-latest, 22, 1) —
issue1494-compress-params.test.ts '#3780: double-escaped line-form string ...
is decoded once and recovered' (expected 'folded summary body', got
'example topic<literal backslash-n>folded summary body').

Fix (host layer, which owns the whole-string decode): the salvage now also
runs when the undecoded parse SUCCEEDED but the content is a no-real-newline
string carrying a literal backslash-n, and adopts the decoded result on the
same range count (> 0) — the decoded parse carries the real header/summary
split, the undecoded one cannot. Multi-entry double-escape (decoded parses
more ranges) and all non-double-escape shapes are unchanged. Stale comments
in src/compress-tool.ts and the test file updated to the new invariant.
@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

Follow-up — CI caught a real regression in this PR's own facet 1; fixed on the branch (commit 6d47bc33375).

What CI found: test (windows-latest, 22, 1) failed on head 082380b430d:
tests/issue1494-compress-params.test.ts — #3780: double-escaped line-form string (literal backslash-n separator) is decoded once and recovered — expected summary folded summary body, got example topic<literal backslash-n>folded summary body.

Root cause (my facet-1 kernel change broke an existing host salvage): the #3780 double-escape salvage in src/compress-tool.ts relied on the invariant "a no-real-newline string always yields zero ranges undecoded" — its gate only fired on a failed parse. Facet 1 (one-line entries: text after the refs IS the summary) made the undecoded double-escaped payload m00001–m00002 example topic<literal \n>folded summary body parse "successfully" with the literal \n glued into the summary — so the gate never fired and the corrupted summary would have been folded. Reproduced locally before fixing.

Fix (host layer, which owns the whole-string decode): the salvage now also runs when the undecoded parse succeeded but the content is a no-real-newline string carrying a literal \n, and adopts the decoded result on the same range count (> 0) — the decoded parse carries the real header/summary split, the undecoded one cannot. Multi-entry double-escape (decoded parses more ranges) and all other shapes are unchanged. Stale comments in src/compress-tool.ts + the test file updated to the new invariant.

Verification (targeted, local): issue1494-compress-params 13/13 (was 12/13); compress batch incl. breaker suites 44/44; typecheck clean.

CI state (verified live just now): the run on 6d47bc33375 was cancelled at 02:55Z while still queued (all jobs never started; no newer push exists on the branch) — I re-triggered it via the rerun API (201 accepted), so the full suite is running again on the fixed head. All e2e lanes on that head are already green. I'll post the final verdict when it lands.

八问(本轮 #3780 回归修复):

  1. 是什么问题:本 PR 的 facet 1(单行条目接受)意外破坏了既有的 compress: literal backslash-n in string content still fails as kind=content-not-array, hiding the real missing-summary reason #3780 双重转义救捞——模型把换行双转义成字面 \n 的单行 payload 现在被"成功"解析成带字面 \n 的坏 summary,救捞不再触发,坏 summary 会被折进块里。
  2. 什么原因导致的:救捞的门禁条件是"未解码解析失败才尝试解码",其不变量是"无真实换行的字符串未解码必得 0 个 range";facet 1 让这种字符串未解码也能解析出 1 个 range(文本全进 summary),不变量失效,门禁永不开。
  3. 影响范围与严重程度:所有走 host parseCompressInput 的车道,模型发出双重转义单行 payload 时(长会话里 JSON 序列化漂移的常见形态)会折入带字面 \n 的损坏 summary——内容损坏级,但触发条件是模型恰好双转义,频率中低;p2 偏 p1,CI 已拦下未发布。
  4. 怎么修复的:救捞门禁扩展——未解码解析成功但内容形如"无真实换行 + 含字面 \n"时也尝试解码;采纳条件扩展为"更多 range,或同 shape 下相同 range 数(>0)"(解码结果才有真正的 header/summary 切分)。
  5. 是否有回归问题:逐项核过——多条目双重转义(解码后 range 更多)走旧路径不变;含真实换行的 payload 不解码(decodeDoubleEscapedContent 原样返回 undefined)不变;无字面 \n 的字符串门禁不变;无有效 refs 头的转义串仍不救捞(0 > 0 不成立);compress: literal backslash-n in string content still fails as kind=content-not-array, hiding the real missing-summary reason #3780 既有的"真实换行优先、字面 \n 保留"测试仍绿。
  6. 是否破坏缓存:不涉及。
  7. 是否改了设计方向:不涉及——解码仍留在 host 层(整串上下文所在层),kernel 的 parseLineEntry 作为"最终归属"的注释保留;仅恢复 compress: literal backslash-n in string content still fails as kind=content-not-array, hiding the real missing-summary reason #3780 的既有判决在 facet 1 之后的有效性。
  8. 是否引入了新的配置:无。

判定:PR 代码面已收敛(3 个 facet + 3 个 drive-by:kernel lockfile、root lockfile、#3780 救捞),等重跑的 CI 出全绿判定。

# Conflicts:
#	kernel/package-lock.json
#	kernel/package.json
#	package-lock.json
@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

Conflict re-landed after master advanced — merged, resolved, pushed. PR is mergeable again.

What happened: master moved 60 commits past this branch's base (incl. kernel bumps 0.0.212 → 0.0.213 → 0.0.214 for the thinking-relay and multi-image kernel fixes), which re-dirtied the PR. The branch itself also gained one new commit since my last run — 6d47bc3337 (the #3780 double-escape salvage fix for the one-line-parse regression this PR introduced) — which I preserved untouched.

What I did this run:

  1. Merged origin/master into the branch (merge, not rebase — the branch already carries merge history; no force-push).
  2. All conflicts were the same mechanical pattern — kernel version files: branch at 0.0.212 (this PR's bump) vs master at 0.0.214 (master's own two bumps). Resolved to 0.0.215: master's 0.0.214 + this PR's still-pending kernel changes (boundaries.ts in-flight-ref message, parse-compress-input.ts one-line parse), in kernel/package.json + both lockfiles. No code conflicts — all PR changes (kernel facets, breaker no-increment, compress: literal backslash-n in string content still fails as kind=content-not-array, hiding the real missing-summary reason #3780 salvage) auto-merged and verified present.
  3. Verified locally on the merged tree: replicated the lock-sync job exactly (npm install --package-lock-only root + kernel → zero drift in both lockfiles); rebuilt kernel dist; targeted suites green — kernel 111/111 (parse-compress-input, issue4521-retry-livelock), host 52/52 (issue7821, issue4812, issue2146, compress-observability, issue1494-compress-params incl. the compress: literal backslash-n in string content still fails as kind=content-not-array, hiding the real missing-summary reason #3780 salvage); npm run typecheck clean.
  4. Pushed fast-forward (no force): 6d47bc3337..06b6061b7de.
  5. Live state after push: mergeable: true, mergeable_state: blocked = required checks only (CI now running on head 06b6061b7de; the previous head's run had 0 failures).

八问

  1. 是什么问题:master 前进了 60 个提交(kernel 0.0.212→0.0.214),PR 分支与 master 再次冲突(dirty)。
  2. 什么原因导致的:本 PR 的 kernel bump(0.0.211→0.0.212)与 master 自己的两次 kernel bump(→0.0.213→0.0.214)在三个版本文件上撞车;非代码冲突,纯版本行。
  3. 影响范围与严重程度:仅合并阻塞,不影响运行时;不修则 PR 无法合并。
  4. 怎么修复的:merge master 进分支,三个版本文件统一解析为 0.0.215(master 的 0.0.214 + 本 PR 未合入的 kernel 改动),锁文件同步;PR 的全部代码改动原样保留。
  5. 是否有回归问题:无——冲突面只有版本行,代码零冲突;合并后树本地验证:lock-sync 作业复现零漂移、定向测试 111/111 + 52/52 全绿(含 compress: literal backslash-n in string content still fails as kind=content-not-array, hiding the real missing-summary reason #3780 salvage 回归测试)、typecheck 干净。
  6. 是否破坏缓存:不涉及。
  7. 是否改了设计方向:不涉及。
  8. 是否引入了新的配置:不涉及。

判定:冲突已解,分支已推(06b6061b7de,fast-forward 无 force-push),PR 恢复 mergeable;等 CI 在新 head 上出结果,若再有红由下一轮 wake 接手。

@PiPiMoe

PiPiMoe commented Nov 28, 2026

Copy link
Copy Markdown

🤖 Powered by ework · qwen3.8-27b

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

Conflict re-landed after master advanced — merged, resolved, pushed. PR is mergeable again.

What happened: master moved 60 commits past this branch's base (incl. kernel bumps 0.0.212 → 0.0.213 → 0.0.214 for the thinking-relay and multi-image kernel fixes), which re-dirtied the PR. The branch itself also gained one new commit since my last run — 6d47bc3337 (the #3780 double-escape salvage fix for the one-line-parse regression this PR introduced) — which I preserved untouched.

What I did this run:

  1. Merged origin/master into the branch (merge, not rebase — the branch already carries merge history; no force-push).
  2. All conflicts were the same mechanical pattern — kernel version files: branch at 0.0.212 (this PR's bump) vs master at 0.0.214 (master's own two bumps). Resolved to 0.0.215: master's 0.0.214 + this PR's still-pending kernel changes (boundaries.ts in-flight-ref message, parse-compress-input.ts one-line parse), in kernel/package.json + both lockfiles. No code conflicts — all PR changes (kernel facets, breaker no-increment, compress: literal backslash-n in string content still fails as kind=content-not-array, hiding the real missing-summary reason #3780 salvage) auto-merged and verified present.
  3. Verified locally on the merged tree: replicated the lock-sync job exactly (npm install --package-lock-only root + kernel → zero drift in both lockfiles); rebuilt kernel dist; targeted suites green — kernel 111/111 (parse-compress-input, issue4521-retry-livelock), host 52/52 (issue7821, issue4812, issue2146, compress-observability, issue1494-compress-params incl. the compress: literal backslash-n in string content still fails as kind=content-not-array, hiding the real missing-summary reason #3780 salvage); npm run typecheck clean.
  4. Pushed fast-forward (no force): 6d47bc3337..06b6061b7de.
  5. Live state after push: mergeable: true, mergeable_state: blocked = required checks only (CI now running on head 06b6061b7de; the previous head's run had 0 failures).

八问

  1. 是什么问题:master 前进了 60 个提交(kernel 0.0.212→0.0.214),PR 分支与 master 再次冲突(dirty)。
  2. 什么原因导致的:本 PR 的 kernel bump(0.0.211→0.0.212)与 master 自己的两次 kernel bump(→0.0.213→0.0.214)在三个版本文件上撞车;非代码冲突,纯版本行。
  3. 影响范围与严重程度:仅合并阻塞,不影响运行时;不修则 PR 无法合并。
  4. 怎么修复的:merge master 进分支,三个版本文件统一解析为 0.0.215(master 的 0.0.214 + 本 PR 未合入的 kernel 改动),锁文件同步;PR 的全部代码改动原样保留。
  5. 是否有回归问题:无——冲突面只有版本行,代码零冲突;合并后树本地验证:lock-sync 作业复现零漂移、定向测试 111/111 + 52/52 全绿(含 compress: literal backslash-n in string content still fails as kind=content-not-array, hiding the real missing-summary reason #3780 salvage 回归测试)、typecheck 干净。
  6. 是否破坏缓存:不涉及。
  7. 是否改了设计方向:不涉及。
  8. 是否引入了新的配置:不涉及。

判定:冲突已解,分支已推(06b6061b7de,fast-forward 无 force-push),PR 恢复 mergeable;等 CI 在新 head 上出结果,若再有红由下一轮 wake 接手。

Local test of PR #7822: the in-flight-ref loop is still present

I applied the current PR #7822 diff (facets 1–3) plus the #3780 fix (commit 6d47bc3) to a local copy of billion-context 0.1.216 (DSH 0.2.2-rc.5, Windows 11, deepseek-flash), restarted the proxy, and re-ran the long-lived session from the original report. This is a local trial build, not an official release; the proxy loaded the patched bundle (SHA256 73F57E0B...).

Result: facets 1 and 3 work, but the model still loops on its own in-flight message. Facet 2's dedicated message is present in every receipt and is ignored.

Evidence (local time UTC+8; session id omitted; no conversation content):

09:57:00.712 compress requested 1 range(s): m09401–m09401
09:57:04.678 [warn: compress-loop] circuit breaker armed after 3 consecutive compress failures (last spec: m09402..m09402)
09:57:26.714 compress requested 1 range(s): m09407–m09407
09:57:26.733 compress FAILED ... highest allocated ref=m09406 ... "Do not probe for valid numbers. Run acp_status..." ... range m09407..m09407: startId="m09407" is the assistant message you are currently writing — it has no ref yet ... Do not compress it now; continue the turn ...
09:57:30.814 compress requested 1 range(s): m09408–m09408
09:57:35.047 compress requested 1 range(s): m09410–m09410
09:57:39.207 compress requested 1 range(s): m09411–m09411
09:57:43.609 compress requested 1 range(s): m09412–m09412
09:57:47.656 compress requested 1 range(s): m09413–m09413

(Lines are trimmed with ... for length; the full log is available on request.)

  • 12 compress calls in 47 seconds; every ref is exactly highest+1 (the assistant message being written). 0 acp_status tool executions.
  • Facet 1 is working: the one-line call parses (compress requested 1 range(s)), so it is no longer rejected as "missing summary".
  • Facet 2 is present but ineffective: the in-flight text is appended at the end of a ~2.5 KB receipt that still leads with "every ref is unknown ... stale artifact ... Do not probe for valid numbers. Run acp_status." The model appears to follow that first framing and increments the ref by one on the next step.
  • Facet 3 is working: the breaker armed at 09:57:04 and the refusal count stayed at 3 (no failure 4 / failure 22 lines). But the model kept calling; the breaker only refuses, it does not stop the call loop.

Why facet 2 is not enough

Returning an error keeps the model in "fix the tool call" mode. The dedicated message is accurate, but it competes with the generic stale-ref instructions that precede it, and it still looks like a retryable tool error.

Suggested changes (owner decision)

  1. Make the in-flight (startId == highest+1) case a short, dedicated receipt: only the in-flight explanation; omit the generic stale-ref paragraph, "Do not probe", and "Run acp_status" for that call.
  2. Or return a successful no-op for that case: 0 blocks, text "This is the message you are currently writing; it has no ref yet; nothing to compress — continue the turn." A success may break the error-retry reflex.
  3. Or add a turn-level hard stop: after 2 in-flight attempts in one turn, return a terminal result and suppress further compress calls for the rest of the turn. The breaker's 10-minute cooldown is not a turn-level stop.

Facet 3 is a clear improvement (the counter no longer climbs), but the user-visible loop remains: "22 failures" becomes "unbounded refusals with n=3".

If useful, I can test the success-no-op variant locally and report back; I did not modify the PR branch.

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

CI state re-verified live — the reported blocker is already resolved; no fix needed this run.

  • The event reported test (windows-latest, 22, 1) red at head 06b6061b7d, but the branch has since advanced to head 1a27543 (a re-run commit pushed by the previous wake after a transient event-loop-drain failure in dsh-native.test.ts, unrelated to this PR's changes; its message carries no [ework:ci-held] marker, so it was the final head and CI ran on it).
  • Live mirror-cache state at head 1a27543: all 30 checks complete, 0 failed, 0 pending — the previously red test (windows-latest, 22, 1) is now success, as are all 12 test-matrix jobs (ubuntu 22/24 + windows 22), both static-gates, mysql-contract, gate, and config-surface-guard (e2e lanes + red-signal skipped as usual).
  • No conflict: mergeable: true (mergeable_state: behind only means the branch trails master — not a merge blocker).
  • This run: no code changes, no pushes.
  • Note: the thread also carries a local-test report that the in-flight-ref loop is still present, with three suggested variants listed as an owner decision. That is a design-level question, not a CI blocker — nothing for this lane to act on.

七问

  1. 是什么问题: 系统报告 PR [PR] fix(#7821): compress failure path — one-line parse, in-flight-ref message, armed-refusal no-increment #7822 的 test (windows-latest, 22, 1) 检查红(针对旧 head 06b6061b7d)。
  2. 什么原因导致的: 该红是 dsh-native.test.ts 的一次瞬态 event-loop-drain 失败(与本 PR 改动无关);上一轮 wake 已推 re-run 提交 1a27543 触发重跑。
  3. 怎么修复的: 本轮无需修复——先复核 live 状态,确认新 head 1a27543 上全套 30 项检查 0 failed / 0 pending;未改代码、未 push。
  4. 是否有回归问题: 不涉及(零改动;全矩阵测试与全部静态门均 success)。
  5. 是否破坏缓存: 不涉及。
  6. 是否改了设计方向: 不涉及。
  7. 是否引入了新的配置: 不涉及。

判定: CI 全绿、无冲突,PR 处于可合并状态(mergeable: true;behind 非阻塞)。本轮收工,无进一步动作。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

🔶 需要决策
(ai: vllm-qwen/qwen3.8-27b)

For @ranxianglei (owner) — a design decision is needed on PR #7822 before the in-flight-ref loop can be fixed. I am stopping here; I have not modified the PR.

The reporter (@PiPiMoe — an outside user; their words are reference opinion, not an owner decision) reports that after facets 1–3 of PR #7822 the model still loops on its own in-flight message (12 compress calls in 47 s, every ref = highest+1). I verified the mechanism against the branch code (head 1a27543):

  • The in-flight case (startId == highest+1) throws a dedicated error at kernel/src/boundaries.ts:258-264 ("…is the assistant message you are currently writing — it has no ref yet… continue the turn…").
  • That error is folded into the generic gate receipt at kernel/src/compress.ts:624-628 ("None of the N requested range(s) resolved — every ref is unknown… stale artifact… Do not probe for valid numbers. Run acp_status…").
  • The receipt is assembled at kernel/src/compress.ts:697 as errors: [gateMessage, ...classificationErrors] — the ~2.5 KB generic framing leads, and the in-flight instruction is appended at the end. The model anchors on the leading "probe / run acp_status" framing and increments the ref by one each step; the trailing in-flight instruction is ignored.

All three proposed variants are changes under kernel/ (boundaries.ts and/or compress.ts) and are model-facing text/semantic changes (⚠️ MODEL-FACING TEXT CHANGE). Per the Kernel Boundary they require your explicit approval — none is implemented.

Options (as proposed by the reporter):

  • A — Dedicated short receipt for the in-flight case: when the only failure is startId == highest+1, return a short receipt containing ONLY the in-flight explanation; omit the generic stale-ref paragraph, "Do not probe", and "Run acp_status". Keeps error semantics; removes the competing framing.
  • B — Success no-op: return a successful no-op (0 blocks) with text "This is the message you are currently writing; it has no ref yet; nothing to compress — continue the turn." Changes error→success semantics; may break the error-retry reflex (uncertain).
  • C — Turn-level hard stop: after 2 in-flight attempts in one turn, return a terminal result and suppress further compress calls for the rest of the turn. New stateful mechanism; caps the loop but does not fix the confusing receipt.

My recommendation: A as the primary fix — it directly removes the diagnosed root cause (the generic framing competing with the in-flight instruction), is the most surgical and lowest-risk, keeps correct error semantics, and is testable at the receipt level (assert the exact model-visible string). Fall back to B if A does not stop the loop in a local re-test; use C only as a last-resort safety net (most complex, does not fix the root cause).

Default if undecided: ship nothing new — keep the current facet 2 behavior (in-flight instruction appended to the generic receipt). All three variants are kernel + model-facing changes that need your go; I will not implement any without it.

Gated diff (for your approval): kernel/src/boundaries.ts:258-264 (the in-flight BoundaryNotFoundError) + kernel/src/compress.ts:624-628 and :697 (the generic gate receipt that swallows it). PR #7822, branch head 1a27543.


八问

  1. 是什么问题:facets 1–3 合入后,模型仍对自己正在写的 in-flight 消息(startId == highest+1)循环调用 compress(47 秒 12 次,每次 ref = highest+1);facet 2 的专用指令存在但被忽略。
  2. 什么原因导致的:in-flight 分支(boundaries.ts:258-264)抛出的专用错误被并入 compress.ts:624-628 的通用 "every ref is unknown / stale artifact / Do not probe / Run acp_status" 回执,且 compress.ts:697 以 [gateMessage, ...classificationErrors] 组装——通用框架在前、in-flight 指令追加在末尾;模型锚定开头通用框架逐步 +1,末尾指令被忽略;返回错误(无论措辞)让模型停在"修工具调用"模式。
  3. 影响范围与严重程度(按选项):
    • A:影响面 = 仅 in-flight 这一条 no-op 路径的回执文本;严重度改善 = 移除竞争框架,循环大概率停;风险最低。
    • B:影响面 = in-flight 从错误语义改为成功语义,波及所有依赖"compress 失败=错误"假设的消费方(breaker 计数、调用方重试);严重度改善 = 可能打破错误重试反射(不确定);风险中等。
    • C:影响面 = 引入轮级状态机,波及 compress 调度整条路径;严重度改善 = 封顶循环(不修根因);风险最高。
  4. 怎么修复的(推荐选项 A 的思路):在 compress.ts 的 gate 消息构造处,当唯一失败是 in-flight(startId==highest+1)时不走通用 "every ref is unknown" 回执,改为只含 in-flight 解释的短回执(去掉通用 stale-ref 段、"Do not probe"、"Run acp_status");保留错误语义,加回执级测试钉死模型可见的精确字符串。
  5. 是否有回归问题(按选项):
  6. 是否破坏缓存:不涉及(三个选项都不碰缓存/增量游标/去重键;in-flight 是 no-op 路径)。
  7. 是否改了设计方向:A 否(保留错误语义);B 是(错误→成功);C 是(新增轮级状态机)。
  8. 是否引入了新的配置:三个选项默认都不新增;若选 C 可能需要"每轮 in-flight 尝试阈值"旋钮,届时按配置面纪律单独报批。
选项 机制 影响面 风险 是否修根因 定位
A 专用短回执 只改 in-flight 分支回执文本 最小(单条 no-op 路径) 低 是(移除竞争框架) ✅ 首选
B 成功 no-op 错误→成功语义 中(波及失败语义消费方) 中 部分(打破重试反射,不确定) 回退
C 轮级硬停 新增轮级状态机 大(整条 compress 调度) 高 否(只封顶) 兜底

判定:需要 owner 拍板 A/B/C(或都不做)。已打 needs-decision 标签;在得到你的明确决定前,本 lane 不再动 PR #7822 的 kernel 代码。

Resolve kernel version + lockfile conflicts from the master merge:
- master advanced the kernel 0.0.214 -> 0.0.217 (crush rewriter removal,
  tier-boundary auto-split #7770, warn-channel #7729/#7791).
- this PR's pending #7821 kernel change (one-line parse fix + in-flight-ref
  message, kernel/src/boundaries.ts + parse-compress-input.ts) is NOT in
  master, so the merged kernel bumps to 0.0.218 (master 0.0.217 + 1).
- kernel/src files: zero overlap between the two sides (clean auto-merge);
  the only conflicts were the version field + the two lockfiles.
- lockfiles lock-synced (npm install --package-lock-only, no drift on
  root or kernel).
@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

Merge conflict resolved — PR #7822 is mergeable again (no longer dirty).

What I did this run:

Verification (live, this run):

  • GitHub API: mergeable: true, mergeable_state: blocked — no longer dirty ("blocked" is just branch-protection awaiting review/CI, not a conflict).
  • CI is running on the new head 897c25d: the fast static-gates (which includes lock-sync, kernel-guard, version-guard — the checks that validate this resolution) is passing; the 12-job test matrix is still in progress and will be confirmed by CI.

Note: this run was scoped to the merge-conflict resolution only. The separate in-flight-ref-loop design decision (🔶 需要决策, needs-decision label, posted earlier) remains pending with the owner and is untouched by this merge.


八问

  1. 是什么问题:PR 分支落后 master,与 base 分支产生合并冲突(merge state: dirty),阻塞合并。
  2. 什么原因导致的:master 从 4cad86035b3([PR] eg cleanup: identity row persistence on arm + eg new DB 7-table creation gate + kv 256 cap + flag default reverted to 0 | eg 扫尾:arm 时身份行落地 + eg 新库 7 表创建门 + kv 256 上限 + flag 默认值改回 0 (#7735/#7737) #7738)推进到 5bb3eb2cd9a([PR] eg_debug: wire evidence table — one row per request (IN/OUT headers + upstream status/headers + id channels) #7976),期间独立把 kernel 版本从 0.0.214 升到 0.0.217;本 PR 携带自己未合入 master 的 [Bug][dsh] compress: one-line entry rejected as missing summary -> retry loop arms breaker, armed receipt hides cause #7821 kernel 改动(一行 parse 修复 + in-flight-ref 消息),版本停在 0.0.215。两边从同一 0.0.214 基线各自 bump、都占了 0.0.215,产生版本冲突(仅 kernel 版本字段 + 两个 lockfile,kernel/src 文件零重叠)。
  3. 影响范围与严重程度:仅影响本 PR 分支的可合并性(冲突阻塞合并);不影响任何已发布行为。严重度 = 阻塞合并(非功能缺陷)。
  4. 怎么修复的:把 origin/master merge 进 PR 分支;kernel/src 两边零重叠、干净自动合并;因 PR 的 [Bug][dsh] compress: one-line entry rejected as missing summary -> retry loop arms breaker, armed receipt hides cause #7821 kernel 改动不在 master,合并后 kernel 版本 bump 到 0.0.218(master 的 0.0.217 + 1);两个 lockfile 做 lock-sync(npm install --package-lock-only,root 与 kernel 均无 drift)。
  5. 是否有回归问题:无。kernel/src 两边改动的文件集合不相交,无同文件语义冲突;lock-sync/kernel-guard/version-guard 均通过;完整 test matrix 由 CI 兜底确认。
  6. 是否破坏缓存:不涉及(纯版本/lockfile 冲突解决,不碰缓存/增量游标/去重键)。
  7. 是否改了设计方向:否(未改架构/边界/数据流;仅合并 master + 解决版本冲突)。
  8. 是否引入了新的配置:否(未新增任何 env/config/默认值)。

判定:冲突已解决并验证(mergeable: true,不再 dirty);static-gates(lock-sync/kernel-guard/version-guard)通过,test matrix 由 CI 继续确认。本 run 收工。

…sertions (#7976 follow-up)

#7976 added the unconditional eg_debug wire-evidence table (created in BOTH modes) but did not update the table-count assertions in tests/eg-sweep-egress-identity.test.ts, so every PR head rebased past the #7976 merge fails shard 1 (A1/A1b/B1: 9 vs 8 fresh-eg tables, 21 vs 20 legacy/converged). Master-level born-red (latent on master because the heavy test lane is plan-skipped on master push/schedule events); fixed here as a small mechanical expectation update so this PR's CI can go green.

(cherry picked from commit 0682f5b)
@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

3 red test jobs fixed — pushed d571fd6e471 as the final head.

What was failing: test (windows-latest, 22, 3), test (ubuntu-latest, 24, 1), test (ubuntu-latest, 22, 1) — all failing the same 3 assertions in tests/eg-sweep-egress-identity.test.ts (A1 / A1b / B1): the egress-plane table-count tests expected 8 (fresh-eg) / 20 (legacy) tables but got 9 / 21, because of an extra eg_debug table.

Root cause — a master-level born-red, not this PR's code: PR #7976 added the unconditional eg_debug wire-evidence table (src/storage/schema.ts:715 — "idempotent, unconditional, no legacy", created in BOTH modes) but did not update the table-count assertions in eg-sweep-egress-identity.test.ts. So every PR head rebased past the #7976 merge fails shard 1 on these 3 tests. It is latent on master because the heavy test lane is plan-skipped on master push/schedule events. This PR merged master (which includes #7976), so it inherited the red.

Fix (small mechanical, test-only): cherry-picked the existing already-reviewed fix 0682f5bea30 ("test: expect the shared eg_debug table in the eg-sweep table-count assertions (#7976 follow-up)") — it updates the assertions to count the unconditional eg_debug table (fresh-eg 8→9, legacy/converged 20→21). No src/ or kernel/ behavior touched. Pushed as the final head (no [ework:ci-held] marker) → this is the branch's one full CI pass.

Verification (live, this run): PR mergeable: true, mergeable_state: blocked (no conflict — "blocked" is just branch-protection awaiting review/CI). CI will re-run on d571fd6e471; the 3 previously-red jobs should now pass.

Coordination note: the fix currently lives only on the feature branch 2026-11-29_remove-auto-image-shed (not on master or ci-fixes), so other PRs rebased past #7976 will each hit the same 3 reds. It should converge to master (via that PR or a dedicated fix) so the born-red stops re-manifesting. (#4599 CI 总控 is closed, so flagging here.)


八问

  1. 是什么问题:3 个 test job 挂,都是 tests/eg-sweep-egress-identity.test.ts 的 A1/A1b/B1 表计数断言(期望 8/20 张表,实际 9/21,多了一张 eg_debug)。
  2. 什么原因导致的:master 级 born-red,不是本 PR 的代码。[PR] eg_debug: wire evidence table — one row per request (IN/OUT headers + upstream status/headers + id channels) #7976 加了无条件的 eg_debug 线证表(两种模式都建,schema.ts:715 "idempotent, unconditional, no legacy"),但没更新 eg-sweep 的表计数断言,所以所有 rebase 过 [PR] eg_debug: wire evidence table — one row per request (IN/OUT headers + upstream status/headers + id channels) #7976 的 PR head 都挂 shard 1;master 上潜伏是因为重测 lane 在 master push/schedule 事件上被 plan-skip。本 PR merge 了 master(含 [PR] eg_debug: wire evidence table — one row per request (IN/OUT headers + upstream status/headers + id channels) #7976)才继承到红。
  3. 影响范围与严重程度:所有 rebase 过 [PR] eg_debug: wire evidence table — one row per request (IN/OUT headers + upstream status/headers + id channels) #7976 的 PR 的 shard 1(3 个表计数测试)。严重度 = 阻塞这些 PR 的 CI 变绿(测试断言滞后,非功能缺陷)。
  4. 怎么修复的:cherry-pick 既有已审修复 0682f5bea30(纯测试断言更新,把无条件的 eg_debug 计入表计数:新鲜 eg 库 8→9、legacy/收敛 20→21)。小机械修复,不动任何 src/kernel 行为。
  5. 是否有回归问题:无。纯测试断言更新;eg_debug 表本就是无条件创建,断言跟上即可,不改任何运行时行为/输出/时序。
  6. 是否破坏缓存:不涉及(不碰缓存/增量游标/去重键)。
  7. 是否改了设计方向:否。
  8. 是否引入了新的配置:否。

判定:3 个红 job 已修(cherry-pick 既有修复 0682f5bea30),推 d571fd6e471 为最终 head,PR 仍可合并(mergeable: true,无冲突),CI 将在新 head 重跑确认。建议把该修复收敛进 master/ci-fixes,免得后续 PR 各自重复修。本 run 收工。

…218->0.0.219

Master advanced past the merge-base via PRs #7916 (eg_debug table-count fix, already cherry-picked here) / #7987 (eg_debug response-headers test) / #8028 (kernel WHEN-NOT-TO-COMPRESS gate). The only conflict was the eg-sweep test file: master added a new response-headers test block this branch lacked, so the resolution takes master's version (a superset - this branch's only change, the eg_debug table-count fix, is identical to master's).

Kernel version: both sides were at 0.0.218 (this branch for #7821, master for #8028) - a collision. Bumped to 0.0.219 so the merged kernel (carrying both #7821 and #8028 changes) has a distinct version and the kernel-guard passes.
@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

Conflict resolved and pushed. Master advanced past the merge-base via three PRs — #7916 (eg_debug table-count fix, already cherry-picked into this branch in the previous run), #7987 (new eg_debug response-headers test), and #8028 (kernel WHEN-NOT-TO-COMPRESS gate). The only conflict was in tests/eg-sweep-egress-identity.test.ts: master added a new response-headers test block this branch lacked, so the resolution takes master's version (a superset — this branch's only change, the eg_debug table-count fix, is byte-identical to master's).

I also bumped the kernel version 0.0.218 → 0.0.219: both sides were at 0.0.218 (this branch for the #7821 kernel change, master for the #8028 kernel change) — a version collision. The merged kernel carries both changes, so it needs a distinct version for the kernel-guard to pass. Lock-synced kernel/package.json + kernel/package-lock.json + package-lock.json.

Pushed as the final head 49c429868d4 (no ci-held marker, fast-forward merge — no force-push). Verified via GitHub API: mergeable: true, mergeable_state: blocked (no conflict — now waiting on CI checks).


八问

  1. 是什么问题:PR 分支与 master 冲突(dirty,无法合并)。master 在 merge-base 之后合入了 [PR] Remove the auto image-shed — oversized frames draw the upstream's own verdict (#7693) #7916/[PR] fix(relay): record eg_debug responses with verbose logging off #7987/[PR] kernel: add a WHEN NOT TO COMPRESS gate to all compression prompts #8028 三个 PR,其中 [PR] fix(relay): record eg_debug responses with verbose logging off #7987 在 eg-sweep 测试文件里新增了一个 response-headers 测试块,本分支没有,导致合并冲突。
  2. 什么原因导致的:本分支基于旧 merge-base(5bb3eb2);master 在其后独立推进。两边 kernel 版本都停在 0.0.218(本分支为 [Bug][dsh] compress: one-line entry rejected as missing summary -> retry loop arms breaker, armed receipt hides cause #7821 kernel 改动、master 为 [PR] kernel: add a WHEN NOT TO COMPRESS gate to all compression prompts #8028 kernel 改动),形成版本号碰撞——合并后 kernel 同时携带两个改动,必须 bump 到 0.0.219。
  3. 影响范围与严重程度:仅影响本 PR 的合并状态(dirty → 无法合并);不影响线上行为(代码本身没问题,只是合并被阻塞)。严重程度:体验瑕疵(阻塞合并,不阻塞功能)。
  4. 怎么修复的:① 测试文件冲突取 master 版本(超集:本分支唯一改动 eg_debug 表计数修复与 master 字节一致,master 额外带新测试块,无损);② kernel 版本 0.0.218 → 0.0.219(两个独立 kernel 改动各需一次 bump,合并后取下一版本号,让 kernel-guard 通过);③ 三个锁文件 lock-sync;④ 以 merge(非 rebase)方式推入,fast-forward,无 force-push。
  5. 是否有回归问题:无。冲突解决取的是 master 超集,本分支改动无损;kernel 版本 bump 是机械操作,未触碰任何 src/kernel 行为逻辑;[PR] kernel: add a WHEN NOT TO COMPRESS gate to all compression prompts #8028 的 kernel 改动来自 master(已在其自身 PR 里声明并批准),不在本 PR 的 diff 范围内。
  6. 是否破坏缓存:不涉及。
  7. 是否改了设计方向:不涉及。
  8. 是否引入了新的配置:不涉及。

判定:冲突已解决,PR 现在 mergeable(mergeable_state: blocked = 等 CI 检查),可进入正常 review/合并流程。

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

bug Something isn't working needs-decision p2

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug][dsh] compress: one-line entry rejected as missing summary -> retry loop arms breaker, armed receipt hides cause

2 participants