Repository navigation
[PR] verif: tag-echo-filter Replay Judge — found real bugs #4106 (cleanup not idempotent) and #4107 (streaming output depends | verif: tag-echo-filter 回放判官 — 发现真 bug #4106(清理不幂等)与 #4107(流式输出依赖分块) - #4108
Merged
Conversation
tests/verif-tag-echo-filter.test.ts: property judge over the REAL filter
family (src/loop/tag-echo-filter.ts). No solver — the interesting entry
points are outside the symbolic sublanguage today (lookaround +
\\p{So} regexes in stripAcpTags' family, stateful re.exec loops in the
stream filters), so this judge runs real code over adversarial
grammar-generated shapes (deterministic seed 0x7ea4c0de):
- P1 chunk-split equivalence (streaming ≡ whole-text) across 5 filter
factories, all split points for short texts + sampled + 3-way
- P1b absorb-instructed emission hold split-stability
- P2 stripAcpTags/normalizeEchoArtifacts idempotence
- P3 monotone length, P4 clean-prose passthrough, P5 residue duality
(strip-acted ⇒ strict detectors silent), P6 stats accounting,
P7 identity/compose sanity
- per-issue controls pinning the file's own history: #644 #1720 #1760
#1881 #2023 #2862 #717 #2405
TWO real bugs found immediately by the properties:
- #4106 stripAcpTags is NOT idempotent: the gated DEAD_REF_CLOSE pass
evaluates `out !== text` BEFORE the marker-line pass (which runs
LAST), so a marker line + trailing dead-ref-close text strips once
(keeps the dead ref) then strips MORE on the second call (marker
removal enabled an end-anchored TRUNC_REF_CLOSE match). Re-normalized
messages shrink per pass = unstable sent bytes. Pinned C#4106;
P2 domain excludes the shape until fixed.
- #4107 stream output depends on chunk boundaries (two shapes): (a)
dead-ref residue `m1255</acPA` is cleaned on whole-text push but
RELEASED to the client when the transport splits at the payload/close
boundary; (b) a bare close fragment `</apc ` at the chunk boundary
leaks in the split path. Both pinned (C#4107/C#4107-2); P1 domain
excludes tag-bearing texts until fixed.
Property overreach fixed during calibration (documented in-test):
containsMarkerLineText is the raw includes() pre-check (#717) while
removal is line-anchored (detect-but-keep for mid-line markers);
containsEchoResidue is an audit signal, not a strip guarantee
(#1760 close-only preservation); dropped vs dropCount are different
documented concepts.
README: judge table rows for the conflict-watch/snapshot/wire quartet,
responses-ingress, tag-echo-filter; found-bugs list += #4052 #4106
#4107.
Suite: 47/47 green (17/17 here). tsc clean.
Contributor
📦 Built Package ArtifactBranch: Option A — Install this exact build (recommended)npm install -g billion-context@0.0.4900-pr.4108.c01c5b6This exact version is immutable and reproducible. The rolling Option B — Download artifact
tar xzf billion-context-pr4108.tgz
npm install -g packageInstall instructions are refreshed on each push. |
ranxianglei
force-pushed
the
verif/tag-echo-judge
branch
from
October 21, 2026 05:38
48f7d11 to
9f85c2a
Compare
This was referenced Oct 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
方向 2(tag-echo-filter,1655 行全渠道标签过滤器)收服。接 #4103。
为什么是回放判官而不是求解器
strip 链的 regex 家族用了 lookaround(
ORPHAN_RUN_BEFORE/DEAD_REF_CLOSE/LONE_CLOSE)+\p{So}(MARKER_*),流式过滤器是带状态的re.exec循环——都在翻译子语言之外,求解器会降级到 any。判官改为真实代码 + 对抗性标签文法生成(确定性种子 0x7ea4c0de,失败可精确复现),这正是这个文件历史上出事的形态(流式边界)。判官(tests/verif-tag-echo-filter.test.ts,17 用例)
PAIRED正则吞掉最多 64 个字符的助手正文 #1720/[bug] 单行中文答案被误判为退化轮:marker 行首前缀按设计被扣住,终点释放却被计成 markup(chat-completions 线整轮报错) #1760/[bug] ACP 标签泄漏:<acp tokens=...> 标签被模型原样复述到回复正文,仅靠系统提示劝阻不足 #1881/tag-echo filter occasionally letsm01233</acp>remnant through to the client reasoning stream (model echoes refs from compress confirmation markers) #2023/[bug] tag-echo 在 0.1.194 仍放行一条 #2190 形态残渣(mNNNNN</acp 内联在正文行首,#2229 治理后复现) #2862/模型把 "📦 [ACP] Compressed" 确认标记伪造为普通 assistant 文本——17 次假压缩、0 次真实执行(自我回执幻觉) #717/【bug】bili 0.1.188 · ACP 标签形态异常 + 摘要泄漏 + 剥离日志可观测性 #2405)立刻发现两个真 bug(性质随机生成命中,均已在真代码上确认)
stripAcpTagson the same text will additionally remove the dead refere | 标签清理不幂等:同一文本第二次 stripAcpTags 会额外删掉死引用闭合(m3117</cPa) #4106 strip 不幂等:marker 行删除在最后,但 DEAD_REF_CLOSE 的out !== text门控在它之前求值——同一文本第二次清理会额外删内容(重清理路径已发送字节缩水)。钉 C#4106,P2 域排除该形状至修复。m1255</acPA整块被清、分块放行给客户端;裸闭合片段</apc跨界泄漏。钉 C#4107/C#4107-2,P1 域排除带标签文本至修复。两处判官越界(误设性质)已修并在测试里注明依据:
containsMarkerLineText是 raw includes() 预检(#717)而删除是行锚定;containsEchoResidue是审计信号不是删除保证(#1760);dropped与dropCount是不同概念。验证
@ranxianglei 人工合并;#4106/#4107 修复后翻转两个钉即可