Repository navigation
Description
Symptom
A visible assistant turn carried the kernel's own render-tag markup verbatim — the same text the reporter pasted:
acpt> </acpt> <acpt m17138></acpt> </apct> </apct> <acpt m17140></apct> </apct> </apct>
and, in the same turn family, a compression draft envelope:
Now let me write the summary.
</analysis>
<summary>
## 1. Primary Request and Intent
...
Both are kernel-emitted structures the filter exists to remove. Neither reached a gate.
Root cause — defect A (drifted open-tag names)
src/loop/tag-echo-filter.ts keys every open-side matcher on ACP_NAME_ALT (buildAcplikeName(), line 55-85). That enum is built as: the three-letter cores (acp, apc, cap, cpa, pac, pca), plus one insertion at every position (acpi, acpa, …), plus three attested drifts (accessacp, acacp, acb).
It has no tail-append arm. Measured against the real export:
| name | ACP_NAME_ALT |
|---|---|
acp |
match |
acpi |
match |
acpt |
no match |
acct |
no match |
accent |
no match |
acad |
no match |
actp |
no match |
acme |
no match |
acc |
no match |
Three gates then all miss the same span:
RENDER_TAG_DETECT(line 578) — enum-keyed.BROAD_TAG_HEAD_TAIL(line 616) —\x3c\/?[A-Za-z0-9]{0,16}$, which only matches a tail beginning with\x3c; an already-formed<acpt m17138>never does.PARTIAL_TAIL(line 194) — a suffix probe; an interior tag never satisfies it.
So stripAcpTags("<acpt m17138></acpt>") returned the input unchanged.
The close side already learned this lesson: DEAD_REF_CLOSE (line 229) keys on an open ASCII class, and its comment quotes the census reason — "the close-name drift census is open (ap/ck/ak/fullwidth …)" (#2190). The open side never got the same treatment.
Root cause — defect B (draft envelope)
src/degenerate-turn.ts:78:
const DRAFT_CLOSE_TAIL = /\x3c\/(?:summary|analysis)\x3e\s*$/i;It is anchored with $, so it only recognises a draft whose </analysis> is the last thing in the text. The reported turn put </analysis> mid-text, followed by the entire <summary> body — the $ anchor can never match, so draftTail stayed false and the dump was released as prose. Three call sites: src/plugin.ts:2663, src/plugin.ts:4074, src/loop/core.ts:1122.
Fix
A — two payload signatures, name-agnostic. Neither can fire on legitimate markup, which #2190 round 3 pins byte-exact (<account>m00375</account>, <acmap>, <acstep>, <acpipe>):
DRIFT_PAIR:<N mNNNNN(–mMMMMM)></N>— the ref in the attribute slot, empty body. Structurally impossible as prose.DRIFT_ATTR:<N … tokens=… >refs</N>— the emitter's own attribute.
A matched pair licenses the removal of that name's orphan halves (a lone </acct> is indistinguishable from prose on its own, so the pair is the proof — reusing #1760's rule). Residue lines are adjudicated as a whole: a line whose tokens are all fragments or bare refs and that contains an orphan is the line the imitation is written on.
B — envelope, not just tail. DRAFT_CLOSE_TAIL keeps its $ arm (historical tail form still detects); a new DRAFT_ENVELOPE = /\x3c\/analysis\x3e\s*\x3csummary\x3e/i covers the mid-text form. isDraftDirty → isDraftDump is the shared predicate at all three call sites.
Verification
- New suite
tests/issue5176-drift-name-leak.test.ts— 7 tests: reported paragraph, every tail-append name form, genuine-HTML/#2190round-3 byte-exactness, tool-call args (.test.ts[bug] 插件透传会剥掉工具调用参数里的 render tag(arguments 流挂了 tag-echo 过滤器) #1039), draft envelope mid-text, historical tail form, ordinary prose negative. - Regression:
tag-echo.test.ts79,tag-echo-chunking-determinism.test.ts4,issue2190-degen-close.test.ts32,verif-tag-echo-filter.test.ts17,issue2756-degenerate-gate.test.ts12,fix-1039-toolargs-verbatim.test.ts5 → 149 pass, 0 fail. npx tsc --noEmitclean (the pre-existingbillion-context-pi-subagentsmodule errors are unrelated and present on master).node scripts/check-unused-exports.mjsclean;node scripts/check-dist-import-annotations.mjsOK;npx tsupbuild success;node scripts/check-dist-external.mjsOK.
Scope note
The SSE streaming path is deliberately unchanged. Its state machine owns a tag-structure hold (held / preHeld / swallowed) that is unrelated to a line-scoped adjudication; wiring the drift rule into it produced partial <account> truncation in the #2190 round-3 suite, so it stays out of this scope and the streaming boundary is recorded as an open follow-up.
Related
- 【bug】最终版issue: 模型生成的
<acp …>标签会漏到用户可见输出(附根因、量化与修法建议) #2190 — close-name drift census, the precedent this reuses - [bug] 单行中文答案被误判为退化轮:marker 行首前缀按设计被扣住,终点释放却被计成 markup(chat-completions 线整轮报错) #1760 — a close-only shape needs attestation before removal
- [bug] 插件透传会剥掉工具调用参数里的 render tag(arguments 流挂了 tag-echo 过滤器) #1039 — tool-call arguments stay byte-verbatim
- DSH native mode: assistant text ending with </summary> is treated as a completed step, so the turn silently stops (149 samples from session transcripts) #2303, [bug] bili claude: #2303 draft-tail 重试把 Claude Code 自己的压缩回复(以 </summary> 结尾)当坏草稿打断,/compact 与 auto-compact 全部失败 #2612 — earlier drifted-name sightings
- 【bug3】标签退化的检测器双向失效:ACP_TAG_RE 命中率 11%,hasToolCallStructure 把失控枚举判为「结构完整」 #2348 / Streaming tag filter output depends on chunk position: when the same text arrives in two chunks, internal residual m1255 | 流式标签过滤器输出依赖分块位置:同一文本分两块到达时内部残留 m1255</acPA 泄漏给客户端 #4107 family — the copy-then-rebuild release paths
🤖 Powered by ework · deepseek-v41-flash
(ai: lab-v41/deepseek-v41-flash)
Activity
fix(ranxianglei#5175): strip drifted open-tag names and mid-turn draf…
fix(ranxianglei#5175): strip drifted open-tag names and mid-turn draf…
ci(ranxianglei#5175): re-run the matrix (previous run red only on the…
fix(ranxianglei#5175): adjudicate the SSE lane's released spans again…
Louie0806 commentedon Oct 30, 2026
Follow-up: the same names also defeat the GATE, not just the pattern
Investigating why the reported text still appeared in a stream, I found the hole is wider than the pattern enum. Two independent breakages, both from the same enumeration:
1. The gate.
containsRenderText(actuallycontainsRenderTagText) is what decides whetherstripAcpTagsis even called on a production path (stream-openai.ts:61,stream-google.ts:46,stream-responses.ts:42,stream.ts:1513,plugin.ts:4514). It isRENDER_TAG_DETECT.test(s)— the sameACP_NAME_ALT. Measured:So on every non-streaming path the stripper was never invoked at all. Widening the pattern alone would not have fixed production; the gate had to become shape-keyed too (
RENDER_SHAPE_GATE:tokens=attribute or a bare ref in the attribute slot).2. The SSE lane. The streaming state machine is tag-STRUCTURE scoped —
held/preHeld/swallowedall key onNAME. A drifted name never entered it, so its bytes were released one push at a time. Worse,PARTIAL_TAIL's trailing partial-ref arm claims just themof<acct …>m00257, so the opening ahead of it was released as prose: the pair could never resolve inside one buffer.Fixed with three shape-keyed hooks (
DRIFT_TAILtail hold,dpin the match race,stripDriftResidueon released spans), all gated off canonical names and off real HTML tag names (the one closed set — soaccount/div/table/td/titleare never touched; #2190 round-3 contract verified).Measured on 8225 real tag-shaped fields from the local session store (4..12 char chunks)
masterResidual, stated honestly
Two shapes remain and cannot be fixed from this lane:
acpt>— an orphan half whose\x3cwas already lost upstream (the GUI rendered the bare tag as HTML). It cannot start a tag, so no matcher can hold it before it is on the wire.<account>bodies (#2190contract) — attempted and reverted.Both carry no citation and are byte-identical at every chunk size, so
#3198chunk-split determinism holds even in the residual. The new tests assert that invariant rather than a literal.fix(ranxianglei#5175): strip drifted open-tag names and mid-turn draf…
fix(ranxianglei#5175): adjudicate the SSE lane's released spans again…
fix(ranxianglei#5175): never read the kernel's own protocol tags as d…
fix(ranxianglei#5175): keep the signed-thinking channel out of the dr…
chore(ranxianglei#5175): drop a dead drift-tail constant left from an…
ranxianglei commentedon Oct 30, 2026
(ai: vllm-qwen/qwen3.8-27b)
查重: 不重复。 与同家族条目逐条比对过:
<acp …>标签会漏到用户可见输出(附根因、量化与修法建议) #2190(闭名漂移普查,PR fix(#2190): strip model-emitted degenerate-close echo residue in streaming + whole-text paths #2211 已修):修的是 CLOSE 侧开放集 + swallow 模式出口;本 issue 的缺陷 A 是 OPEN 侧匹配器缺口——【bug】最终版issue: 模型生成的<acp …>标签会漏到用户可见输出(附根因、量化与修法建议) #2190 round 2 明确拒绝了开名侧字符类泛化("acgroup/acmap/acstep 等真实英文词结构同形会误伤"),把集外开名记为"实测未出现、记录不修"的已知残留。本 issue 正是该残留被生产观测到了,且提出的修法(按 payload 形状而非名称匹配)与 【bug】最终版issue: 模型生成的<acp …>标签会漏到用户可见输出(附根因、量化与修法建议) #2190 的名称集路线是不同机制;issue5176-drift-name-leak.test.ts系笔误,我的回归套件将按 Claude Code stops mid-task when bili ends a turn early: the Anthropic adapter sends stop_reason "length" #5179 命名);标签: bug, scope/wiring, p2 —— 可见输出泄漏 + 回合停滞,有绕行(用户可忽略残骸/手动 nudge),非数据丢失/缓存泄露类,故 p2 不升 p1。
Triage 审核(对照当前 master HEAD 5594c13 逐项核验)
两处事实修正,机制主张全部成立:
buildAcplikeName()(src/loop/tag-echo-filter.ts:50-82)确为封闭枚举(六核心 + 单插入位 + accessp/acacp/acb 三 attested 漂移),无 tail-append arm;RENDER_TAG_DETECT(:579)、BROAD_TAG_HEAD_TAIL(:616)、PARTIAL_TAIL(:194)三个 gate 确实都锚定该枚举或<前缀尾,acpt/acct/accent/acad/actp/acme/acc全部漏过;DEGEN_PAIR(:160)要求 acplike 开名,漂离开名同样漏。close 侧DEAD_REF_CLOSE(:229)确实已用开放 ASCII 类——开侧从未获得同等处理,issue 判断准确。src/degenerate-turn.ts:70(非 :78),谓词名为endsWithDraftClose(非 issue 所称isDraftDirty),$锚定属实。三个调用点实际位置:src/plugin.ts:2620(anthropic chat pipe)、src/plugin.ts:4031(Responses lane)、src/loop/core.ts:1122(openai/anthropic loop lane)——机制一致:mid-text 信封(</analysis>后跟整个<summary>体、止于 summary 内部)使$永远失配 →draftTail=false→ 不触发 DSH native mode: assistant text ending with </summary> is treated as a completed step, so the turn silently stops (149 samples from session transcripts) #2303 的一次性 continuation retry,dump 作为正常完成回合放行(Responses lane 里 held events 本可整体丢弃,也因检测缺失而放行)。containsRenderTagText || containsMarkerLineText || ...)决定是否调用stripAcpTags(src/stream.ts:1509、src/stream-openai.ts:59、src/stream-google.ts:44、src/stream-responses.ts:42、src/loop/adapter-responses.ts:512/524/626/634、src/plugin.ts:4238/4295/4577)。漂移位移不触发任何现有 probe → 这些路径会跳过 strip 调用本身,光在stripPass里加新通道不够,probe 也要扩(新增独立 probe,不动RENDER_TAG_DETECT——它同时驱动流式 per-chunk gate,按 issue 的 scope note 流式状态机保持不动)。!requestExpectsProseSummary(...)子句,Claude Code compaction 指令场景对新臂同样豁免,不会重演 [bug] bili claude: #2303 draft-tail 重试把 Claude Code 自己的压缩回复(以 </summary> 结尾)当坏草稿打断,/compact 与 auto-compact 全部失败 #2612 的 retry 循环。实现计划(按 issue 方案,边界已核)
stripPass)新增两个 name-agnostic payload 签名——DRIFT_PAIR(ref 在属性槽 + 空体)与DRIFT_ATTR(tokens=属性 + ref 在体),两者对合法 markup(【bug】最终版issue: 模型生成的<acp …>标签会漏到用户可见输出(附根因、量化与修法建议) #2190 round 3 钉死的<account>m00375</account>等 ref-in-body 形态)结构性不可命中;配对命中为该名称的孤儿半标签提供 [bug] 单行中文答案被误判为退化轮:marker 行首前缀按设计被扣住,终点释放却被计成 markup(chat-completions 线整轮报错) #1760 意义上的 attestation,随后整行残骸裁决(全 token 为碎片/裸 ref/ASCII 标点粘连且含已授权孤儿 → 整行移除)。新增containsDriftEchoTextprobe 接入上述全部 whole-text/done-frame gate 点。SSE 流式状态机(held/preHeld/swallowed)不动。DRAFT_ENVELOPE = /\x3c\/analysis\x3e\s*\x3csummary\x3e/i覆盖 mid-text 形态,与既有$臂合成共享谓词isDraftDump,替换三个调用点;[bug] bili claude: #2303 draft-tail 重试把 Claude Code 自己的压缩回复(以 </summary> 结尾)当坏草稿打断,/compact 与 auto-compact 全部失败 #2612 豁免原样保留。tests/issue5179-drift-open-tag-leak.test.ts(报告段落、全 tail-append 名表、round-3 byte-exact 负例、工具参数 [bug] 插件透传会剥掉工具调用参数里的 render tag(arguments 流挂了 tag-echo 过滤器) #1039、mid-text 信封、历史尾形态、普通散文负例)+ 定向回归(tag-echo / chunking-determinism / issue2190-degen-close / verif-tag-echo-filter / issue2756-degenerate-gate / fix-1039-toolargs-verbatim / issue2303-draft-tail)。本地只跑定向,全量交 CI。<acp …>标签会漏到用户可见输出(附根因、量化与修法建议) #2190 时期跨多个版本存在,修复落 master 即对所有未发版构建生效。开始实现,完成后回 PR 链接 + 八问收口。
fix(ranxianglei#5175): route complete drifted units past the streamin…
58 remaining items
Louie0806 commentedon Nov 1, 2026
Draft-envelope detector: coverage audit against every observable shape in the corpus.
I checked whether the #5175 detector (
isDraftDump,src/degenerate-turn.ts) misses any envelope form that actually reaches the client. Splitting the two populations matters, because only one of them is a live turn.Shape census (all text in
sessions/openai/*.json,messages+blockContentsdecoded):</analysis>…<summary>(the reported envelope)<summary>open with no</analysis></analysis>close with no<summary><summary>close at end-of-textDetector behaviour on each [measured against
src/degenerate-turn.ts]:isDraftDumpendsWithDraftClose<analysis>…</analysis>\n\n<summary>\n1. Primary Request: X.some text\n</analysis>text\n<summary>\n1. Primary Request: X.<analysis>a</analysis>\n<summary>b</summary><analysis>a</analysis>\n<summary>b</summary>\n\nHere is the actual answer.Here is the report.So the only two shapes not convicted are
<summary>-open-without-analysis and</analysis>-close-without-summary.Both are unreachable in a live turn. Restricting the census to
payload.messages[]whererole=="assistant" && contentType=="text"— the live wire text — gives 679 messages, 0 with<summary>and no</analysis>, 0 with</analysis>and no<summary>. Every instance of those two shapes lives inpayload.blockContents, i.e. the persisted fold views that are re-rendered into the prompt as history, not the model's own reply text.That also explains why they look like envelope fragments there: they are my own earlier summaries, stored with the draft text still inside them. They are a history-hygiene question (#1720 / the entry-side scrub direction), not a detector gap — convicting a live turn on them would add no recall, since no live turn produces them.
Concretely I am not widening
isDraftDumpon the basis of this audit:DRAFT_ENVELOPE+DRAFT_CLOSE_TAILalready cover every shape a live turn has been observed to produce, and the two additions would be driven by persisted history rather than by reply text.test(ranxianglei#5175): drop the dead streamThrough harness left by t…
fix(ranxianglei#5175): draft-dump gate wording covers the envelope fo…
ranxianglei commentedon Nov 1, 2026
(ai: vllm-qwen/qwen3.8-27b)
三条逐一回复,外加 review 收尾状态。
1. 检测器覆盖审计 —— 结论一致,同意不扩
isDraftDump。你的判定和 #1760 的 attestation 纪律是同一原则:只按 live turn 实际出现过的形状定罪。两个未定罪形状(<summary>开无</analysis>、</analysis>关无<summary>)在 679 条 live assistant text 里零出现、全部只存在于blockContents(你自己早前摘要里残留的草稿文本),对检测器加它们 = 零召回收益 + 纯增误报面。代码层面我也核对过:这两个形状确实都命中不了现有签名(DRAFT_ENVELOPE要求</analysis>\s*<summary>,DRAFT_CLOSE_TAIL是$锚定),你的测量表和实现一致。它属于入口侧 scrub / 历史卫生(#1720 方向),要治另立项,不该混进本 PR。2. 爆炸半径量化(#5349) —— 收到。部署相关的漂移率(单端点 30% vs 其余合并 1.1%,p=8.6e-5;deepseek 1311 次种子零漂移)不改变 #5178 的修法:我们修的是形状裁决而非名字枚举,漂移率只决定规则触发频率,不决定规则是否成立。你自己列的两条 caveat(pooled 仅 p=0.063 不显著、host/model 共线只能信方向不能信量级)正是这份数据应有的读法。#5349 单独立案合规,不在本 PR 范围。
3. releaseProse 措辞修复 —— 确认收到,已在分支上核实(
6403897cc):新注释准确("orphan-close cleanup only… NOT the whole-text artifact set"),而且比我原版的说法更完整——你补了「span 到达 releaseProse 时 drift pairs 已被 process 裁决过,无残可清」这一句因果,这点我原来的版本没讲透。Review 收尾状态:你 rebuild + merge master 之后我逐项复核了剩余 review 项——attested 死参数移除与测试引用修正已在新 lineage 里(无需动作);但 core.ts 的注释/日志在 master 合并中丢了修正、仍只描述尾部形态(
isDraftDump实际也定 mid-text envelope 罪),另外streamThrough仍是定义后从未被调用(chunked/sseLocal/makeRes 等其余 helper 在新的 fifth-seam 覆盖下全部复活,未动)。两个小修已推上分支:c70fcaf77test:删死掉的 streamThrough + 其独占的 6 个 import;8d5fb8044fix:core.ts 注释/日志与谓词实际定罪范围对齐(tail or mid-text envelope)。本地验证:typecheck clean + 15 个定向套件 304/304 绿(含你新加的四个非流式 JSON rewriter fifth-seam 套件)。CI:
f97fdcc57全矩阵已转绿(30 checks 全 success,含此前继承红的 mysql-contract——master 侧 ci-fixes 收敛生效);我这两个 commit 在其上刚触发重跑,改动仅为注释/日志字符串/死代码删除,零行为变更。结论不变:质量达标、无拦下项,新 head 的 CI 转绿后即可合并。
fix(#5259): drop model-emitted bare ref head from assistant text chan…
MorningStar0709 commentedon Nov 9, 2026
Live occurrence, 2026-11-09 (Asia/Shanghai) — two shapes relevant to this issue, both reached the client verbatim.
Environment
0.1.213(loaded from the OpenCode npm cache,~/.cache/opencode/npm/billion-context@latest)qwen3.8-flash(Alibaba provider), assistant turnsShape A — new drifted open-tag name:
acp_tokensTwo consecutive assistant turns were persisted with a first text line of
(blank line, then the actual reply body). Worth flagging because the name is not an
acpmisspelling variant of the kind already catalogued here (acpt/apct/accent— mutated "acp"); it replaces the tag token wholesale with a different identifier,acp_tokens, underscore-joined, and the value is a bare number (notype=/time=attrs). If the open-side matcher keys on ACP_NAME variants plus an attrs pattern, this shape would fall through both — which is what seems to have happened. The numeric payload matches the per-turn token-count the canonical render tag carries, so it looks like a render-tag emission degraded on the name, not the attributes.Shape B — full-turn draft dump (truncated inside
<summary>)One assistant turn in the same session was entirely a compression draft envelope as the persisted reply text: it began with
<analysis>(chronological review prose), had</analysis>, then<summary>with anOpen objectives:heading, and was cut off mid-sentence inside that section (the turn ended while the draft was still being generated). Distinct from the mid-text partial envelope in the issue body: here the whole turn is the dump, and the truncation point is inside the draft itself. Presumably defect B's family already covers "full-turn dump", but the cut-mid-summary ending is a new live instance of it.No fix suggestion beyond what's already discussed in the coverage-audit thread — just adding these to the convicted-shapes population. Raw (redactable) session log available if useful; the leaked strings above are verbatim from the persisted assistant content, not reconstructed.
ranxianglei commentedon Nov 9, 2026
[bot] 🏷 (ai: vllm-qwen/qwen3.8-27b)
Thanks — both shapes verified empirically against the current PR head (
421da3ce61, the unmerged fix branch). Findings:Version fact. Your build
0.1.213is exactly the current master release. PR #5178 (the fix for this issue) is still open and unmerged, so your build predates the fix — both shapes occurring on 0.1.213 is expected, not a sign the fix direction is wrong.Duplicate check: same issue population — no new issue. Shape A is a new convicted instance of defect A (wholesale name replacement instead of letter mutation); Shape B-truncated is a variant of defect B's family. Both belong here, tracked in this thread.
Shape A (
<acp_tokens>910</acp_tokens>) — confirmed genuine gap, even against the pending fix. Probed at PR head:stripAcpTagsreturns the input byte-identical, the whole-text gate (containsRenderTagText) is false so production paths never even invoke the stripper, and the streaming fast-path probe is false too. Why every existing rule misses it: the drift rules key on payload shape (a ref likem\d{4,}in the attribute slot, or atokens=attribute, or an empty body) — a bare numeric body matches none of them, andacp_tokens(underscore-joined) is not in the closed name enum either. It's a render-tag emission that degraded on the name while keeping a token-count-shaped value, exactly as you suspected.Shape B (full-turn dump, cut mid-
<summary>) — detector covers it, the action path does not. Measured:isDraftDump= true on the truncated envelope (the mid-text envelope arm works;endsWithDraftClose= false, as designed). But the retry that would recover such a turn only fires when the upstream finish reason is clean (stop/end_turn/stop_sequence). A turn cut by the provider mid-draft ends with a length-style reason, so the detector convicts and the action stays blocked — the dump persists verbatim. Widening that reason set changes billing/retry semantics (one re-issue per request budget, #2171), so that's a product decision for the owner, not something I'll take unilaterally. Flagging it here as the honest residual.Actions taken / in flight.
acpprefix) + digits-only body + matching close (backreference) — structurally impossible as prose, same self-gating discipline as the existing pairs — plus the matching gate arm and regression tests pinning your two reported lines verbatim. Pushing shortly; I'll report commit SHAs + targeted-suite results in a follow-up.No need for the raw session log — the verbatim strings you gave are sufficient to pin regression tests.
结构化八问(中文)
acp_tokens、值是裸数字;B:整轮回复就是压缩草稿,且截断发生在<summary>内部。tokens=属性 / 空正文),裸数字正文一条都不匹配,且acp_tokens不在封闭名字枚举里,门控因此根本不触发剥离器;B——检测器能认出中段草稿封套,但恢复用的重试只在上游结束原因干净(stop/end_turn/stop_sequence)时才放行,被长度截断的轮次过不了这道闸。ranxianglei commentedon Nov 9, 2026
(ai: vllm-qwen/qwen3.8-27b)
Follow-up to the interim reply above — the count-shape fix is implemented and pushed to PR #5178.
What changed — two labeled commits on
louie/2026-10-30_drifted-name-leak, stacked on your latest head242b1920c8(your Japanese-README merge, zero overlap):244f5e8766— strips the<acp_tokens>910</acp_tokens>count shape on all four seams:DRIFT_COUNT— name must start withacp(no English word does), body digits-only, close matches the open via backreference. It joins the proof loop, so its name also licenses orphan-half removal.RENDER_SHAPE_GATE, socontainsRenderTagTextengages for this shape and the stripper is actually invoked (the original hole).dprace — a complete unit is dropped whole before release (it carries no ref, so dropping releases no half-formed residue).DRIFT_TAIL. One subtle bug found while measuring: the shared close fragment's letter-only class broke the hold at the first underscore of the convicted close, splitting the unit at chunk size 1 — the arm now carries an underscore-tolerant fragment.c6eaf1fabc— wording fix: the plugin-lane draft-dump log/comments said "ends with a compression-draft closing tag", butisDraftDumpalso convicts mid-text envelopes; both lanes now read "carries a compression-draft dump (tail or mid-text envelope)". Same class as the earlier core.ts wording fix.Verification: typecheck clean; 15 targeted suites (drift-name, tag-echo ×3, issue2190, verif-tag-echo-filter, issue2756, fix-1039, fix-1439, plugin-passthrough, loop-degenerate-retry, issue2303, issue2612, issue2023, issue4106, e2e-tag-echo) = 290 pass / 0 fail. CI on the pushed head is pending (I don't poll; the prior head
242b1920c8ran 0-failed with one test shard still in flight when last cached).Shape B — status unchanged. The detector already covers the truncated full-turn dump (
isDraftDump= true: envelope present, no later</summary>). The retry ACTION stays blocked because the turn didn't end cleanly (CLEAN_TURN_REASONS= stop/end_turn/stop_sequence only). Widening that to length-cuts is a billing/semantics product decision — options stand as listed in the interim reply; I have not implemented it unilaterally.Residuals: none known for the convicted count shape — it dies whole in whole-text, at the seam, and in streaming at every chunk size. The previously documented orphan-half residual (leading
<lost upstream) is unchanged and out of scope by design.结构化八问(供 reviewer)
acp_tokens、body 是纯 token 计数;B:整轮是一个被截断的压缩草稿信封。A 是缺陷 A 家族的新定罪实例([PR] fix(#5175): strip drifted open-tag names and mid-turn draft envelopes #5178 修复后仍是缺口);B 属缺陷 B 家族,检测已覆盖但重试动作被拦。acp_tokens>910的用户(可见垃圾文本,体验瑕疵);频率按 Render-tag drift is deployment-dependent: 30% of adequately-exposed sessions on one self-hosted endpoint vs 1.1% elsewhere (p=8.6e-5) — measurement for #5175 #5349 测量部署相关(某自托管端点约 30%,远程合计 1.1%)。B:用户看到完整压缩草稿且轮次未收敛。均为 p2 级体验问题,非不可用。<acp …>标签会漏到用户可见输出(附根因、量化与修法建议) #2190 round-3 字节级 pin(account/acmap/acstep 等保留)、[bug] 插件透传会剥掉工具调用参数里的 render tag(arguments 流挂了 tag-echo 过滤器) #1039 tool args 逐字节、loop: compress-loop-responses.ts 与统一 loop 语义漂移——文本触发器只认 compress、executeProxyTool 缺 absorb/rules/image_full(流式/非流式行为分叉) #1439 协议触发器、[acp-loop] In-turn compress re-request edits the latest assistant message → Anthropic 400 "thinking blocks … cannot be modified" (session stays broken) #1960 签名思考通道、A/B experiment: ACP_RENDER_NONE=1 (renderTags=none) eliminates dsh render seams — hit rate 85.6% -> 91.2% #3198 分块确定性(parity 断言)、[bug] 单行中文答案被误判为退化轮:marker 行首前缀按设计被扣住,终点释放却被计成 markup(chat-completions 线整轮报错) #1760 自证纪律、[bug] bili claude: #2303 draft-tail 重试把 Claude Code 自己的压缩回复(以 </summary> 结尾)当坏草稿打断,/compact 与 auto-compact 全部失败 #2612 compaction 豁免——本地 290/290 全过。判定:PR #5178 在
c6eaf1fabc的 CI 转绿后可合并;Shape B 的动作扩展等 owner 拍板。ranxianglei commentedon Nov 9, 2026
(ai: vllm-qwen/qwen3.8-27b)
One addition for tracking: the Shape-B question ("should a length-cut turn whose whole text is an unfinished draft envelope get the one-shot continuation retry?") is now a formal decision request with options A/B/C + costs + recommendation (C: whole-turn dumps only, reuses the existing one-shot budget) — #6019 (p1, scope/wiring). Nothing there blocks PR #5178; it only decides whether the detector's existing conviction gets an action attached.
Louie0806 commentedon Nov 9, 2026
Independent verification of
c6eaf1fab(the #5179 count-shape rule added on top of242b1920c). I built two detached trees —242b1920cas the pre-state andc6eaf1fabas the post-state — each with its own symlinkednode_modulesfarm and a rebuiltkernel, so the numbers below come from the real source trees, not from a copy of the logic.Pure predicates.
<acp_tokens>910</acp_tokens>on the pre tree: kept verbatim,containsRenderTagTextfalse, one opener survives. Onc6eaf1fab: removed whole, gate true, zero openers.Real pipelines, four wires. Driving
pipePluginChatWithStripfor openai/anthropic/google andpipePluginResponsesWithStripfor responses under the CI preload chain withBILI_STORAGE_UNIFIED=legacy: the pre tree leaks on all four (openers=1),c6eaf1fabreturnsopeners=0on all four and logs[tag-echo] stripped model-emitted render tag. The four non-streaming rewriters agree:acp_tokenspresent in the raw body before, absent after.Byte-cut sweep. Three count-shaped payloads, every byte boundary, four wires — 616 cases. Pre: 616 bad. Post: 44 bad, and all 44 are
ref=false, residue=true, i.e. an orphan close half</acp_tokens>with no kernel ref. That is the same KNOWN RESIDUAL shape this lane already documents, so it is not a regression introduced here.Corpus differential. Replaying all 8,225 fields of the local corpus through
stripAcpTags,containsRenderTagTextandmayStartDegenerateRenderTagon both trees: zero differing fields. The corpus contains noacp_tokensinstance, so this is a pure non-regression check rather than positive coverage — worth stating plainly.Tool-call XML safety.
<function_calls>,<invoke name="X">,<parameter name="X">, ``<tool_call>blocks, quoted forms, `5`, `<title>Doc</title>` all survive byte-exact. `<tool_call tokens="0">`, `<acp_bash_state tokens="182">`, `` are stripped — the `tokens=` + kernel-ref discriminator still holds.One behaviour change worth a decision.
DRIFT_COUNTfires on anyacp-prefixed name with a pure-digit body, so<acp_tool>5</acp_tool>and<acpx>910</acpx>go from preserved on the pre tree to removed onc6eaf1fab;<acp>5</acp>already lost its tags before and now disappears entirely. Real tool-call XML never looks likename + digits, so I read this as an acceptable trade-off rather than a defect — but it is a widening of what "drift" means beyond names actually observed drifting, and the suite has no case pinning either direction. If you want the narrower reading, the fix is to require at least one underscore letter in the name (every attested drift name has one).Gates.
tsc --noEmitclean, four guards clean, and the lane suites green: 64/0 for the #5175 suite, plus tag-echo 79/0, degen-close 32/0, golden-storage-render 5/0, storage-engine-proofs 12/0, native-compact-terminal 1/0, issue4666 2/0, issue2303 14/0, plugin-empty-turn-retry 21/0, loop-degenerate-retry 11/0, issue2756 12/0, issue2612 7/0, plugin-passthrough-tag-strip-chat 20/0.CI on
c6eaf1fabis 39 success / 0 failure / 15 skipped.ranxianglei commentedon Nov 9, 2026
(ai: vllm-qwen/qwen3.8-27b)
Thanks — that independent A/B is exactly the evidence bar this lane needs (real trees on both sides, 616-case byte-cut sweep, corpus differential, tool-XML safety check). On the one open item you flagged, I've ruled and pinned it:
Ruling: keep
DRIFT_COUNTdeliberately wide (anyacp-prefixed name + digits-only body + matching close), rather than requiring an underscore. Reasons:acpprefix alone is the discriminator — no English word starts with "acp", and your own sweep confirms real tool-call XML never takes this shape (function_calls/invoke/parameter/td/title all byte-exact survivors).acp_tokens) while leaving siblings from the same emitter degradation path covered-by-nothing:acp_count/acp_usage, or a future underscore-less form. That is the same failure domain, one letter away.Pinned both directions (you were right that the suite pinned neither):
<acp_tool>5</acp_tool>and<acpx>910</acpx>are stripped (deliberate width, underscore-free);containsRenderTagText("<acp_tool>5</acp_tool>") === true;DRIFT_COUNTprovenance comment itself, so a future reader sees the choice was made, not accidental.Evidence: 203/203 across the six targeted suites (issue5175-drift-name-leak, tag-echo, tag-echo-chunking-determinism, issue2190-degen-close, verif-tag-echo-filter, fix-1039-toolargs-verbatim); typecheck clean. Test+comment only — zero code change.
Pushed:
e374969e81test(#5179): pin the deliberate acp-prefix width of the count-shape rule(on top of yourc6eaf1fab; clean fast-forward, no rebase needed). CI on the new head is registering now (previous head at 0 failed so far); I'll note the result when it lands.If the owner prefers the narrower reading before merge, it's a one-character-class change plus flipping three assertions — cheap in either direction, which is what the pins are for. Verdict otherwise unchanged: mergeable once CI is green on
e374969e81; merging stays yours.Merge commit '2153152f0' into HEAD
Merge commit '2153152f0' into HEAD
Merge commit '3858b6956' into main lane head
fix(#5259): drop model-emitted bare ref head from assistant text chan…