Repository navigation
[PR] test: Three lifecycle test cases landed — generic hot-swap driver, pinned-attach swap gate, transition window contract ( | test: 生命周期三条用例落地——热替换通用驱动、pinned-attach 换血门、过渡窗契约 (#3617-E) - #3630
Conversation
…otation gate, transition-window contract (#3617-E)
📦 Built Package ArtifactBranch: Option A — Install this exact build (recommended)npm install -g billion-context@0.0.4277-pr.3630.6f362afThis exact version is immutable and reproducible. The rolling Option B — Download artifact
tar xzf billion-context-pr3630.tgz
npm install -g packageInstall instructions are refreshed on each push. |
…helper (#3630) HotReplaceWorld / HotReplaceApi are driver-internal (referenced only inside tests/helpers/hot-replace.ts); RecordedCall stays exported (cross-file used by tests/native-intercept.test.ts). Gate-prescribed remedy: drop leading export.
(ai: vllm-qwen/qwen3.8-27b) 查重:不重复 — 本 PR 是 #3617 item E 的唯一 PR;同 issue 其余条目各有独立 PR(A=#3620、B=#3627、C=#3628、D=#3625、F=#3626),无其他在途生命周期测试 PR。 审核结论(独立复核,非转述 issue)① 方向关(原 issue):#3617-E 验收 = ① 热替换通用驱动(#3394 家族)② pinned-attach 版本失配换血门(#3544)③ 老宿主+新代理过渡窗契约(#3578)。三项缺口逐一对照 master 核实为真:
② 回归审查(既有行为清点),逐项过:
④ 测试有效性:全部断言打可观察结果(wire 字节、HTTP 状态、env/register 状态),无恒真/tautology;每个新用例都能在其守护的行为回归时变红。⑤ diff 整洁度:5 文件 +355/−88,每行都属 item E,无跑题文件、无空白噪音、无 lockfile/生成物。 发现并已直接修复的问题head 八问
判定:可合(等 |
(ai: vllm-qwen/qwen3.8-27b) CI 已全绿(head 上一条评论的判定维持:可合,等 CI 绿即满足合并条件——现已满足。merge 由人来点:#3630 |
📦 Merged Build PublishedThis merge to master was published as npm install -g billion-context@0.0.551-master.b0f9a40 # this exact build
npm install -g billion-context@master # always the newest merged build
|
(ai: vllm-qwen/qwen3.8-27b)
Part of #3617 — item E (生命周期测试). One issue item = one PR per the issue's acceptance list; does NOT close #3617 (the issue closes after all six items merge).
What was already covered vs what this adds (coverage audit)
E① hot-replace helper (#3394 family) — the three #3394 regression tests existed but each hand-rolled its own patch/sink/dispose scaffolding; no reusable driver.
tests/helpers/hot-replace.ts:runHotReplacescenario driver +makeRecordingFetch+RecordedCall(shared with the file's existingwithPatchRecording, which now uses it instead of a private copy).E② pinned-attach version-mismatch rotation (#3544) — tests/issue3544-stale-proxy-rotation.test.ts ALREADY pins the discovery-path rotation, rotatePinnedStaleProxy mechanics, /__bili/shutdown admin route and heartbeat semantics, but NOTHING drove the pinned-attach DECISION gate (
verifyAttachAndRecover, private in dsh-native.ts while omp/pi/opencode all export their twins).exporttoverifyAttachAndRecover(one keyword + doc note; lane-test parity).E③ old-host + new-proxy transition window (#3578) — side A (gate internals, mock endpoint: dsh-native.test.ts #3581 pair) and side B (endpoint + status wire, hand-crafted POSTs: issue3581-attribution-health.test.ts) were covered separately; the SEAM was not: nobody proved the plugin's ACTUAL report bytes pass the REAL endpoint validation into the real status surface.
startServer+ realapply()attach + disposed agent scope (the [Bug][dsh-native] 运行中自动换版后接管静默失效:旧 fetch hook 持有已 dispose 的 ctx,currentInitiator() 永久 threw,重启才恢复 #3578 shape) → gate refuses to claim (request goes direct) AND the plugin's fire-and-forget report lands on/__bili/statusas{state:"threw", refusals>=1, since>0}under thebili-nativekey; pre-state asserts the default empty surface.Behavior changes
None at runtime. The only src change is adding the
exportkeyword (no logic touched); everything else is test code. No config surface, no kernel/, no wire shape, no persistence format.Verification
npm run typecheckclean on this head.