Skip to content

[PR] review: v0.1.202 → master full-regression anchor (ci:full) - #4003

Closed
ranxianglei wants to merge 2 commits into
masterfrom
2026-10-20_master-review-full
Closed

ranxianglei wants to merge 2 commits into
masterfrom
2026-10-20_master-review-full

Conversation

@ranxianglei

Copy link
Copy Markdown
Owner

空锚点 PR:不含任何代码改动,只为在 master 头上打 ci:full 跑全量回归 lane,作为 v0.1.202..master(394 commits,312 files,+35086/−1909)深度 review 的 CI 证据面。

深度 review 进行中,结论将发布在本 PR。重点关注:回归 / 自动更新(src/update.ts,advisory)/ 缓存与 prefix-cache(CCR,snapshot-render)/ 压缩链路(kernel/)/ 协议接线(server+loop 适配器)。

本地侧同时进行:全局安装 + dsh 安装灰度 + gate:local 真模型回归。

@ranxianglei ranxianglei added the ci:full Run the FULL CI matrix (all e2e lanes + 12-leg test matrix) on this PR label Oct 20, 2026
@ranxianglei ranxianglei changed the title review: v0.1.202 → master full-regression anchor (ci:full) [PR] review: v0.1.202 → master full-regression anchor (ci:full) Oct 20, 2026
@github-actions

github-actions Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

📦 Built Package Artifact

Branch: 2026-10-20_master-review-full (bf81ee5)

Option A — Install this exact build (recommended)

npm install -g billion-context@0.0.4794-pr.4003.1acdd6b

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

Install instructions are refreshed on each push.

@ranxianglei

Copy link
Copy Markdown
Owner Author

(ai: zhipuai-lb/glm-5.3)

master 深度评审结论(v0.1.202 → e98ccda,394 commits)

一句话结论:压缩链路本身被这个区间显著加固,没发现 P0;唯一实锤 P1 是 mysql2 被静态打进 dist 导致「无依赖安装形态」启动即崩(CI 本 PR 的 dsh lane 红就是它,#4008);其余为 8 个 P2(性能税/ forge 误触发面/更新链覆盖缺口)+ 一批 P3。建议 #4008 修掉后再发版。

评审方式:4 个独立深度评审(协议接线/自动更新/缓存与前缀缓存/压缩管线,全部 file:line 级)+ ci:full 全量 CI + 本地真模型 gate + 实际复现定位。


1. 真实流量 gate(scripts/release-gate-local.mjs,真 qwen3.8-27b + 真 glm-5.2)

  • Lane A 压缩 9/9 绿:真实 fold(55% shrink)、nudge 注入、preflight、折叠后 S07 标记召回、缓存恢复 99%。
  • Lane B 切模型 6/6 绿:跨上游换模型 + proxy 重启后 lineage 不变(pfa-d4fb52d0… → 同值)、跨上游基线正确降级 untrusted、新上游缓存 99%。
  • Lane U 更新 1/2:两条断言的红都是 gate 脚本自身问题,产品行为正确——(a) proxy 正确识别 dsh 托管并跳过原地自更(日志实证);registry latest 正确读到,只是 gate 的 npm publish 没带 --tag,npm 对 prerelease 版本号拒绝隐式打 latest,publish 静默失败(check:false 吞掉),源里没有候选版本;(b) --skip a,b 单跑 U 时断言立即读日志,不等 +10s 的首次 update check(全量跑时 A/B 消耗了几分钟所以就绪)。建议:gate 的 publish 显式 --tag latest + publish 失败 fail loud + U-only 模式等首查日志。
  • 安装面:全局装 master 构建(e98ccda)真拷贝;bili plugin install dsh 走宿主通道刷新 12 个 profile(registry 0.1.202);master 构建的 dsh 灰度经 bili dsh overlay。

2. P1 — mysql2 静态 import 打进 dist(#4008,CI 红的根因)

src/storage/mysql.ts:30 顶层静态 import { createPool } from "mysql2/promise",bundle 后提升为 dist/index.js 顶部静态 import → 任何不带 node_modules 依赖的安装(dsh e2e rig、dist-only 嵌入)启动即崩,流量静默直连不压缩。backend.ts:302 注释声称的「动态导入、不选 mysql 不加载」被单文件打包击穿。v0.1.202 无此问题,纯 master 回归(#3931→#3955);skip-scoping 让它红着合入,本 PR ci:full 首次暴露(已本地复现定位,证据见 #4008)。修法:方法内 await import(),并把 check-dist-external 门禁从「只盯 zod」泛化为「dist/index.js 零 bare import」。

3. P2(按域,均为新引入除非注明)

性能税(两个默认全开的纯观测层,叠加在每个请求上)

#2740 auto-mode forge

  • 自指误触发:检测标记字面量(<transcript>、"Err on the side of blocking" 等)就在本仓源码里,而扫描覆盖 tool_result 文本(src/auto-mode-forge.ts:120-134)——历史里带部分 forge 源码回显的会话(如 git grep 输出)可能满足合取,真实提问被本地 canned <severity>0</severity> 应答且每轮复现直到工具结果滚出全量重发(不会滚出)。建议:transcript 标记限定 user 消息,或排除 tool_result 文本。kill switch BILI_AUTO_MODE_FORGE=0。
  • 姿态说明:所有 CC 安全分类默认放行,披露只在 web 面板徽标——CLI 用户无感知;一条启动横幅可补齐。

更新链(机制全部验证正确,缺口在覆盖面)

  • [updater] #1588 rollback gate: post-restart first-check race lets auto-update install the affected version before the advisory loop arms #2456 延迟 + 回滚候选闸门只存在于全局 lane;dsh profile / pi npm 托管 lane 的刷新(src/update.ts:1176/1286)不查 advisoryBlocksVersion → 磁盘落后且 latest 落在回滚区间时,重启即被拉回缺陷版本,而 forceInstall 对托管 lane 拒绝执行。修法便宜:两个谓词前移到 refreshOwnerManagedCopies 调用前。
  • update.policyUrl 文档声称「测试专用、生产固定」,实际无任何机制约束(CONFIGURATION.md 4 处 vs knobs.ts:431-439 现实);同类 BILI_ADVISORY_URL。建议要么强制测试标志,要么文档改口为本地信任层。
  • policy 拉取 body 无上限、每 gate 每次全量网络往返(update-policy.ts:594)。建议 ~64KiB 上限 + 短 TTL。
  • 局部 stagger=0 在远端 policy 带 per-version override 时不生效(覆盖叠加在本地值之上,update-policy.ts:370-397),与 knob 文档「0=立即」相悖。

协议接线

压缩管线

4. 验证扎实的面(可以放心)

5. 建议

  1. 先修 dist/index.js crashes on startup: mysql2 is statically inlined into the bundle, so deployment modes without node_modules | dist/index.js 启动即崩:mysql2 被静态打进 bundle,不带 node_modules 依赖的安装形态(dsh e2e、dist-only 嵌入)直接挂 #4008(mysql2 惰性化 + dist 门禁泛化)——CI 本 PR 的红 lane 才能绿,再谈发版。
  2. forge 误触发面 + 裁判上限 + 影子默认值,三个 P2 可合成一个「默认面收紧」小 PR。
  3. 更新链托管 lane 的 advisory 闸门前移,便宜的防御纵深。
  4. gate 脚本三处小修(--tag latest、publish fail loud、U-only 等首查)。

P3 级明细(若干一致性/文档/遥测噪声项)在评审底稿里,需要的话逐条开单。

ranxianglei pushed a commit that referenced this pull request Oct 20, 2026
… self-contained (#4008)

src/storage/mysql.ts held a TOP-LEVEL static value import of mysql2/promise. openBackend's dynamic import of ./mysql.js is an internal-module import that tsup's single-file bundle (splitting:false) hoists into the bundle body, and mysql2 (a package.json dependency) is auto-externalized by tsup, so the driver import landed as a static import at the top of dist/index.js and dist/agent/pi-native.js. ESM resolves static imports at module load regardless of use: every install without a node_modules tree (dsh profile bare copies, bili's own e2e rigs) crashed at startup with ERR_MODULE_NOT_FOUND before the proxy bound its port, and model traffic silently went direct, uncompressed (the 'real dsh headless profile lane' reds on #4003 ci:full).

The driver now loads only inside openBackend("mysql", dsn): a literal dynamic import of the external specifier survives bundling as a real runtime import (same discipline as the jimp lazy load, #3516), and the resolved module is injected into MysqlBackend's constructor. Boots that select sqlite never resolve mysql2; a thin install that selects mysql fails at open time with a contextual error that the existing documented degrade paths already handle (shadow: warn + legacy-only; export: notice + sqlite fallback), instead of dying at process start.
@ranxianglei

Copy link
Copy Markdown
Owner Author

(ai: zhipuai-lb/glm-5.3)

跟进:#4013 合并后复验(ab7e941)

#4008 修复确认:重建 dist 后 dist/index.js 静态 mysql2 import = 0(仅 1 处动态);泛化后的 dist-external 门禁过;之前红的 tests/e2e/e2e-native-dsh-persona.test.ts 两条(#2241 A / #2791 C)本地复跑 2 pass / 0 fail(第三条按设计 blocked-skip)。

gate:local 重跑(修复后 master,真模型):A 8/9 · B 6/6 · U 2/2 全绿(预先 --tag latest 发布候选后,Lane U 的 registry latest 读取断言首次完整通过,产品行为+断言双确认)。

A 唯一红的「S07 从折叠上下文召回」是真模型行为波动,非压缩缺陷:qwen 自己的 thinking 显示折叠摘要里 S07-QUIMERA 记录正确,但它选择用 search_context/decompress「验证」,一条 find / -name bili-s07-verify.txt 跑了 60s 被转后台,该轮没产出最终文本(final="")。同一折叠会话在 Lane B 切上游后把 S07+S40 两个标记都完整召回;上一轮(同压缩代码)该断言也是绿的;折叠后缓存恢复 96-99% 正常。判定:gate 语料的提示词对模型的「不要重读文件」约束不够硬,建议 corpus 指令加一句「禁止调用任何工具,直接作答」消掉这类波动。

其余 P2(默认面收紧/更新链托管 lane 闸门/gate 脚本 --tag 修复)仍未动,master 上只有 #4013。

This was referenced Oct 20, 2026
@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

(ai: vllm-qwen/qwen3.8-27b)

查重: 不重复——本条是本 issue(#4003)自身的跟进复验线程,检索近期 7 天 issues/PR(按失败签名:wire-anthropic、ENOENT、gate S07、release-gate-local)无其他条目跟踪同一问题。
标签: pr, dsh, p2, scope/ci(发版回归锚点线程;本轮新发现是 CI 测试基建红,不影响终端用户,故 p2)。

复验结论(在 #4013 合入后的 master @ 56a0f5a 上)

  1. dist/index.js crashes on startup: mysql2 is statically inlined into the bundle, so deployment modes without node_modules | dist/index.js 启动即崩:mysql2 被静态打进 bundle,不带 node_modules 依赖的安装形态(dsh e2e、dist-only 嵌入)直接挂 #4008/mysql2 修复确认成立,与楼层 4 一致:重建后 dist 静态 mysql2 import = 0,泛化后的 dist-external 门禁通过,dsh persona e2e 两条绿。不再重复验证。
  2. gate 脚本三项小修已完成两项:Lane U 的 --tag latest、发布失败显式红、有界轮询已在 master(commit dfffe31)。剩余第三项(corpus 提示词约束)本轮已修掉,见下。
  3. 新发现:master CI 本身是红的(ci:full run @ 56a0f5a,6 个 test shard 挂 5 个)——根因不是产品代码,是今天合入的 verif 批次(d22508b,[PR] verif judges batch 2: view-latch / anthropic / google / conflict-watch / snapshot-render + engine soundness fixes — finds #4052 | verif 判官第二批 + 引擎健全性修复 #4071 系列)把一个作者机器的临时目录路径硬编码进了随仓库发布的测试文件,任何别的 runner 必然 ENOENT;同批还漏了无求解器环境的 skip 守卫,且引擎有一处默认参数绑定的声明顺序崩溃(TDZ)。三个子缺陷同一失败域:新判官在作者机器之外跑不起来,[PR] verif judges batch 2: view-latch / anthropic / google / conflict-watch / snapshot-render + engine soundness fixes — finds #4052 | verif 判官第二批 + 引擎健全性修复 #4071 批次的验证价值目前为零,且拖红了所有后续 PR 的 ci:full。已修:PR [PR] fix(verif): anthropic round-trip harness red on every non-author machine (CI shards 5/6 failing) | verif anthropic 判官在作者机器之外必挂,修复 CI 红 #4089(跟踪 issue verif round-trip harness hardcodes dev-machine path, red on every CI runner | verif 判官写死开发机路径,CI 每个 runner 都红 #4088)——改仓库相对路径(对齐兄弟测试惯例)+ 补两条测试的 skip 守卫 + 引擎声明顺序修正 + 清理测试里遗留的调试脚手架。本地定向验证全绿:目标文件 3/3(本机有 cvc5,完整求解器车道的 UNSAT 断言真实执行)、subset-guard + symbolic-smoke 5/5、typecheck 干净;CI 无求解器环境按设计 skip,replay baseline 照跑。
  4. 楼层 4 建议的 S07 假红消抖已按建议落地:PR [PR] fix(gate): folded-recall prompts forbid tool calls — kill false-red variance | release-gate 召回提示词禁掉工具调用,消掉假红抖动 #4092(跟踪 issue release-gate folded-recall assertions false-red on model tool detours — prompts must forbid tool calls | release-gate 折叠召回断言:提示词没禁工具,模型绕道调工具就假红 #4091)——t2/t3 召回提示词从「不要再读文件」改为明确禁止一切工具调用。比原措辞更严也更贴合断言意图:断言度量的是「折叠摘要本身是否足够」,允许用工具时模型的行为波动(选不选工具、长命令被转后台)混进结果;禁工具同时堵死「摘要其实不够但模型用 decompress/search 兜回来」的作弊路径。零产品行为变更,只动本地 gate 脚本;t1(有意读 corpus.md)不动。
  5. 未扩大处理的一项:windows shard 里另有两条存储失败([Bug] MCP failed compression record rotation prematurely rewrites the history prefix, triggering expensive cache recompu | [Bug] MCP 失败压缩记录轮换提前改写历史前缀,触发大额缓存重算 #3769 flake 的 bare-id、Storage wrap-up: 6 fixes + switch default mode to full (single PR) | 存储收尾六修 + 缺省模式翻 full(一个 PR 统一处理) #3818⑨ writerOff reap-shape),[PR] fix(ci): Storage mode isolation — #3769 pin both to full, plugin-fork CCR cold recovery removes sidecar, same assertion | fix(ci): 存储模式隔离 — #3769 双件钉 full,plugin-fork CCR 冷恢复删 sidecar,两模式同断言 #4077 刚合入仍出现,机制未确认、疑似 windows 特有环境问题——不同失败域、证据不足以钉死根因,不猜修,留给独立 triage。

存量 P2 状态板(楼层 2 清单)

项 状态
invariant-judge 无大小上限 PR #4023 在途(issue #4021)
forge 自引用误触发 PR #4025 在途(issue #4024)
更新链托管 lane advisory 闸门缺失 PR #4027 在途(issue #4026)
snapshot shadow lane 默认面收紧 等你拍板:#4030(建议:默认关或采样开,理由见该 issue)
kernel projectUnit mediaExcluded no-op 等你批准:#4031(Kernel Boundary 要求)
其余小项(policyUrl 文档与实现不符、policy fetch 无上限+无 TTL、stagger=0 被远端覆盖忽略、WS lane 仍 100MiB 硬拒而 HTTP 已 5GiB、shadow lane 本地无 try/catch、unstable-prefix 遥测噪音、forge 启动横幅) 未立项。我的建议:能并入现有 issue 域的并入(update-policy 三件归一个「更新策略面清理」、shadow lane 两件并 #4030、横幅并 #4024),WS 预算缺口单独立一项(可用性缺口,参照 #3128 口径)——合计 ≤2 个新 issue,等你确认这个归并方案再立

八问

  1. 是什么问题:发版回归锚点的跟进复验;本轮发现的是 master CI 红(verif 判官在作者机器之外必挂)+ gate 召回断言因模型绕道调工具假红。
  2. 什么原因导致的:两个独立机制——①verif 新判官把开发机临时路径写死进发布代码,且缺求解器缺席守卫、引擎默认参数绑定有声明顺序崩溃;②gate 召回提示词只说「不要重读文件」没禁工具,模型行为波动混进了本应度量「折叠摘要充分性」的断言。
  3. 影响范围与严重程度:①所有后续 PR 的 ci:full 被拖红(5/6 shard),合并门禁实际失效;新判官在任何非作者机器上出不了结论。内部构建面,不影响终端用户。②仅本地 release gate 判定准确性(假红),不影响产品。
  4. 怎么修复的:①仓库相对路径 + sibling 风格 skip 守卫 + 引擎声明顺序修正(PR [PR] fix(verif): anthropic round-trip harness red on every non-author machine (CI shards 5/6 failing) | verif anthropic 判官在作者机器之外必挂,修复 CI 红 #4089);②提示词明确禁止一切工具调用(PR [PR] fix(gate): folded-recall prompts forbid tool calls — kill false-red variance | release-gate 召回提示词禁掉工具调用,消掉假红抖动 #4092)。
  5. 是否有回归问题:两者均不碰产品代码。①仅测试基建:无求解器环境那两条测试从「崩溃」变「按设计 skip」,replay baseline 照跑;verif 其余车道实测无影响(subset-guard + smoke 5/5)。②只改本地 gate 脚本提示词,产品行为/缓存/wire 全不变;审过 Lane A/B 既有断言,t1 有意保留读文件行为,未动。
  6. 是否破坏缓存:不涉及。
  7. 是否改了设计方向:没有。方向性事项(Proposal (needs sign-off): Snapshot shadow observation lane defaults to ON but rollout=0% — we're eating the full per-re | 提案(需拍板):snapshot 影子观测车道默认 ON 但 rollout=0%,白付每请求全量 transcript 加载解析税 #4030 shadow lane 默认、Kernel proposal (requires owner approval): The media "exclusion" on the apply side is a no-op — the warning text is lyin | kernel 提案(需 owner 批准):apply 侧 media「排除」是空操作,警告文案在说谎——媒体消息实际被折叠销毁 #4031 kernel media)仍在等你的拍板,见状态板。
  8. 是否引入了新的配置:没有。

收工判定:本轮可交付部分(复验确认 + 两处无决策依赖的修复)已完成,#4089/#4092 待 CI 与人工合并;状态板中两项拍板(#4030、#4031)和残余 P2 的归并方案等你回复后继续推进。

@ranxianglei

Copy link
Copy Markdown
Owner Author

关闭:review anchor 使命完成。评审结论已出(v0.1.202→e98ccda9 394 commits,无 P0;唯一实锤 P1 mysql2 已由 #4008 修复、#4013 合并后复验通过),评审目标 e98ccda 已是 master 祖先。anchor PR 按流程不合并、评审结束即关。(孤儿 PR 扫描)

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

Labels

ci:full Run the FULL CI matrix (all e2e lanes + 12-leg test matrix) on this PR dsh p2 scope/ci 发版

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant