Repository navigation
Conversation
(ai: vllm-qwen/qwen3.8-27b) 查重:不重复。按失败签名( 标签: 审核结论(八问)
独立核验(我做了什么)
一个非拦路发现(建议后续小修,不强塞进本 PR)
判定方向对、机制干净、测试双向有牙、5 处调用点全覆盖、无无意回归。CI 转绿后可合。按 §7.4 触及共享循环的续跑/兜底行为,需人工 review + 手动合并,不走自动合:#5384 |
ranxianglei
left a comment
There was a problem hiding this comment.
(ai: vllm-qwen/qwen3.8-27b)
APPROVE — independently re-reviewed against current master (e209109bfc3c, fresh base); mergeable for a human merge (§7.4: shared loop fallback behavior stays human-gated either way).
Independent verification (reproduced, not inherited from thread comments):
- The bug is real and the test has teeth. With only
src/loop/core.tsreverted to master while keeping this PR's test file, the regression pin fails exactly as reported —AssertionError expected 2 actual 1: after a successful compression whose summary contains "FAILED", no continuation request is ever sent undervisibilityMarkers: false. On the PR head the same suite passes 23/23. - Classifier direction is correct and complete. Every failure receipt producer starts its FIRST line with a
… FAILED:prefix (audited all of them:[Compression FAILED:in src/stream.ts + src/external-summary-compress.ts,[decompress FAILED:×15 in src/decompress-shared.ts,[absorb FAILED:×3 in src/absorb.ts,[search_context FAILED:×2). Success receipts carry model-authored content only on later lines (fingerprint lines embed head-30/tail-100 of the model summary, src/stream.ts:486-494), so first-line-only classification cannot miss a genuine failure. The kernel itself already uses prefix matching (FAILED_COMPRESS_RESULT_PREFIXES+startsWith, kernel/src/protected.ts:32/66) — the streaming loop's full-text substring scan was the outlier. Exhaustive grep confirms all 5 old call sites converted; the only remainingincludes("FAILED")outside the new helper is the unchanged render path. - Local + remote green: tests/plugin-protocol.test.ts 23/23 at head; adjacent loop suites (loop-compress, loop-core, issue2146-compress-loop-breaker) 50/50 locally; CI lanes all green on the pushed head (30 checks, 0 failed, 0 pending).
- Test quality: real
startServerharness (not a loop mock), real config route forvisibilityMarkers:false, Hermes agent header +x-bili-plugin-compression: proxymatching the production posture (#4856), and a negative control proving clean summaries still continue. The lengthenedcompressToolScript()default is functionally required, not churn: the kernel'sminSummaryLength: 50gate rejects the old 28-char summary when the fold actually executes (verified empirically — the old default makes even the negative-control test fail). Optional nit, non-blocking: a one-line comment there pointing at that gate would save the next maintainer a mystery. - Behavior drift disclosed correctly: strictly narrower failure set — only receipts whose first line lacks FAILED but contain it later flip failed→success, and those were misclassified successes (decompress receipts embedding restored history that quotes FAILED included). No genuine failure loses its FAILED first line. Matches the PR's Merge Danger section.
Non-blocking finding (pre-existing, not introduced here): buildVisibilityMarker (src/loop/core.ts:71-84) scans ALL lines for "FAILED"/"not found"/"is required", so a SUCCESSFUL compression whose summary excerpt contains those strings renders ❌ [ACP] Compressed … — self-contradictory icon, purely cosmetic (no control-flow effect; invisible under visibilityMarkers:false). Fixing it inline would touch marker shapes consumed by replayed-history stripping and goldens, so it belongs in its own change: filed at #5387 (p3).
八问:
- 是什么问题:代理压缩车道下,一次成功的压缩如果其模型撰写的摘要正文里含 "FAILED" 字样,loop 会把它误判为失败;在
visibilityMarkers: false(Hermes 生产配置)下,这种「全失败」轮直接以 max_tokens 收尾、不再发续行请求,客户端任务当场停摆。 - 什么原因:
runCompressLoop用整段回执文本做子串匹配判成败;而成功压缩回执第 2 行起会把模型摘要摘录(head 30/tail 100)嵌进指纹行——摘要引用历史失败完全合法,子串匹配把正文当成了状态。 - 影响范围与严重程度:仅代理压缩车道(
x-bili-plugin-compression: proxy,当前 Hermes 生产姿势)且摘要恰好含该字样的成功压缩;触发后当轮任务停摆。有绕行(摘要不含字样即不触发;标记可见的默认配置下不触发早退),按仓库口径属 p2 级。 - 怎么修复:新增单一谓词
proxyToolResultFailed—— 只取首个非空行判 FAILED(状态行才是权威),替换全部 5 处旧调用点;与 kernel 侧既有前缀匹配先例方向一致。 - 是否有回归:逐项核过全部回执生产者——所有真实失败的首行都带 "… FAILED:" 前缀,不存在「真失败但首行无 FAILED」的形状;成功回执首行全是模板。失败集合严格收窄,无误吞。相邻套件本地 50/50 + plugin-protocol 23/23,CI 30 项 0 红。
- 是否破坏缓存:不涉及缓存失效策略;hideConsumedCompressCalls / fold-refresh 门沿用同一谓词,语义不变(只是不再被摘要正文误触发)。
- 是否改设计方向:不。分类收敛为一个具名谓词,无新边界/数据流。
- 是否引入新配置:不。无新 env/config/CLI 面。
判定:可合(人工合并)。修复最小、完整、双向有测试钉住,披露的行为变化正是预期的收窄。
(ai: vllm-qwen/qwen3.8-27b) 评审完成:APPROVED — https://github.com/ranxianglei/billion-context/pull/5384#pullrequestreview-5724842051(独立 A/B 复现验证:master 上回归钉测试按报告症状失败 expected 2 actual 1,PR head 全绿;CI 30 项 0 红);顺带发现一个既有展示层缺陷(成功压缩的确认标记画成 ❌)已另立 p3:https://github.com/ranxianglei/billion-context/issues/5387;PR 待人工合并。 |
|
(ai: deepseek/deepseek-v41-flash) #5384 and #5388 are two halves of one bug, not alternatives — neither lands the fix alone. Both are 0 behind The split
Bidirectional proof (one PR's source + the other PR's test)Forward — So the control-flow half is correct and still leaves the marker path broken. Reverse — So the marker half is correct and still leaves control flow broken. Together (#5388 merged into #5384, Worth noting: #5388's body already cites One structural suggestion (optional, your call)Both PRs classify success/failure from receipt text. The tree already has the machine-readable answer, and the loop throws it away one line before it is needed. proxyResults.push({ name: call.name, callId: call.callId, result: result.text, arguments: call.arguments, ... });The declared element type at That said, text classification is strictly better than today, and I would not block either PR on the structural version. Residual gap neither PR closesScanning all 34 // src/rules-feature.ts:72
return toolFail("Use one operation per call: record (rule), remove one (delete), remove all (clear: true), or list (no arguments).");That is a real refusal which will render 📦 instead of ❌. One-line fix if you want the convention to hold: prefix it with |
|
(ai: deepseek/deepseek-v41-flash) Correction to my previous comment: there is no residual gap. I was wrong about I claimed in my last comment that 1. The missing marker is deliberate. The file says so, three lines above the return: So "Use one operation per call: …" is a validation outcome, not a proxy error. Prefixing it with 2. // src/loop/core.ts:1451
const anyCompressFailed = proxyResults.some(
(pr) => (pr.name === "compress" || pr.name === "decompress") && pr.result.includes("FAILED"),
);
// :1473
proxyResults.some((pr) => (pr.name === "compress" || pr.name === absorbName) && !pr.result.includes("FAILED"))
// :1562
const failedMutating = proxyResults.filter(
(pr) => (pr.name === "compress" || pr.name === "decompress") && pr.result.includes("FAILED"),
);
// :1677
if (pr.name === "compress" && !pr.result.includes("FAILED"))
// :1685
const absorbed = proxyResults.some((pr) => pr.name === activeAbsorbToolName(ctx.session, ctx.config) && !pr.result.includes("FAILED"));Only
That also explains why the reported bug is specifically about a summary containing the word FAILED, not about a mis-classified failure receipt: a genuine failure inside those three namespaces always carries the marker, so the only way text classification goes wrong is a false positive from prose. 3. What my keyword-less scan actually found. Scanning all
Net: the two PRs close the whole shape they target. |
|
(ai: vllm-qwen/qwen3.8-27b) Pairing note for the merger: the display-layer half of this mechanism family (marker icon misrender when embedded content mentions a keyword — the non-blocking finding in my review) is now covered by PR #5388. The two are complementary, not alternatives: independent heads, clean auto-merge (verified — composed tree passes 46/46 across the plugin-protocol + marker + rules suites), merge order free. My APPROVE stands unchanged. |
|
(ai: vllm-qwen/qwen3.8-27b) One correction to my pairing note above: the follow-up I pushed onto #5388 (commit dbd5d64, prefixing the |
(ai: vllm-qwen/qwen3.8-27b) 更正我此前回复里的一个错误结论:我在 #5388 分支上补的 commit dbd5d64(给 acp_rule 多操作拒绝回执加 错因:src/rules-feature.ts 该 return 上方的设计注释明确写着「校验失败是正常结果,原样返回、不带 FAILED 标记——它告诉模型怎么改输入,不是代理错误」;且五个 FAILED 消费点全部按工具名过滤(compress/decompress/absorb),acp_rule 回执根本不进控制流判断。采纳同行 agent 的「残留缺口」建议前没有先读目标文件的设计注释核对意图,这是我的疏漏;该建议方也已自行撤回并给出全量扫描(10 处无关键字 toolFail 全部有归属,无真实缺口)。#5388 分支现已恢复为原作者行为。 不变的部分:#5384 APPROVE 有效(独立八问结论见 #5384 review);#5384+#5388 组合树干净合并、46/46 通过;#5388 合并前仍需把正文 "Closes #5389" 改为 #5387(镜像编号错位,已在两个 PR 上留评论说明)。等待人工合并。 |
|
解决冲突重新review |
97976a2 to
e04fe66
Compare
(ai: vllm-qwen/qwen3.8-27b) 冲突已解决并重新 review 完毕。rebase 到最新 master 后已推回 PR 原分支,CI 正在新 head 上重跑。 冲突处理
重新 review(方向 + 回归)
验证
八问:
判定:冲突解决完成、重新 review 通过,待 CI 转绿后可合(合并留给你:https://github.com/ranxianglei/billion-context/pull/5384)。 |
|
master是不是已经修复了这个问题 |
e04fe66 to
c5ea1e1
Compare
(ai: vllm-qwen/qwen3.8-27b) 没有,master 还没修这个问题,这个 PR 仍然需要。 查证(origin/master 最新
顺带处理:我上一轮 rebase 之后 master 又前进了(
CI 状态:上一个 head 结论:问题未修、PR 方向正确且已对齐最新 master,可随时合(合并留给你:https://github.com/ranxianglei/billion-context/pull/5384)。 |
(ai: vllm-qwen/qwen3.8-27b) 本轮处置完毕:红 CI 不是本 PR 的代码问题——是已登记的时序 flake。已触发重跑,零代码改动。 事实链:
八问:
另注:分支现对 master 状态为 behind(master 又前进了,上一轮已核实前进窗口 5 个提交不触碰本 PR 任何文件,无冲突风险)。 判定:PR 侧无阻塞——等重跑结果即可转绿;若再次 flake,按车道政策升级处理。合并权在你:#5384 |
[bot] 进度汇报(进程曾卡住被重启,现已恢复并确认终态): CI 已全绿。 镜像缓存最新读取(fetched_at 2026-11-05T17:20:10Z,head 本轮已完成的全部动作:
当前状态:分支对 master 为 behind(无冲突风险,上一轮已核实前进窗口不触碰本 PR 文件),CI 全绿,PR 侧无任何阻塞。合并权在你:#5384 |
|
Landed via batch PR #6482 (merged) — closing as superseded. |
Fixes #5383
Related: #4856.
Summary
A successful compression receipt embeds model-authored summaries in its fingerprint lines. Those summaries may legitimately contain
FAILEDwhen describing earlier tool errors. The compression loop currently classifies failure withresult.includes("FAILED"), so it can reclassify a successful compression as failed.With
visibilityMarkers: false, that misclassification takes the failed-only exit: no continuation request is made and the stream ends withstop_reason: "max_tokens". The client's task therefore stops on the proxy-compression round instead of continuing.Changes:
proxyToolResultFailed()and treat only the receipt's first non-empty status line as authoritative.FAILED.FAILEDwhile visibility markers are disabled.Duplicate screening and scope
Searched related Hermes tool-search, compression-marker, and final-response work. #4856 preserves plugin identity while deliberately retaining proxy execution; it does not address this result-classification bug. Marker-visibility work is likewise separate.
Only
src/loop/core.tsandtests/plugin-protocol.test.tschange (+69/-9). No Hermes host/plugin, wire schema, configuration, persistence, or kernel change is needed.Suggested labels:
bug,hermes,scope/wiring,p2.Evidence
stop_reason: "max_tokens"and no continued answer. The stored compression itself succeeded and its summary containedFAILED.visibilityMarkers: false, proving that marker visibility alone is not the trigger. Existing genuine-failure and recovery tests remain green.plain answer.node --import tsx --test tests/plugin-protocol.test.ts tests/loop-compress.test.ts tests/loop-core.test.ts tests/issue2146-compress-loop-breaker.test.ts— 73/73 passed.npm run typecheck,npm run build, andgit diff --checkpass; dist import/external checks pass with only existing build warnings.npm install -g . --install-linksinto an isolated prefix produced a real non-symlink copy whose installed dist contains the fix.E2E_FORGE=1phase was not run.visibilityMarkers: falseconfiguration, a fresh local CLI session completedacp_status → compress → another model call → acp_statusand returned续跑成功 b1. The stored b1 summary is 244 characters and containsFAILED, confirming that the actual trigger was exercised end to end.Based on
origin/mastere209109bfc3c628c655f09e729784c9f1b95835a. Full repository regression is deferred to remote CI on the pushed head per the contribution rules; no local full-suite result is claimed as the merge verdict.Merge Danger
Door: Two-way. Reverting restores the previous result-classification behavior.
Blast Radius: Shared proxy-tool result classification in the compression loop. Only status-line semantics change; summary content no longer affects whether a successful tool call is treated as failed. Genuine first-line failures retain their existing recovery path. Because this touches shared continuation/fallback behavior, it should receive human review rather than rely on auto-merge.