Skip to content

[PR] fix: bare-id loadSync hydrates pooled envelopes without the unified index (master CI flake, #4014) - #4015

Merged
ranxianglei merged 1 commit into
masterfrom
2026-10-20_3769flk-pooled-bare-load
Oct 20, 2026
Merged

ranxianglei merged 1 commit into
masterfrom
2026-10-20_3769flk-pooled-bare-load

Conversation

@ranxianglei

Copy link
Copy Markdown
Owner

(ai: zhipuai-lb/glm-5.3)

Fixes #4014

问题

master CI 4/6 test shard 红, 同一条 flake:record hydrates before the upgrade turn(tests/issue3769-upgrade-compat.test.ts:179)。根因见 #4014:pooled 路径(openai/127.0.0.1_<hash>.json)的 bare-id loadSync 只有 sqlite index 一条读路径, walk 回退只对 async 后端播种(:1328 this.shadow?.isAsyncBackend), sqlite 上一 miss 就返回 null。

改动

  • src/persist.ts loadEnvelope:walk 播种条件 this.shadow?.isAsyncBackend → this.shadow — 任何 unified 模式一次性播种 diskFiles(成本 = 每 store 一次目录 walk, 与 async 后端既有行为一致)。
  • tests/issue3769-pooled-bare-load.test.ts(新回归):真实 proxy 一回合 → flushSync → 删 index.db/-wal/-shm 模拟 index miss → fresh store 的 bare-id loadSync 必须从 pooled envelope hydrate(修复前红:靠 index 才能找到, 修复后绿:walk 兜底)。teardown 用 closeQuietly()。

验证

  • 新回归 1/1 绿;issue3769-upgrade-compat 1/0;persist-active-pack / multi-instance-persist / affinity-persist / orphan-sweep-ledger + 新测试 = 20 pass 0 fail;typecheck 绿。
  • 本地 40 连跑 flake 本就难复现(间隙性窗口), 判据是:修复让「index miss」这一触发条件本身消失 — 回归测试把该条件变成确定性的。

备注

@ranxianglei ranxianglei changed the title fix: bare-id loadSync hydrates pooled envelopes without the unified index (master CI flake, #4014) [PR] fix: bare-id loadSync hydrates pooled envelopes without the unified index (master CI flake, #4014) Oct 20, 2026
@github-actions

Copy link
Copy Markdown
Contributor

📦 Built Package Artifact

Branch: 2026-10-20_3769flk-pooled-bare-load (765abe3)

Option A — Install this exact build (recommended)

npm install -g billion-context@0.0.4795-pr.4015.25ecec9

This exact version is immutable and reproducible. The rolling pr tag tracks the newest test build across all PRs.

Option B — Download artifact

  1. Download the artifact from the Actions run
  2. Extract the tarball and install:
tar xzf billion-context-pr4015.tgz
npm install -g package

Install instructions are refreshed on each push.

@ranxianglei
ranxianglei merged commit 66a719f into master Oct 20, 2026
35 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

📦 Merged Build Published

This merge to master was published as 0.0.690-master.66a719f (rolling master tag).

npm install -g billion-context@0.0.690-master.66a719f  # this exact build
npm install -g billion-context@master  # always the newest merged build

npm view billion-context@master prints the current version at any time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant