Skip to content

add local real-model release gate (npm run gate:local) - #2979

Merged
ranxianglei merged 2 commits into
masterfrom
2026-10-13_release-gate-local
Oct 13, 2026
Merged

ranxianglei merged 2 commits into
masterfrom
2026-10-13_release-gate-local

Conversation

@ranxianglei

Copy link
Copy Markdown
Owner

这是什么

把 PR #2962 review 时手工跑的真模型回归(压缩 / 切模型 / 缓存 / dsh 管理 lane)固化成一条本地命令,每次发布前在 operator 机器上跑一遍 —— 这是 GitHub CI 永远跑不了的 lane(需要真模型、真 dsh、真注册表)。

npm run gate:local
# 或对已构建的 tarball:
node scripts/release-gate-local.mjs --tarball /path/to/billion-context-X.Y.Z.tgz

Lanes

Lane 覆盖 断言(全部解析 proxy.log,按字节偏移切片)
A 压缩 真实 dsh 会话,corpus 在真实窗口读入后中途缩窗(字段报告的"切到小窗模型" lane) 新鲜 read 结果不折叠(protected zone,#2847 fail-fast 语义)→ 缩窗后 nudge INJECT → preflight fold(acp-compress-obs shrink)→ 同一会话从折叠上下文答出 S07 标记词 → 后续稳定前缀请求 cache ≥50%
B 切模型 同会话 resume 到不同模型/不同上游 跨 switch + proxy restart 血统一致(dsh resume-replay 产生 fork 时,必须 lineage=forked of + fork-adoption 收养父会话折叠块 —— #2832/#2936 路径;孤儿 pfa 判 FAIL)→ 引用旧上游 usage-baseline 时必须 demote to untrusted(#2283/#2867)→ 双标记词召回 → 新上游 cache 冷→热
U --with-update dsh 管理的 profile 安装 proxy 识别 dsh-managed 安装(不做 in-place 自更新)+ 从 update.registry 读 latest
  • 完全隔离:独立 DSH_HOME / BILI_CONFIG_FILE / sessions / XDG 目录 / 端口,不碰 ~/.dsh 和运行中的 proxy;proxy 按记录的 PID 关闭(绝不 pkill 模式)。
  • 前置探测:缺 sglang / relay / verdaccio / dsh 的 lane 自动跳过并告警;GATE_* 环境变量在脚本头部有完整说明。
  • corpus 为 40 段确定性标记词文本(S07/S40 抽查),不依赖模型记忆以外的任何随机性。

0.1.196 实测

A: 8/8 green   (fold shrink 52%, S07 从折叠上下文召回, cache 75→84%)
B: 6/6 green   (forked + adopted, baseline 语义正确, cache 18→98%)
U: 2/2 green   (dsh-managed 识别 + registry latest)
elapsed: 246s

Windows 专属 lane(全局安装包自更新、desktop profile in-place swap + spec 收敛、doctor)无法从 host 自动化,以 Win10 VM 手工 checklist 形式附在 reference/release.md 末尾(本次 0.1.196 已按该清单人工验证通过,#2894/#2891 均绿)。

文件

  • scripts/release-gate-local.mjs(新增,零依赖 node ESM)
  • package.json:gate:local 别名
  • reference/release.md:发布流程 step 5.5 + Win10 VM checklist

不合并机器人,人审人合。

Freezes the manual v0.1.196 review pass (PR #2962) into one command for
operator machines with live models — the regression lane GitHub CI can
never run. Executed before each release (reference/release.md step 5.5).

Lanes (hermetic scratch: own DSH_HOME/BILI_CONFIG_FILE/sessions/XDG/ports;
never touches ~/.dsh or running proxies; missing prerequisites skip with
a warning, GATE_* knobs in the script header):

- A compression: real dsh session reads a marker corpus at the real
  window, then the route window shrinks mid-session (the field-report
  "switched to a smaller-window model" lane) -> nudge INJECT -> preflight
  fold -> SAME session answers from folded context, cache recovers.
  A fresh oversized read tool-result is NOT expected to fold (protected
  recent zone, #2847 fail-fast) — asserted as such.
- B model switch: same session resumed on a different model/upstream;
  same lineage across switch + proxy restart (dsh resume-replay fork
  WITH fork-adoption of the parent's folded blocks passes; an orphaned
  pfa fails), cross-upstream usage-baseline demoted to untrusted when
  cited (#2283/#2867), cache cold -> hot on the new upstream.
- U --with-update: dsh-managed install detection (no in-place self
  update) + latest read from the configured update registry.

Green on 0.1.196: A 8/8, B 6/6, U 2/2 (~4 min, sglang + z.ai relay).
Windows-only update lanes (global installer, desktop-profile in-place
swap + spec converge, doctor) stay on the Win10 VM checklist appended
to reference/release.md.
@github-actions

github-actions Bot commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

📦 Built Package Artifact

Branch: 2026-10-13_release-gate-local (2cc37e2)

Option A — Install this exact build (recommended)

npm install -g billion-context@0.0.3372-pr.2979.b6a1f33

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-pr2979.tgz
npm install -g package

Install instructions are refreshed on each push.

- verdaccio LAN IP -> <verdaccio-LAN-IP> placeholder (release.md checklist)
- private VM runbook path -> generic wording
- relay knob docs: drop provider identity + auth notes, keep semantics
@ranxianglei
ranxianglei merged commit 9fb79dd into master Oct 13, 2026
18 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

📦 Merged Build Published

This merge to master was published as 0.0.358-master.9fb79dd (rolling master tag).

npm install -g billion-context@0.0.358-master.9fb79dd  # 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

Development

Successfully merging this pull request may close these issues.

1 participant