Repository navigation
[PR] fix(storage): block interval bounds survive post-fold resaves (#4592) - #4607
Conversation
📦 Built Package ArtifactBranch: Latest build — install this exact versionnpm install -g [email protected]This exact version is immutable and reproducible. The rolling Recent builds (commit → version)
Download artifact
tar xzf billion-context-pr4607.tgz
npm install -g packageInstall instructions are refreshed on each push. |
A post-fold client resend carries the folded view, not the covered raws, so the next ingest batch re-derives -1/-1 'unknown' for the same block and the upsert clobbered previously-resolved interval evidence. Bounds are now durable: the upsert keeps the stored start_seq/end_seq whenever the incoming side is unknown (sqlite CASE + mysql IF twin). Ghost coverage never fabricates a resolved interval. Found end-to-end by the docker dogfood harness (plugin + proxy lanes, real built server).
1e4a6e3 to
589314c
Compare
(ai: vllm-qwen/qwen3.8-27b) CI 修复(unused-exports)——继承性 master-red,已在分支上顺手修掉。
判定:修复已 push 到 PR 分支(head 现为 |
(ai: vllm-qwen/qwen3.8-27b) 查重: 不重复 —— 本 PR 对应唯一机制 issue #4608(折叠后重存抹掉已解析的块区间边界);与 #4316/#4335/#4346(区间记账/来源)是上下游关系,非重复。无其他在途 PR 修同一问题。 标签: bug / scope/storage / p2(缺陷类;存储层——统一存储 blocks 表区间证据持久化;当前尚无消费方依赖区间证据做渲染分窗/重锚,不破坏现有可用性,故 p2 非 p1)。主题类别 E(存储层)。
正在走 review(方向/回归/代码/测试四个关),结论随后按八问体例给出。 |
(ai: vllm-qwen/qwen3.8-27b) 审查结论:代码可合入。CI 目前只被继承性 master 红(test 矩阵 LIVE_FILES tripwire,#4604)挡住,等 #4606 合入后 rebase/重触发即可。 结构化八问
行为变更披露(旧值→新值): 验证证据
顺手小修(已直接做,独立标注 commit)
CI 状态说明
判定:可合入——代码与测试层面闭环完整、方向正确;合并时机等 #4606 落地后 rebase/重触发,让 test 矩阵给出一次真信号再合。 |
…same one-word fix as ranxianglei#4606 commit 1; duplicate in-branch per CI-coordination precedent ranxianglei#4607/ranxianglei#4595/ranxianglei#4596, drop on rebase after ranxianglei#4606 merges)
(ai: vllm-qwen/qwen3.8-27b) CI 判定(attempt 2/2):11 个 test 分片全部是继承性 master-red,非本 PR 引入——不在分支内自修,等 #4606 合入。
判定/下一步:auto-fix 到此为止(2/2 用尽)。转绿路径 = owner 合并 #4606 → 本分支 rebase 到 master(遇与 #4606 提交 1 重复的 ClientBuildCheck de-export commit 直接丢弃)→ 重触发;born-red 集群由 #4599 总控清单另行跟踪。 |
…ot this PR's master 146b34f fails the unused-exports gate on this exact line (INTERNAL_ONLY src/agent/client-build-note.ts: ClientBuildCheck): the type-only export #4545 introduced was missed by the 4d34abf de-export sweep. This PR touches none of it — every PR rebased past that master inherits the red (#4599 storm log). Same one-word fix as #4606 commit 1 and the in-branch precedents (#4607/#4595/#4540/#4618/#4622): drop the leading export on a symbol referenced only within its own file. Drop this commit when rebasing after #4606 merges.
…est (master born-red, #4599 sentinel) The tier-5 train added generationBoundaryActive as injectSystem's 9th parameter and updated every caller except this test's 'active' case: its trailing true landed in mcpDialectNote, so the note never appeared and the assertion must fail. Identical one-line fix already committed on PR #4559's branch (e82ccd7); drop that commit when rebasing whichever way merges first.
…s site (#4598, #4599 sentinel) pages.yml has failed 75/75 runs since landing: actions/configure-pages@v5 gets 'Get Pages site failed ... Not Found' because GitHub Pages was never enabled on this repo (the earlier enablement:true attempt was reverted without a recorded reason — not re-applied here). Stop-the-bleed per #4598 option 1: drop the push trigger, keep manual workflow_dispatch so the deploy path stays intact and no website push red-lines master again. Final direction (re-enable Pages vs retire the workflow vs in-install serving) awaits owner decision.
…ne-rewrite (#4599 sentinel) The #3719 Updates tab stayed routed (PAGES/route/loadUpdates in client.ts) but its topbar anchor was dropped when #3536 rewrote the whole topbar line, making nav.updates a dead catalog key (web-i18n born-red on every PR head). Restored at the original position (after logs); identical to the sibling fix on the panel-blog branch (900c09c), adapted to master (no blog anchor yet).
…4427 Windows red, #4599 sentinel) maskPathsForPublish keyed off os.homedir() alone. On Windows that reads %USERPROFILE% while git-bash-style tool output carries $HOME paths, so the publish-boundary identity leak masked one spelling and leaked the other (#4427 suite red on windows shards only). Now masks the deduped set of os.homedir() + $HOME + %USERPROFILE%; POSIX behavior unchanged (values dedupe to one root), anchored-flank semantics preserved.
… restamp flag (#4599 sentinel) Deliberate persisted-state change: 380ef4d (#4316 layer 3 PR3/3) added the one-time refLedgerAligned boolean to session state. All four wire digests are UNCHANGED; only the metadata section digest moved (+refLedgerAligned state key). Regen per the suite's own protocol (justification recorded here and in the ci-fixes PR body).
…wed-load interface (#4599 sentinel) #D5-5 changed buildView to call store.unifiedMessageIdRows() + store.unifiedUncoveredRows(id, intervals) first; the pre-existing fake stores (only unifiedTailSeqs/unifiedTailViewRows) threw TypeError, caught by the by-design degrade net as transcript-error, turning every render-expecting assertion red (chain 6/6, verif replay). Extended both real-JS fakes and the symbolic harness portImpls (__method_unifiedMessageIdRows / __method_unifiedUncoveredRows) to mirror SessionStore semantics.
📦 Merged Build PublishedThis merge to master was published as npm install -g [email protected] # this exact build
npm install -g billion-context@master # always the newest merged build
|
这是啥问题
折叠发生后,客户端下一轮重发的是折叠后的视图(不含已被覆盖的原文)。重入库时,当前批次解析不出这些 id 的 seq 区间(-1/-1 "未知"),旧逻辑的 upsert 会把之前已经解析好的真实区间抹掉。存储里块区间证据(#4335/#4346 落的
start_seq/end_seq)在每次折叠后的第一轮保存就退化回未知。修复
src/storage/store.ts两个块 upsert 的ON CONFLICT DO UPDATE:start_seq/end_seq改为CASE WHEN excluded.≥0 THEN excluded ELSE 保留现值 END—— 区间证据一旦解析即持久,未知侧(-1)不再覆盖。src/storage/mysql.tstwin(IF(VALUES(...) >= 0, ...)同语义)。验证
tests/storage-block-bounds-preserve.test.ts2/2:①折叠后重存(批次不含 covered raws)区间保持 0..2(旧行为抹回 -1/-1);②ghost 保持未知。proxy lane: fold lands and outbound is server-rendered断言抓到的。Closes #4608