Repository navigation
[PR] fix: watermark fastpath (plugin full-resend watermark fastpath) silently disabled by input release mutation | fix: 水印快路径(plugin full-resend watermark fastpath)被输入释放改动静默禁用 - #6640
Merged
Conversation
…mark fastpath (#5403/#5418 regression) The #4753 input-release (bodyText = undefined before streaming) made the fastpath gate in prepare-openai (bodyText !== undefined && ...) unreachable: the watermark fastpath silently never fired, and plugin wire sessions paid the full reparse+rehash on every turn. Release the text only on the slice where the fastpath cannot fire (non-openai wire or flag off); the strict gate (pluginMode + !titleGen) in prepare-openai stays authoritative. Also update the A/B pin: #5687 moved the dsh single-shot sidecar distinction from "tool-less" to the sidecar budget (hasSingleShotBudget, <=8192), so the test's 64K tool-less turn-0 is now (correctly) a main turn — model the real sidecar with a 4K budget to keep pinning "side lane never stamps". (cherry picked from commit 09577a2)
Contributor
📦 Built Package ArtifactBranch: Latest build — install this exact versionnpm install -g billion-context@0.0.9834-pr.6640.c875dc2This exact version is immutable and reproducible. The rolling Recent builds (commit → version)
Download artifact
tar xzf billion-context-pr6640.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.1191-master.e5e1647 # this exact build
npm install -g billion-context@master # always the newest merged build
|
This was referenced Nov 14, 2026
Merged
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.
现象
openai 线上的插件全量重发水印快路径(#5403/#5418)完全不再生效:每轮请求都在做全量重解析+重哈希(内存驻留回归),且没有任何报错——快路径静默失效。仓库自己的 A/B 钉测试(tests/issue5403-watermark-fastpath.test.ts,
#5418 A/B byte-equality + residency band)在 master 上是红的。根因
#4753 的输入释放(src/server/handle.ts:
bodyText = undefined,在转发前释放原文省内存)把原文在水印快路径的判定之前扔掉了。快路径的 gate(src/server/prepare-openai.ts:135bodyText !== undefined && pluginMode && !isTitleGen && featureEnabled(...))从此永不成立——prepareOpenai收到的 bodyText 恒为 undefined。修复
handle.ts 只在快路径不可能触发的切片上释放原文(非 openai 线或 flag 关闭);prepare-openai 里的严格 gate(pluginMode + !titleGen)仍是唯一裁决者,不重复判定逻辑。另外把 A/B 钉测试的 turn 0 改成真实 sidecar 形状(4K 预算):#5687 已把 dsh 单次 sidecar 的区分条件从"无工具"改为 sidecar 预算(≤8192),测试里 64K 的无工具 turn 0 现在(正确地)是主回合,原断言过时。
验证
B stamp 1: measured wire total — null !== 4),修复后绿同一修复已以 09577a2 直接补进 release 分支 2026-11-13_release-v0.1.214(#6552 的 CI 因合入 master 后变红,即由此修复)。