Repository navigation
[PR] Stop bili's own thinking-mass projection from faking client-side cache-break attribution - #4055
Closed
ranxianglei wants to merge 1 commit into
Closed
ranxianglei wants to merge 1 commit into
ranxianglei wants to merge 1 commit into
Conversation
… seam attribution (#4054) noteInboundMessages fingerprinted each inbound core message from its full JSON — including the projected thinking mass, whose single producer is bili's own #1320 projection (projectThinkingMass mutates prepared.originalMessages before the relay capture). A meter delta between requests therefore flipped the fingerprint at a mid-list index and the #3023 arm booked an independent outbound break as a client-side mid-history rewrite (prov=client, clientInserts+1). Strip the top-level field before fingerprinting; real client-origin changes (signature/text/tool args) still flip the fingerprint. Regression tests: the three synthetic cases shipped in the #4042 report bundle (RED on bc4a3f8) plus two direct capture-side pins. Behavior change (diagnostic surface only): samples whose ONLY inbound delta is the projected thinking mass now fall back to the legacy seam bucket instead of prov=client — fewer false client accusations; billing totals and compression decisions are untouched.
Contributor
📦 Built Package ArtifactBranch: Option A — Install this exact build (recommended)npm install -g billion-context@0.0.4837-pr.4055.092d724This exact version is immutable and reproducible. The rolling Option B — Download artifact
tar xzf billion-context-pr4055.tgz
npm install -g packageInstall instructions are refreshed on each push. |
This was referenced Oct 20, 2026
ranxianglei
pushed a commit
that referenced
this pull request
Oct 20, 2026
Owner
Author
|
(ai: vllm-qwen/qwen3.8-27b) 作为 PR #4053 的重复关闭——同症状 + 同机制 + 同根因:
本 PR 的独特增量(capture 侧直接 pin:计量波动 → fps 不变)已并入 #4053 分支,标注 commit |
z0d0dOr
pushed a commit
to z0d0dOr/billion-context
that referenced
this pull request
Oct 24, 2026
…ojected meter fluctuation (union coverage from dup PRs ranxianglei#4055/ranxianglei#4056) (cherry picked from commit 7343c0f)
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.
Fixes #4054 (来源 #4042 附带 fixture bundle 中的独立 RED 用例;与 #4042 主缺陷不同机制,已拆分立项)
是什么 / 为什么
noteInboundMessages对每条入站 core message 取完整 JSON 做 sha256-16 指纹——其中包含thinkingTokens,而该字段全仓库唯一的生产者是 bili 自己的 #1320 投影(projectThinkingMass在 relay 捕获前原地改写prepared.originalMessages)。计量值在两轮请求之间波动 → 中间位置指纹翻转 →detectSeam的 #3023 client arm 把一次独立的 outbound 断点记成「client-side mid-history rewrite」(prov=client,clientInserts+1)。客户端什么都没改,锅却扣给了宿主。修法(机制层)
指纹化前剥离顶层
thinkingTokens(该字段永不可能作为 client-origin 证据)。真实的内容变更(签名/文本/工具参数)仍会翻转指纹——#3023 arm 对真 client churn 的检出能力不变(对照用例钉死)。单模块(src/cache-ledger.ts),不触碰 kernel/wire/config/persistence。行为变更披露(诊断面)
仅入站差异为投影计量值的样本:旧值 prov=client → 新值回落 legacy seam 桶。方向 = 假阳性减少;计费总额(miss/tr 记录)、压缩决策、其他归因臂(ttl/side/rewind/orphan-sweep/foldSeq)全部不变。
验证