Repository navigation
[PR] Snapshot rendering: proxy lane outbound prefix rendered from server-side canonical history; existing sessions immune to | 快照渲染:proxy 车道出站前缀从服务端正史渲染,存量会话对内核升级免疫(#3756) - #3759
Merged
Conversation
…#3756) - src/server/snapshot-render.ts: maybeSnapshotView(session, clientMsgs) builds the outbound view from unified-storage tail rows: covered rows suppressed by block seq/signature coverage, acp_summary_* anchors re-rendered in place, client tail joined at the divergence point (rewind-safe, id fast path + content-signature fallback chain). Degrades whole-turn to the legacy path on any mismatch; gated by rollout feature snapshotRender (default 0%). - prepare-openai/anthropic/responses: tokenCount / reasoningDrop / processTurn consume the render view; reconcile still observes the client view. - storage accessors: store.tailSeqs, shadow.tailViewRows, persist unifiedTailSeqs/unifiedTailViewRows (read-only). - kernel seam: wire/identity __setMessageIdSaltForTests (test-only salt; production seeds unchanged byte-for-byte), kernel 0.0.134. - tests/snapshot-render.test.ts 7/7: steady prefix stability, identity-seed upgrade immunity, client checkpoint absorption (one-turn adoption lag), rewind, mid-session protocol switch, D-off churn documentation, storage-off fallback. golden-storage-render 5/5, rollout 25/25, storage-unified 14/14, fold-reconcile 66/66.
Contributor
📦 Built Package ArtifactBranch: Option A — Install this exact build (recommended)npm install -g billion-context@0.0.4446-pr.3759.fc202f9This exact version is immutable and reproducible. The rolling Option B — Download artifact
tar xzf billion-context-pr3759.tgz
npm install -g packageInstall instructions are refreshed on each push. |
This was referenced Oct 19, 2026
Owner
Author
|
ework review |
Owner
Author
|
ai: zhipuai-lb/glm-5.3 Review 结论:可合。设计对、验收真、默认面零风险。本地全复跑通过。逐点核验(不是只看 body——diff 全文+本地实测)
非阻塞 notes(后续可收紧)
与 #3757 的关系#3757(fork 前缀门降 advisory)止住的是「churn 之后的 409 卡死」;本 PR 止住的是 proxy 车道上 churn 本身。两件互补,都进 0.1.202 的话,升级换代对存量会话的三层伤害(失锚→重铸→卡死)就全拆完了。 |
This was referenced Oct 19, 2026
Contributor
📦 Merged Build PublishedThis merge to master was published as npm install -g billion-context@0.0.586-master.b4e5b11 # this exact build
npm install -g billion-context@master # always the newest merged build
|
This was referenced Oct 19, 2026
Merged
ranxianglei
pushed a commit
that referenced
this pull request
Oct 19, 2026
prepareGoogle now consumes maybeSnapshotView for effectiveTokenCount and core.processTurn (reconcileFoldCoverage keeps observing the client view), mirroring the openai/anthropic/responses lanes landed in #3759. Reasoning-drop is deliberately absent on this wire (#651: Gemini validates thoughtSignature), so only two consumers switch, not three. Adds google variants to tests/snapshot-render.test.ts driven over the native Gemini wire: steady-state prefix byte-stable, seed-upgrade prefix byte-identical across the #3752 identity re-mint (via __setMessageIdSaltForTests), and the D-off control showing the legacy path still churns. Rollout-gated behind BILI_ROLLOUT_SNAPSHOT_RENDER and default-off, so no behavior change until enabled.
Merged
ranxianglei
added a commit
to yanhuojiyusheng/billion-context
that referenced
this pull request
Oct 19, 2026
…t 0.0.133) The 0.0.134→0.0.136 bumps (ranxianglei#3759/ranxianglei#3767) updated kernel/package.json and the root lock's workspace entry but never regenerated kernel/package-lock.json — the same dual-lock drift ranxianglei#3658 hit. npm ci inside kernel/ would refuse (lock does not satisfy package.json). Regenerated with npm install --package-lock-only; no source changes.
This was referenced Oct 19, 2026
This was referenced Oct 22, 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.
Fixes #3756. 根治 #3752/#3751 的 id-churn 家族:折叠覆盖不再锚定客户端重发字节,改锚服务端统一存储正史。
机制
src/server/snapshot-render.ts—maybeSnapshotView(session, clientMsgs):snapshotRender(默认 0%,BILI_ROLLOUT_SNAPSHOT_RENDER=1强制)+ 会话有活跃折叠块 + 统一存储可读;任一不满足 → 原样返回客户端视图,行为面与现状逐字节相同。tailSeqs视图序,read-only 访问器)按分歧点截断;acp_summary_<blockId>锚原位重渲真摘要(kernel prune 的 summaryIndexById 既有纪律);role|contentType|toolName|text+ 图片长度签名,与 [PR] protocol-stable core identity: same logical conversation, same ids in every dialect (#3642) #3658 canonical 种子同构)——升级后 id 全部重铸仍可按内容链接;活尾巴未开始前跳过,断链即整轮降级 legacy。metadata.snapshotRenderTurns;首轮 info 日志。prepare 接线(openai/anthropic/responses 三车道同型)
renderMsgs = maybeSnapshotView(session, msgs)后:effectiveTokenCount / planReasoningDrop / processTurn 吃 render 视图;reconcileFoldCoverage 仍观察客户端视图(观测与渲染分离)。kernel-change: 测试缝
kernel/src/wire/identity.ts加__setMessageIdSaltForTests(模块级盐,插在 canonical 种子前;unset 时种子逐字节不变——金桩验证 5/5 不漂)。wire/index.tsre-export identity 模块。kernel 0.0.134。生产代码零调用。测试(tests/snapshot-render.test.ts 7/7)
__setMessageIdSaltForTests("upgrade-v2")原地翻盐 → 出站前缀逐字节不变、块活、无 destroy 判决——正是 0.1.200 → 0.1.201 upgrade (#3658 identity change) mass-unfolds persisted sessions incl. Anthropic lane; downgrade re-churns #3752/Image message ids re-mint whenever an earlier image leaves the visible tail (membership-based ClusterCounter suffix) — prefix-cache breaks per fold, feeds #3748 storage growth #3751 的事故形状,当场钉死。回归:golden-storage-render 5/5、storage-unified 14/14、rollout 25/25、fold-reconcile 66/66、tsc 0。
验收四场景对照(issue #3756)
后续(不在本 PR)