Repository navigation
[PR] fix: close the judge's echo normalization to the filter's strip set (#3938 PR-D) - #3985
Merged
Merged
Conversation
…3938 PR-D) The judge's normText only stripped the canonical render-tag shape (RENDER_TAG_RE) while the outbound stream filters strip a much wider echo family (case-drift #1731, typo drift #673, bare #1881, degen/ self-close #2190/#2348, mangled open #2066, forged marker lines #717, bili-chain artifacts #1634, dead ref-close #2862). Two independently maintained shape sets silently drift apart — any future path that strips echo shapes asymmetrically would read as a false mid-history rewrite. normText now normalizes through normalizeEchoArtifacts (a thin export of stripAcpTags — the filter's own whole-text transform, single source of truth by construction), with a fast-path gate so clean messages pay no regex cost. RENDER_TAG_RE stays as a belt for the kernel's canonical form. Verified against the real filter outputs per shape (mangled opens leave the ref behind; fabricated chain markup fails checkpoint validation and is preserved verbatim — the judge agrees with the filter either way); arbitrary mid-history rewrites still flag.
Contributor
📦 Built Package ArtifactBranch: Option A — Install this exact build (recommended)npm install -g billion-context@0.0.4762-pr.3985.9bb1d56This exact version is immutable and reproducible. The rolling Option B — Download artifact
tar xzf billion-context-pr3985.tgz
npm install -g packageInstall instructions are refreshed on each push. |
Contributor
📦 Merged Build PublishedThis merge to master was published as npm install -g billion-context@0.0.685-master.860e617 # this exact build
npm install -g billion-context@master # always the newest merged build
|
This was referenced Oct 20, 2026
This was referenced Oct 20, 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.
(ai: zhipuai-lb/glm-5.3)
PR-D: renderTags 收口 — 判官豁免清单与过滤器形状集闭合
Part of #3938 (拍板①落地). 沿 #3944 (PR-A 判官转正) 的 L1 判官补上最后一块:归一化形状集与出站过滤器的剥离形状集单一事实源化。
三项审计结论(#3938 拍板① 要求的「重点看」)
kernel/src/render-refs.ts:79非 text 永不打标; ownTagRe 只剥自己 ref 的 tag (foreign tags survive); 纪律注释在案。normText只认规范 render-tag 形状,而过滤器剥的族大得多 — 两套形状集各自维护 = 判官静默落后于过滤器生长的维护接缝。修复
src/loop/tag-echo-filter.ts新导出normalizeEchoArtifacts(text):stripAcpTags的薄封装(尾部已含 marker 行 + bili 内部工件),带 fast-path gate(三个 contains* 预检全 false 直接返回,干净消息零正则成本)。单一事实源:过滤器长,判官归一化跟着长。src/invariant-judge.tsnormText改用它,RENDER_TAG_RE保留兜底 kernel 规范形。覆盖的 echo 族(出处见代码注释)
case-drift #1731 / typo drift #673 / bare #1881 / degenerate close #2190 / self-close #2348 / mangled open #2066 / forged marker #717 / bili-chain 工件 #1634 / dead ref-close #2862。
验证
Part of #3938