Repository navigation
[PR] feat(config): message timestamps are ON by default — opt-out keeps every pre-#4313 byte | 消息时间戳默认开启:关开关即逐字节回到特性前 (#4313) - #5368
Conversation
…#4313 bytes (#4313) The #4313 stamps are deterministic render inputs: minted once per message at first sight, rendered from stored values never wall clock, prompt variants resolved once per instance. A live-session cache audit on this session's own proxy showed identical hit rates (95.0%) with rendering on vs off — the only non-fold low hits were upstream TTL-eviction fingerprints that fully recovered on the next turn. So the leak-audit follow-up flips the display gate ON by default: resolveMessageTimestamps() unset now means `!== false` instead of `=== true`. Opt-out stays an honest switch: file compress.messageTimestamps: false or env BILI_MESSAGE_TIMESTAMPS="0" reproduces every pre-#4313 outbound byte (no time= attribute, original prompt texts, no receipt span). Upgrading users pay ONE frozen-prefix rewrite per active session at the first restart that resolves true, then bytes are stable again; storage already recorded the stamps unconditionally so full history surfaces immediately. - src/config.ts: resolveMessageTimestamps flip + JSDoc (audit basis, one-time rewrite disclosure, opt-out paths) + CompressSettings field docs - tests/preload-test-env.mjs: suite-level pin BILI_MESSAGE_TIMESTAMPS="0" so every byte-comparing baseline keeps its pre-feature shape (same discipline as the XDG roots pins); explicit-off and production-default paths are driven by the suites themselves - tests/message-timestamps-default-on.test.ts (new): the production expression resolveMessageTimestamps(loadConfigFile().compress) resolves ON under a scrubbed env + realistic config without the key, at both exits (prompt variants + resolve), and file-false stays zero-divergence through it - tests/issue4313-message-timestamp-toggle.test.ts: flipped to env > file > default TRUE; OFF cases retargeted to explicit env "0"; two PRODUCTION DEFAULT pins added (TIMESTAMPED variant selection + receipt span appended) - docs: yaml seed default/desc/site EN+ZH, gen-config-docs regenerated, hand-maintained detail sections (CONFIGURATION.md/.zh-CN.md), CHANGELOG
📦 Built Package ArtifactBranch: Latest build — install this exact versionnpm install -g billion-context@0.0.7580-pr.5368.b5d8ea7This exact version is immutable and reproducible. The rolling Recent builds (commit → version)
Download artifact
tar xzf billion-context-pr5368.tgz
npm install -g packageInstall instructions are refreshed on each push. |
(ai: vllm-qwen/qwen3.8-27b) 查重:无重复实现——本单与已打开的 GitHub PR #5368 一一对应(同题同体,镜像关系,PR 于 15:11Z 开)。相关历史:#4313 为原始特性请求(已完成关闭,10-31 04:37Z);#5183 是其早期草稿(未合并即关,被正式 #4313 实现取代)。不会另开第二个实现 PR。 标签:scope/wiring + p3(主机侧渲染门控/配置默认翻转,无 kernel 改动;带逐字节 opt-out 的有意变更,一次性前缀重写已披露) 这是 [PR] 单:PR #5368 已在途(head |
ced29d0 to
609908f
Compare
(ai: vllm-qwen/qwen3.8-27b) 审核结论:代码面通过,已顺手清掉一个继承性红,等 CI 绿即可合本条是 GitHub PR #5368 的镜像(head 一、逐项核对(与规格一致)
二、本地定向验证(非全量,全量交给 CI)
三、发现并已处理的问题(继承性红,非本 PR 代码问题) 四、行为变更披露(必须说清)
五、CI 状态(写此回复时) |
9eb7148 to
60925df
Compare
…ields (#4313) "Web-configurable" means a button, not hunting the key in the raw JSON editor. The Configuration page's quick-fields now carry a checkbox next to promptPack: checked = delete compress.messageTimestamps (resolves back to the new default ON — writing an explicit true would be redundant state), unchecked = write explicit false. Initial state mirrors the live value via `!== false`, so an explicit true from a hand-edited config still shows the box checked, and re-checking cleanly restores the default shape. i18n entries land in both catalogs (cfg.q_message_ts EN/ZH).
60925df to
16fa7d6
Compare
📦 Merged Build PublishedThis merge to master was published as npm install -g billion-context@0.0.973-master.4a4cedd # this exact build
npm install -g billion-context@master # always the newest merged build
|
(ai: vllm-qwen/qwen3.8-27b) 跟进:分支被 force-push 更新,已重新同步并复验。 审核期间执行车道把第二个 commit 改进后重新推送( 处置:再次把 |
…d ref tags (ranxianglei#5368) v0.1.210 turned ref-marker rendering on by default (ranxianglei#5368). This fixture's mock relay echoed the first 48 chars of the last user message into every model reply; with tags on by default that slice is a partial '<acp ...' render-tag fragment. The host sanitizer (src/loop/tag-echo-filter.ts) then correctly stripped the leaked tag-and-onward, leaving 16-char assistant messages. The kernel's soft-protected zone (preserveRecentTokens=400) then genuinely covered the whole 5-message view, so the scenario's compress call no-op'd and 'parent must have a folded block' failed. Echo the real text instead: strip the leading marker line and keep the text below it, so the relay behaves like a real model that never re-emits render tags. Verified both env shapes: default-on (CI shape, red before) and BILI_MESSAGE_TIMESTAMPS=0 (pin) — 2/2 green either way.
…e timestamps (#5368) 4721275 (#4313 flip) renders per-message timestamps by default; every outbound body gained the same constant field (+186 B/turn), so the pre-#5368 committed goldens can no longer match. Regenerated via scripts/update-storage-render-goldens.ts: turns=15 / foldAt=9 unchanged on all four wires — digests only, no landmark or shape drift.
…e environment (corrects 9eb1aa3) 9eb1aa3 regenerated outside the suite's preload chain, so it captured the display-gate ON bytes (default since #5368) while every CI leg pins BILI_MESSAGE_TIMESTAMPS=0 via tests/preload-test-env.mjs — the committed digests could never match the pinned runners. This run uses the exact CI invocation (node --import ./tests/preload-storage-baseline.mjs --import ./tests/preload-test-env.mjs --import tsx), so wire bodies are back on the pre-flip gate-off values and the stateDigest fields pick up the persisted-state contract moves that landed on master after the goldens' last refresh (#5338 cost ledger, #5412 async latch parity, #5343 block archive). Turns=15/foldAt=9 unchanged; verified green locally under the same preloads (storage-engine-proofs + golden-storage-render).
English TL;DR
Message timestamps (#4313) flip ON by default. A live-session cache leak audit showed the rendered stamps cause zero prompt-cache damage (identical 95.0% hit rates with the flag off vs on — first-sight immutable stamps are deterministic render inputs, so re-rendered history stays byte-stable turn over turn).
compress.messageTimestampsunset now resolves true; setting itfalse(orBILI_MESSAGE_TIMESTAMPS=0) still reproduces the pre-#4313 bytes exactly. No kernel change — the dual prompt variants already ship in the kernel, so no version bump / no Kernel Boundary gate.Upgrade impact (one-time): the restart after which the flag first resolves true pays ONE frozen-prefix cache rewrite per active session (old messages gain time= attributes + prompt variant switches), then bytes are stable again. Storage already recorded stamps unconditionally, so full history times surface immediately.
中文说明
#4313 消息时间戳的渲染门控从"默认关"翻转为"默认开"。
依据:对生产会话(本 lane,sglang/qwen3.8-27b)做了开关前后的缓存泄露审计——两侧命中率均 95.0%、identity residual 0;开启后仅有的非折叠低命中全部是上游 idle ~5–7min TTL 驱逐指纹(恢复形态:下一条立刻回 98–99.8%,与重写型泄露持续 miss 的形态相反)。代码层 time= 只读存储值不读墙钟(render-refs.ts),提示词双变体实例级一次解析(#394)——存戳渲染跨轮逐字节恒定,没有可泄露进冻结前缀的东西。
改动面:
resolveMessageTimestamps():unset ⇒fileCompress?.messageTimestamps !== false(默认 true);JSDoc/字段注释翻写并记录一次性前缀重写披露BILI_MESSAGE_TIMESTAMPS="0":所有字节对比型基线保持特性前形态(同 XDG roots 无条件赋值纪律)compress.messageTimestamps: false(删除键会静默解析回开,所以必须写显式 false);初始态按!== false镜像现值;i18n 中英双词条关闭方式不变:文件
compress.messageTimestamps: false或BILI_MESSAGE_TIMESTAMPS=0,每个出站字节与 pre-#4313 master 一致;现在 Web Configuration 页有一个真正的按钮开关(quick-fields,保存即写入该键)。验证(正式全量留给远程 CI):tsc exit 0;定向+宽回归批 16 文件 124 pass / 0 fail / 1 skip(toggle 翻转套、新钉测、fingerprint、golden-storage-render、storage-unified、snapshot-shadow、dead-ranges/preflight-dead-ranges、issue4521、memory-contentstore、storage-corpus/review-fixes 等——同时实证 pin 使存量字节基线零漂移)。无 kernel 改动 → 无需版本 bump。e2e 车道不带 preload pin,跑真实 bili 即默认开路径的 CI 集成验证。