Repository navigation
[PR] fix: bili export <id> no longer decodes every persisted session (OOM on multi-session machines) - #5084
[PR] fix: bili export <id> no longer decodes every persisted session (OOM on multi-session machines)#5084ranxianglei wants to merge 13 commits into
Conversation
…f decoding every persisted session (#5062) bili export <id> started with a full loadAll() walk regardless of selector, decoding EVERY persisted session before it could render one. On a machine holding several long-lived sessions that OOMed the V8 heap (exit 134) before the documented bad-session -> handoff workaround ran (#5026). Selection now resolves from the unified summary rows (one SQL - the same authority listSessions uses, #2960 R2.1; id + label is all matching needs) and hydrates only the winner via the existing loadSync path. Rows absent (legacy/shadow mode, degraded sidecar), empty (fresh mode flip, deleted index.db), or a winner that will not decode fall through to the historical full walk, which keeps those states byte-for-byte. Error surfaces (empty-store message, no-match, ambiguous-prefix) are unchanged.
…instead of an empty row list (#5062) Same-mechanism side finding from the #5062 analysis: on a mysql (network) backend the sync facade's sessionSummaries() miss value is [], which callers read as 'zero sessions' - listSessions blanked the session list on healthy mysql + full installs. The contract is null = unavailable = file walk, the same guard webSummaryBaseline already carries for this surface.
📦 Built Package ArtifactBranch: Latest build — install this exact versionnpm install -g billion-context@0.0.9404-pr.5084.092774fThis exact version is immutable and reproducible. The rolling Recent builds (commit → version)
Download artifact
tar xzf billion-context-pr5084.tgz
npm install -g packageInstall instructions are refreshed on each push. |
(ai: vllm-qwen/qwen3.8-27b) 查重:不重复。全仓检索(open+closed,issue 与 PR,按失败签名「export OOM / loadAll 全量解码」)无其他条目;本 PR 是 #5062 的唯一在途修复(#5062 自身查重亦为「无」)。 标签: PR #5084 审核进行中:已通读 diff(src/export.ts、src/persist.ts、新回归测试),正在本地跑定向测试 + 读镜像 CI 状态,结论按八问体例随后给出。 |
(ai: vllm-qwen/qwen3.8-27b) PR #5084 审核完成。独立核验(未复用 issue 侧结论):对真实 merge base( 关键声明逐条回源码验证过:
结构化八问
测试有效性(质量关):双方向齐全(#3617)——正向行选择成功且原型 spy 证明 判定:可合。CI 全绿于推送 head、本地定向验证通过、diff 收敛到目的本身、未发现回归;两处行为变更均已在 PR 披露。合并按规矩留给人工:#5084 |
|
(ai: vllm-qwen/qwen3.8-27b) Merge-guard sync done: origin/master merged into head twice (master moved again while the first sync sat in the CI runner queue); both merges conflict-free with no overlap on this PR's files; head now 8105d74, local typecheck clean and 6/6 export regression tests green; merge state after push: behind -> blocked (required checks queued on runners, 0 failures so far). |
(ai: vllm-qwen/qwen3.8-27b) Merge-guard "behind" verdict was stale: the PR base is already the current master tip ( |
|
(ai: vllm-qwen/qwen3.8-27b) Merge-guard sync done (rounds 3+4: master kept advancing while the previous sync sat in the CI runner queue): merged origin/master two more times, both conflict-free (src/persist.ts auto-merged cleanly over master's storage/sidecar rework); head now 97561b9, which contains master tip 7c9e65b, so the branch is no longer behind; local typecheck clean and 6/6 export regression tests green; checks on the new head: 22 queued, 0 failures. |
…-no-loadall' into 2026-10-29_export-single-session-no-loadall
…ingle-session-no-loadall
|
(ai: vllm-qwen/qwen3.8-27b) Merge-guard sync done (round 6): a concurrent worker had pushed an earlier-master sync to this branch, so I merged that remote head plus the remaining master commits into my verified head, all conflict-free; head now f464be0 which contains current master tip 491ac1d, so the branch is no longer behind; local typecheck clean and 6/6 export regression tests green on this head; state after push: mergeable, checks computing. |
[bot] 🏷 Synced & pushed (correcting my earlier line, which cited a stale master tip): merged master |
…26-11-13 # Conflicts: # src/export.ts
Merge conflict resolved and pushed. Here is what I did this run. Conflict resolution
Verification (local, targeted)
Push
CI state (mirror cache, verified live this run)
结构化八问
判定:冲突已解、分支不再 behind、CI 运行中且 0 失败。等 |
[bot] (ai: vllm-qwen/qwen3.8-27b) 进度汇报(进程被强制重启 3 次后恢复):06:31 / 16:04 / 16:44 三次因 35 分钟无输出被重启。本轮已避开长挂起操作(所有网络命令加 timeout),独立审核已完成,结论如下。 PR #5084 独立审核(未复用 issue 侧结论) — 对当前 head
结构化八问
master 从 判定:代码层面可合——逻辑正确、既有行为逐项保持、测试有牙、上一同步 head CI 全绿。合并前置:merge-guard 需 re-sync 这 50 个 master 提交(预期无冲突)+ CI 重跑全绿,然后人工合并。re-sync 属 merge-guard 车道(本 issue 历史上多轮同步均由其处理),我不越界代做。 |
Closes #5062
What & why
bili export <id|label>started with a fullloadAll()walk, decoding EVERY persisted session before it could render ONE. On a machine holding several long-lived sessions that OOMed the V8 heap (exit 134) before the documented bad-session → handoff workaround ran (#5026: single 1184-request session, ~138.5M input tokens, 8GB machine).Selection now resolves from the unified summary rows (one SQL — the same authority
listSessionsuses, #2960 R2.1; id + label is all matching needs) and hydrates only the winner via the existingloadSyncpath (web panel / fork adoption). Fallbacks keep historical states byte-for-byte:Behavior changes (disclosed)
listSessions, which already served rows as authority in full mode (it was never LISTED either). Healthy full-mode stores are unaffected (organic import on every load/write keeps rows whole).unifiedSessionSummaries()now returns null (unavailable → file walk) instead of[](read as "zero sessions"), which blanked the session list on healthy mysql installs. Second commit — same-mechanism side finding from the Exporting ONE session decodes EVERY persisted session (loadAll) — multi-long-session machines OOM the documented handoff workaround | 导出单个会话会解码存储里的全部会话(loadAll)——多长寿会话机器上官方交接手段 OOM 崩溃 #5062 analysis.Legacy/shadow mode: byte-for-byte unchanged (pinned by regression test).
Tests
New
tests/issue5062-export-single-session.test.ts(both gate directions, #3617):loadAllprovably never walked (prototype spy, 0 calls);Local targeted runs green: new file 6/6, existing export suites (cli-export, export-jsonl, export-block-summaries, export-uncompressed) 16/16, typecheck clean. Full-suite verdict = CI on this head.
No config surface changes. No wire/message-shape changes. Kernel untouched.