Repository navigation
[PR] fix: count below-floor cache-seam pairs instead of dropping them silently (#3837) - #4005
ranxianglei wants to merge 2 commits into
Conversation
📦 Built Package ArtifactBranch: Option A — Install this exact build (recommended)npm install -g billion-context@0.0.5182-pr.4005.80a20c3This exact version is immutable and reproducible. The rolling Option B — Download artifact
tar xzf billion-context-pr4005.tgz
npm install -g packageInstall instructions are refreshed on each push. |
(ai: vllm-qwen/qwen3.8-27b) 查重:不重复。 本 PR 是 #3837 线程里承诺的 seam 地板可见性补充(#3850 的 post-merge supplement,修 #3837 §10.1「低于 8,192 tok 的未解释断点被静默丢弃」)。与同域在途项机制不同:#4053/#4056 处理的是 client-origin 归因证据误判(thinkingTokens 被当成客户端改写),#3809 是 reasoning-effort flip 的命名归因——都不碰「地板下计数」这条路径。 标签:bug / dsh / scope/ui / p2(修的是观测缺陷:小断点零日志行;证据病例在 dsh 车道;改动面纯日志+报告字段;有绕行手段即手工 diff 出站体,非可用性缺陷)。 状态:独立复审中,发现一处真缺陷,正在分支上修。 我没有照抄原 PR 描述,而是把
修法(几行级,按「小问题直接修」在 PR 分支补 commit):地板分支只在 |
review finding: the below-floor branch counted EVERY pair that failed the substantive gate, including perfectly healthy turns whose miss is fully explained by new content (tr === 0). A healthy append-only session would show seam.floored count>0 with 0 tok volume and fire the one-time 'unexplained break' info log with unexplained=0 tok -- factually wrong in every healthy session, and it drowns the real signal this feature exists to surface. Fix: count only pairs with a real residual (tr > 0) below the floor. decomposeSample guarantees missed = nc + cr + tr exactly, so tr === 0 means no unexplained break exists. Warn thresholds, suspect flagging and forensic events are untouched; above-floor pairs still never touch the floored counters. Test: third gate case per #3617 discipline -- healthy fully-cached turn (tr=0) asserts NOT counted (agg + report), alongside the existing positive floored case and the above-floor negative control.
d65178a to
5af11fa
Compare
(ai: vllm-qwen/qwen3.8-27b) 中间状态:审核完成,发现并修掉了一个真实缺陷,已 rebase 推送新 head,等 CI。 独立审核结论(逐条重新验证,非复读 PR 描述)
验证状态
|
(ai: vllm-qwen/qwen3.8-27b) 审核结论(独立重审,非复读 PR 描述)— 八问
测试有效性:三个 gate 方向都有真断言——正向(floor 下真实断点被计数、不 flag、无 forensic event、跨样本累积、报告+API 可见)、负控(above-floor 断点照旧精确 flag)、gate 负向(健康 tr=0 轮次完全不计数)。每个断言在本 bug 回归时都会红(如去掉 验证状态:rebase 到当前 master(v0.1.204 时代)无冲突;本地定向套件全绿(cache/seam/ledger 相关 22 文件 160 测试 + rebase 后复跑子集 75/75); 判定:可合入(待 CI 绿)。PR head |
|
(ai: zhipuai-lb/glm-5.3) 收尾清理:issue #3837 的修复已随合并 PR 落地。关单;误判请 reopen。 |
Refs #3837 · post-merge supplement to #3850 (same issue thread).
What
detectSeam's substantive gate (tr > 8192 && tr > 0.3*input) dropped unexplained cache breaks under the warn floor silently — the #3837 field case billed 5,701 full-price tokens with zero log lines. Below-floor pairs are now counted and surfaced:agg.seamFloored/agg.seamFlooredMissedcounters (legacy persisted ledgers normalize in place, same pattern asnbSamples/clientInserts)[cache-seam] unexplained break under the warn floor (unexplained=N tok, input=M) — counted in seam.floored, not warnedseam.floored { count, missed }+ aformatSeamsection lineBehavior change
None. Warn thresholds, suspect flagging, forensic events and every existing bucket are untouched — strictly additive observability. Flagged (above-floor) pairs never touch the floored counters (asserted by the negative control).
Tests & regression surface
tests/issue3837-seam-floor-observability.test.ts: positive floored case (counted, NOT flagged, no forensic event, accumulates across samples, report + /acp-cache surface) + negative control (above-floor mid-history break still flags exactly as before, per Test Blind Spot Retrospective: Reinforcing Negative Assertion Discipline, Tightening Fake Upstream Strictness, Thin Inst | 测试盲区复盘:补反向断言纪律、假上游严格化、薄安装冒烟、形态矩阵与生命周期覆盖 #3617 gate discipline). Passes on the rebased head (e98ccda); full-suite verdict = CI.kernel/touch. Persistence impact is additive agg keys normalized on load.Fixes #3837
(孤儿认领:标题本已指向 #3837,补上关闭关键字 —— 第三批清理)