Skip to content

[PR] chore: empty PR (no changes) - #4725

Merged
ranxianglei merged 23 commits into
masterfrom
2026-10-25_empty-pr
Oct 26, 2026
Merged

ranxianglei merged 23 commits into
masterfrom
2026-10-25_empty-pr

Conversation

@ranxianglei

Copy link
Copy Markdown
Owner

Empty PR as requested — one --allow-empty commit, zero file changes. Nothing to review or merge.

@ranxianglei ranxianglei changed the title chore: empty PR (no changes) [PR] chore: empty PR (no changes) Oct 25, 2026
@ranxianglei ranxianglei added the ci:full Run the FULL CI matrix (all e2e lanes + 12-leg test matrix) on this PR label Oct 25, 2026
@github-actions

github-actions Bot commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

📦 Built Package Artifact

Branch: 2026-10-25_empty-pr (825fd2c)

Latest build — install this exact version

npm install -g [email protected]

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

Recent builds (commit → version)

commit version build
825fd2c [email protected] build
f3a3816 [email protected] build
6e7e274 [email protected] build
5f62598 [email protected] build
23310dd [email protected] build
cd48d6d [email protected] build
b59767d [email protected] build

Download artifact

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

Install instructions are refreshed on each push.

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

查重: 不重复(open + closed 全量检索 "empty PR / allow-empty / no changes" 无相关条目)。
标签: pr + scope/ci + p3(空管道测试 PR,非缺陷不打 bug,无具体客户端车道)。

已对真实 PR #4725 逐项核实(GitHub API):

  • diff 为零:files API 返回空数组,零文件变更;
  • 仅一个 commit b59767d6 "chore: empty PR (no changes)"(--allow-empty);
  • head 2026-10-25_empty-pr → base master,mergeable=true(当前 blocked 仅因 CI 还在跑);
  • CI 现状:gate / build-artifact / unused-exports 已绿,其余 test 矩阵与 e2e 车道 queued/in_progress。

八问:

  1. 是什么问题:不是问题——按要求开的零变更空 PR,用于验证流水线/daemon 对空 PR 的处理。
  2. 什么原因导致的:不涉及(有意构造)。
  3. 影响范围与严重程度:无——零代码、零行为变化;p3。
  4. 怎么修复的:不涉及——没有可审可修的内容。
  5. 是否有回归问题:diff 为空,未触碰任何既有行为,无回归面。
  6. 是否破坏缓存:不涉及。
  7. 是否改了设计方向:不涉及。
  8. 是否引入了新的配置:不涉及。

判定:PR 确认为空,我这边无任何动作可做;按规则我不合并(merge 仅人工)。CI 跑完后由你自行决定合并或关闭。

@ranxianglei

Copy link
Copy Markdown
Owner Author

对这个进行发版review

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

发版 review 完成。先说方向判定,再给实质审计。

① 方向关:这个 PR 不是发版 PR

对照发版类 PR 的四个识别特征,逐条不满足:

识别特征 本 PR
标题 release vX.Y.Z / 纯版本号 ✗ chore: empty PR (no changes)
作者为 bot / github-actions ✗ @ranxianglei(人)
diff 只有 package.json/CHANGELOG/lockfile 版本行 ✗ diff 为零(零文件变更)
正文带「Changes since vX」清单 ✗ 无

分支名 2026-10-25_empty-pr 也不匹配 *_release-v*,commit message 是 chore: 不是 release v{VERSION} —— 即使合入,release.yml 的检测条件(分支名+commit message 双双匹配)不会触发,什么都不会发布。所以「对这个 PR 做发版 review」在 PR 内部没有可审对象;我把审计窗口换到真正有意义的目标:master 相对最近一次发布的发版就绪度(即「现在切一个 release,内容是什么、有没有回归」)。

② 版本区间回归审计(master vs 最近发布)

窗口:v0.1.206(master 谱系上最后一个 release tag)..origin/master(bb7c249)= 323 commits,359 文件,+35979/−2293。读法:--stat 全窗总览 → 高危域精读 → 其余按目录清点。

本版本引入回归:未发现。 高危域逐项点名核查结果:

跨车道漂移核查(v0.1.207/v0.1.208 从 bugfix/carve-out 车道切出,tag 不在 master 谱系上):两个车道的全部实质修复(#4390 行身份/historian tombstone、#4444 node-upgrade lever、#4506 media refs、#4677 v8 迁移流式化+进度日志、#4215 诊断、#4585 de-export)均已在 master 内容级确认存在;无缺失修复。车道独有的 jq/PMODE 三个 commit 是旧版 release-bugfix.yml 的车道侧 CI 修复,master 侧该机制已被重写移除,属作废而非缺失。

重大行为变更清单(均为有意变更,旧值→新值+原因):

  1. dsh 本地压缩 checkpoint 检测收紧([Bug][dsh] 0.1.204: auto-review side request collides with the main session → false native-compaction rebase → aux usage skips #453 clamp → permanent upstream 400 #4438):text.includes(标签) || startsWith(前导句) → trimStart 后 startsWith(前导句或标签)。原因:dsh auto-review 的合成辅助请求会把含旧 checkpoint 的历史重放进 blob,433KiB 的一次请求曾清掉活会话全部折叠状态。接受的代价(代码注释已钉死):若 dsh 同时改写前导句并把标签移出消息头,检测退化为漏检而非误报。
  2. pi/opencode inline 引擎默认翻转后同窗回滚:[PR] bili pi-inline: Enter the in-process engine with a single command (no proxy spawned, includes WS bridge) | bili pi-inline:一条命令进入 in-process 引擎(不起 proxy,含 WS 桥) #4571 先把 pi 默认翻成 in-process,随后 fd50e76 + 4ffb76d 回滚——净效果 inline 保持 opt-in,BILI_PI_INLINE 等开关不变,相对 v0.1.206 无默认值漂移。
  3. 车道自标识(origin 字段):status/overview 新增 origin 字段、web sys.lane 行、/acp 面板 <origin>——纯新增展示面。
  4. 发版机制 v3 gate-branch 模型(流程级):backport.yml 整删(−270)、bugfix 车道降级为人工合并 carve-out(dispatch 移除)、release.yml +11。动因:v2 arming 自触发事故(2026-10-25,docs 已记录)。
  5. kernel 0.0.161→0.0.163 随包内联。

⚠️ 唯一可执行发现——版本楔子:npm 注册表 latest 已是 0.1.208(今天 13:17Z 由 carve-out 车道发布),而 master 的 package.json 还停在 0.1.207(该字段是当年车道 release commit 合入时留下的)。后果:下次发版若按惯例「字段 +1」会得到 0.1.208,与已发布版本撞号,publish 失败。下次 master 发版必须直接定 v0.1.209。严重度:只卡下一次发版动作,不影响现网用户。

次要流程缺口(非阻塞):master 的 release-notes 账本停在 0.1.180(opt-in 制度下正常),但 0.1.207/0.1.208 的 v8 大存储损坏 critical 条目只存在于车道分支,未回流 master 账本。

结构化八问

  1. 是什么问题:对一个空 PR 提了「发版 review」。核实后它不是发版 PR(四特征全不满足),合入不触发任何发布动作;真正的发版就绪度在 master 侧,已按此审计。
  2. 什么原因导致的:不是缺陷。背景是 master 在 v0.1.206 之后积累了 323 个未发布提交,期间两个车道先行发布了 0.1.207/0.1.208,把 master 的版本字段甩在了后面。
  3. 影响范围与严重程度:版本楔子只影响下一次发版动作(撞号导致 publish 失败),不波及现网用户;0.1.207 的 v8 大存储损坏事故已由 0.1.208 修复,且修复代码在 master 齐备。
  4. 怎么修复的:无需改代码。切发版分支时版本号直接定 0.1.209,不走「字段+1」。
  5. 是否有回归问题:未发现。高危域逐项核查见上表;唯一行为收紧(dsh checkpoint 检测)是有意变更且代价已在代码注释中声明。
  6. 是否破坏缓存:无缓存失效策略变化;latch 修复保持原语义。
  7. 是否改了设计方向:仅流程级——发版机制转 v3 gate-branch 模型;代码架构方向未变。
  8. 是否引入了新的配置:文档登记 BILI_INLINE_DEBUG、seed BILI_PI_INLINE/pi.inline 措辞;inline 保持 opt-in,无存活的默认值变化。

收工判定:PR #4725 本身可安全合入或关闭(合入不触发任何东西;按规则我不代操作)。若目的是把 master 的内容发出去:master 当前 CI 绿(bb7c249 最近三次 run 全 success),具备发版条件,建议批准 v0.1.209——你拍板说一声「发版 v0.1.209」我就走 §5 流程切 release PR。

@ranxianglei

Copy link
Copy Markdown
Owner Author

(ai: zhipuai-lb/glm-5.3)

v0.1.208..master 发版前深度审核(362 commits / 349 files / +34046 −2464)

审核方式:4 个分域代码审查(请求管线/wire、dsh+自更新+CI 发版、前缀缓存+会话身份+存储、配置默认值)+ 本地真模型门禁 gate:local(A 压缩 / B 切模型 / U 更新)+ master head 安装验证(全局 + dsh default profile)。

结论一句话

运行时压缩/更新核心代码基本干净(src/update.ts、src/dsh-channel.ts、src/session-id.ts、全部 wire adapter 在本 range 零改动),但 CI 发版机械和发版通道有 2 个 P1,且 gate:local 第一轮复现了一个已修又被撤销的 preflight 卡死类问题;建议先修 P1/P2 再发版。


gate:local 结果(真模型,候选 0.0.900-gate.bb7c249 = master bb7c249)

轮次 A 压缩 B 切模型 U 更新 耗时
第 1 轮 7/9(2 红) 6/6 2/2 496s
第 2 轮(仅重跑 A) 9/9 — — 287s

第 1 轮两条红的根因链(gate scratch /home/dog/tmp/bili-1012/gate-1025 剖析):

P1(发版阻塞级)

  1. 紧急修复通道点火即死:.github/workflows/release-bugfix.yml:60-63 开头就 jq -r … 但整个文件没有任何 jq 安装步骤。v0.1.208 自己就是为修 runs 40193290049 等 exit-127 而加了 "Ensure jq" 引导(git show v0.1.208:.github/workflows/release-bugfix.yml:104-111),但 207698b9 保留的是 v0.1.207 时代的旧文件 —— 三个修复都没回到 master。下一次 bugfix-release/* PR 合并在 2026-10 runner 上没系统 jq 就当场死。修法:把 v0.1.208 的 Ensure jq 步骤移植回来。
  2. master 现在过不了自己的 [PR] feat: Codex Desktop Plugin (Git marketplace + MCP tools + version sync) | feat: Codex 桌面版插件(Git marketplace + MCP 工具 + 版本同步) #4449 manifest 门:实测 node scripts/sync-codex-plugin-version.mjs --check → exit 1,4 个 manifest(.agents/plugins/marketplace.json、.claude-plugin/marketplace.json、.claude-plugin/plugin.json、plugins/codex/.codex-plugin/plugin.json)全停在 0.1.205,package.json 是 0.1.207。后果:(a) 从当前 master 直接切 release 分支会被 release.yml:46 拒;(b) Codex/Claude 插件市场的更新检测从 v0.1.206 起一直没提示过用户。修法:在 master 落一个 chore: sync plugin manifests。

P2(发版前应修/应写进 release notes)

  1. The symptom is that switching models causes a hang, suspected to be triggered by dsh native compression. | 症状是切模型卡住疑似触发 dsh 原生压缩 #4288 修复被撤销(上文 gate 部分)—— 撤销 commit f4c10bd8(经 [PR] merge: tier-1 consolidation train — 37 green PRs as one (conflicts resolved, #4294 reverted) #4525/[PR] merge: tier-2 consolidation train — 15 PRs + repair of #4525's sidScope compile break #4551 consolidation train 合入),commit message 无理由;审阅者从 train 上下文读出这是 owner 决策。但 gate 第 1 轮实测复发了同类症状(deficit=0 仍连跑 299s)。要么重新落地 621c35ad(或等效),要么在 issue 里写明接受理由 —— 现状是“修了又撤、症状还在”。
  2. fork 子会话历史被静默截断:src/plugin.ts:1537-1538 用 unifiedLiveRowCount(COUNT,src/storage/store.ts:2184)当克隆边界,而行是 append-only + tombstone、追加锚在 MAX(seq)+1(store.ts:1237)-- 父会话只要有任何 retired 行,克隆边界 n-1 就低于最新活行,孩子丢尾部行;且孩子以 MAX(seq)+1 续写后,被克隆的 active block 的 ledgerSeq 区间可能盖住孩子自己的第一条新消息(kernel/src/prune.ts:516), stamped 渲染道一开就是线上消息丢失。修法:加 lastLiveSeq()(MAX(seq) WHERE retired_at IS NULL)作 throughSeq,并补 retired 行的 fork 测试。
  3. 429 治理器默认全开:network.throttle429Enabled 默认 true(src/knobs.ts),同一 origin+credential 连续 5 次 429 后,后续请求本地直接回 424 bili_throttle_terminal、retryable:false(故意不在任何 SDK 重试集内,src/upstream-throttle.ts:101-107,177)。共享账号/中继用户升级后行为大变(以前靠客户端重试扛过瞬时 429,现在第 6 个起快速失败)。设计动机成立,但这是本版最大的静默行为翻转,建议进 release notes severe 条目(发版可见性:分级标签的 release 元数据(模型撰写摘要)+ 用户版跨 span 更新说明 + acp_status //acp 面板送达「更新已就绪待重启」(#1577 延伸) #1870),文档已写(CONFIGURATION.md en:166-169/zh 同步)。
  4. 发版文档描述已删除的 v3 车道系统为"现行":reference/release.md:205+ 仍写 "THE FIRE IS ONE EXACT PR SHAPE…bugfix-vX.Y.Z"(backport.yml/lane-leak-guard.yml 已删)、:320 把唯一活着的 carve-out 通道标成 "DORMANT"、:362 声称 workflow_dispatch 应急回退还在(Incident record: A concurrent AI session bypassed the expected workflow and released v0.1.208 (the bugfix lane mechanism | 事故记录:并发的 AI 会话绕开预期流程发布了 v0.1.208(bugfix 车道机制已于当日拆除,待重建) #4718 已删 trigger);AGENTS.md:226 的 dual-lane 段落同样失真。紧急场景下照文档走会发布了个寂寞。需一个文档 PR 对齐现实。
  5. 一键发版通道当前被卡:release-manual.yml drift guard 要求 master package.json(0.1.207)== npm latest(0.1.208),现在每次 dispatch 必红,而文档里的解锁机械(alignment PR)已删。下一次正常 ≥0.1.209 发版后自然对齐;期间别用一键通道。
  6. release-bugfix.yml 没有 [PR] feat: Codex Desktop Plugin (Git marketplace + MCP tools + version sync) | feat: Codex 桌面版插件(Git marketplace + MCP 工具 + 版本同步) #4449 manifest --check —— 契约(AGENTS.md "ALL THREE publish workflows run --check")与实现不符,紧急 carve-out 会带着漂移 manifest 出门(正是 0.1.188/0.1.205 漂移的产生机制)。
  7. ledger 重排(restamp)不重排 CCR content store(kernel/src/refs.ts:217 restampRefsToLedger,每次统一存储冷载经 src/persist.ts:1601-1617 触发,不受 rollout 门控):重排只改 messageRefs,不动 kernel/src/content-store.ts 的 ref→rawId 别名(first-write-wins 冻结)。后果:(a) src/plugin.ts:1164 forkSnapshot 别名校验抛 "CCR original alias inconsistent" → CCR 会话的 plugin-lane fork(acp_delegate)永久 409;(b) src/decompress-shared.ts:421 retrieveByRef 无 entry.rawId===raw 交叉校验 → 复用号可拿到另一条消息的原文(静默错配)。触发链 = CCR 开启(默认关,kernel/src/config.ts:49)+ 统一存储行 + counter ref 与 seq 漂移(anthropic/codex 类会话)+ bili 重启。现有测试无 CCR×fork 覆盖。修复方向:host 侧先补 retrieve 的 rawId 交叉校验(错配→按未找到处理)+ forkSnapshot 对 restamp 的认知(不冻别名或允许重排),kernel 侧同步重排 store 属 kernel 门控变更。
  8. [cache] Similar cache seams still detectable after #1548 / #1551 / #1554: v0.1.197, 21 samples / 1.14M tok | [cache] #1548 / #1551 / #1554 之后仍可测到同类缓存接缝:v0.1.197,21 样本 / 1.14M tok #3307 P2-A 的折叠 re-pay 归因修复在 relay 车道上是死代码:de193f46 在 recordCacheSample 里加的 xMeasured 测量块直读 session.transient?.sentBody(src/cache-ledger.ts:1294),而同一 range 内 [PR] fix(cache): pair overlapping forwards with their own request evidence #4430 把 relay 车道的 pending 证据挪进了 AsyncLocalStorage(withCacheCapture,relay.ts:251 包住整个 forward+流式 settle)—— relay 车道上 transient.sentBody 恒为 undefined,测量块永不触发。讽刺的是该修复的目标场景(无状态代理客户端重发全量历史)恰是 relay 车道;loop 车道(不走 ALS)反而能用。同块的 curIn(session.transient?.inBody)同病。修复:两处都改用 pendingCapture/lastForwardedBody 访问器 —— 必须一起改,否则 clientBreak 守卫在 relay 车道被旁路,会在客户端改写场景误测。

P3(记录在案)

默认配置变更(升级用户会感知的全部)

变更 旧 → 新 影响
network.throttle429Enabled 不存在(全部直发)→ true 连续 429 后本地快速失败(见 P2-3)
codex 状态模式 legacy 独占 overlay、单实例 → auto/shared(codex-cli ≥0.147.0 走真 $CODEX_HOME + 16 并发 slot) 每个 bili codex 用户自动切换;逃生 BILI_CODEX_STATE_MODE=legacy
claude 子进程环境 cert-MITM + HTTPS_PROXY 继承 → 纯 http /bili/ + loopback NO_PROXY 子进程 curl/git/npm 不再过 bili MITM(#3446)
熔断失败响应 502 → 503 + Retry-After,error 带具体上游 盯死 502 的脚本要改
compress.maxSummaryLength/minSummaryLength 配置存在但静默丢弃 → 真正生效(20000/50) 老配置开始被尊重(#3635 修复)
一次性 ledger 重排 counter ref 永久保留 → 冷载时按 seq+1 重排一次 升级重启后 ref 号整体移位一次;compress 引旧号会收到诚实拒绝
优雅关停 固定宽限 → 最多 10×10s 排空,watchdog 需 3 次连续探测失败 Ctrl-C 不再掐断在途请求;僵尸检测慢 3 倍(有意的)
pi.inline/opencode.inline 不存在 → false(opt-in) #4571 曾默认开、#4687 撤回,最终默认不变
外部摘要 auto-fold 只要 armed 就折 → 需 ≥4096 token 净收益 + 目标抬到实测下限 fold 风暴修复,行为变少(文档缺口见 P3)
snapshotRender / pluginLaneServerHistory / pluginIncrementalTurns 0% → 0% 无人在升级后翻进灰度道

新增 env 10 个(BILI_PI_INLINE、BILI_OPENCODE_INLINE、BILI_INLINE_DEBUG、BILI_CODEX_STATE_MODE、BILI_THROTTLE_429 及 3 个旋钮、BILI_ROLLOUT_PLUGIN_LANE_SERVER_HISTORY),en+zh 文档均已核同步;无删除/改名。kernel 默认面(golden pin、flat 50K nudge)零改动,kernel 0.0.161→0.0.163 版本纪律合规。

验证干净面(重点核对过)

安装状态(本 PR head = master bb7c249)

  • 全局:npm install -g . --install-links,0.1.207 (bb7c249),readlink 空 = 真拷贝 ✅
  • dsh default profile:file: 钉 ~/tmp/billion-context-0.1.207-master-bb7c2497.tgz → 0.1.207 ✅(其余 profile 的本地钉按契约不动;web profile 随 registry 在 0.1.208)

建议的发版前置清单

  1. 移植 v0.1.208 的 Ensure jq 回 release-bugfix.yml(P1-1)
  2. master 落 manifest sync chore commit(P1-2)
  3. 重新落地 The symptom is that switching models causes a hang, suspected to be triggered by dsh native compression. | 症状是切模型卡住疑似触发 dsh 原生压缩 #4288 修复或写明撤销理由(P2-1)
  4. fork lastLiveSeq 修复 + 回归测试(P2-2)
  5. release notes 写 429 治理器默认开(P2-3)
  6. 发版文档对齐现实(P2-4/P2-6)
  7. CCR retrieve rawId 交叉校验 + forkSnapshot 对 restamp 的认知(P2-7,触发面窄但含静默错配)
  8. cache-ledger [cache] Similar cache seams still detectable after #1548 / #1551 / #1554: v0.1.197, 21 samples / 1.14M tok | [cache] #1548 / #1551 / #1554 之后仍可测到同类缓存接缝:v0.1.197,21 样本 / 1.14M tok #3307 测量块改 pendingCapture 访问器,curB/curIn 一起改(P2-8)

审核为只读;本 PR 自身无代码变更。各发现建议按 §4 规则拆独立 issue/PR 跟进。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

CI 自动修复(第 1/2 次)— 继承性红,已收敛 ci-fixes

判定:本 PR 零文件改动,8 个红 shard 没有一项是本 PR 引入的 —— 全部是 master 继承性红。 逐 job 核对了 run 40202012280 的 TAP 输出(ubuntu 24/3 = 12 fail、windows 22/4 = 7 fail),失败项与 #4599 总控名册逐条对上:

动作(按 CI 失败协调政策,不在自己分支重复修 master 级失败):把哨兵维护的 ci-fixes 头 18f514667 合入本 PR 分支并推送,无冲突,新 head cd48d6d0b,CI 已重跑。merge diff 仅 tests/ 下 9 个文件(+259 −89)。

结构化八问

  1. 是什么问题:空 PR 的 8 个 test shard 全红,但全是继承自 master 的存储车道 born-red,不是本 PR 的缺陷。
  2. 什么原因导致的:After model switch / client-side history rewrite, all message identities (content hashes) are replaced: ACP numbers re-m | 切模型/客户端重写历史后,消息身份(内容哈希)全部更换:acp 编号重铸、折叠覆盖大规模重挂、死 ref、churn 区临时膨胀重折 #4316 的一次性 ref 号重排改变了冷载后的 wire 字节,旧 golden 钉死精确 ref 号 → 结构性失配(bisect 与归属见 CI Control Center: Centralized CI Failure Handling & Status Sync (Comment all CI issues here; do not open new issues) | CI 总控: CI 失败集中处理与状态同步(所有 CI 问题在此评论, 勿开新 issue) #4599);plugin-fork 一项则是修复 PR [PR] test: plugin-fork assertions branch by storage mode (runners without sqlite engine are no longer born-red) | test: plugin-fork 断言按存储模式分支(无 sqlite 引擎的 runner 不再 born-red) #4652 尚未合入。
  3. 影响范围与严重程度:只影响 CI 门禁 —— 每个基于当前 master 的在途 PR 都继承这些红;运行时/用户面/发布产物零影响。严重度:阻塞合并门禁,非功能缺陷。
  4. 怎么修复的:不自行修(政策禁止在 PR 分支重复修 master 级失败),直接 merge 哨兵在 ci-fixes 上按 owner 拍板 plan A 收敛的 re-pin commit,推 cd48d6d0b,由 CI 重跑裁决。
  5. 是否有回归问题:merge 仅含测试文件(断言方式改为 citation-normalized digest / 对齐模归一 + golden 再生),零生产代码 → 无运行时行为回归;高危模式逐项过:无语义漂移、无阈值/时序/输出格式变化、无错误处理路径触碰。
  6. 是否破坏缓存:不涉及(无运行时代码变更)。
  7. 是否改了设计方向:否。测试契约向 After model switch / client-side history rewrite, all message identities (content hashes) are replaced: ACP numbers re-m | 切模型/客户端重写历史后,消息身份(内容哈希)全部更换:acp 编号重铸、折叠覆盖大规模重挂、死 ref、churn 区临时膨胀重折 #4316 一次性 ledger 对齐语义靠拢,属 owner 已拍板的 plan A,非新方向。
  8. 是否引入了新的配置:无新增 env/config/默认值。

残留风险:plugin-fork 那一项在 #4652 合入前可能继续红 —— 若重跑后仅此一项红,属预期,待 #4652 收敛即可,不需要本 PR 侧任何动作;届时按 attempt 2/2 处置。

另:线程里新贴的 v0.1.208..master 发版前深度审核(P1/P2/P3 清单)超出本 CI 自动修复车道的范围,按其自身结论各发现应拆独立 issue/PR 跟进,此处不扩scope。

@ranxianglei

Copy link
Copy Markdown
Owner Author

(ai: zhipuai-lb/glm-5.3)

补充修正(残余 6 文件复审的完整结果,修正上条评论中两处严重度 + 1 个新发现)

上条评论发布后,残余文件(plugin-render / cache-ledger / util / fold-decomposition-lookup / msgid-algebra / uncovered)的窄范围复审跑完了,三处需要修正/补充:

1. plugin-render pos === -1(上条记 P3,应升 P2) —— 可触发性比上条估计的宽得多:不止"untilSeq 切进覆盖区","折叠恰好覆盖到转录尾部"这一普通状态(刚完成一次压缩、还没有更新的行)就会对任何够到折叠末行的 untilSeq 触发 —— 无需任何客户端异常。此时覆盖行被抑制(coveredSeqs.add 在 findIndex 之前)且不发 acp_summary 锚:模型整段丢失该折叠的上下文,响应仍是 ok:true,日志还把这些行计进 folded=N。兄弟实现证明意图:src/server/snapshot-render.ts:357-361 把锚默认放在 prefix 末尾(let at = d)、:381 在合并循环后有尾部 flush —— plugin-render 两者都没有。修法照抄:anchors.push({ pos: pos === -1 ? viewRows.length : pos, … }) 并在合并循环后补 while (ai < anchors.length) merged.push(anchors[ai++].msg)(否则 pos===viewRows.length 的锚永远不会被 flush)。今天 pluginLaneServerHistory 0% 灰度所以是潜伏;该道一开就是数据丢失级。

2. fold-decomposition-lookup 的 splice 索引失步(上条记 P3,应升 P2) —— 具体 trace:行按 seq 交错 A₁, B₁, A₂, B₂(存储对编辑是追加行,messagesForIds 取全部行,这正是 #3301 目标场景)→ A₂ 到达时 splice(0) 删 A₁,orderedIdx[B] 失准 → B₂ 到达时删错元素、A 的最新行(该查找存在的目的)被整行静默丢弃,B 出现两次;tried 标记随后永久禁止重试。下游有 per-cell fingerprint 硬门兜底(不会错配),但证据缺失是永久且不可见的。修法:删掉索引 map,结束时直接按 latestSeq(已在跟踪)重建/排序去重。

3. 新 P3:cache-ledger.ts:1925-1927 settledInBody 基线耦合 —— settle 侧现在要求 seamBody !== undefined && !backwards 才落 settledInBody,而 noteForwardedBody 的 round>1 分支会 delete transient.inBody(loop 车道 core.ts:499 重记 body 但不重记 inbound)。两个一起:loop 第 ≥2 轮的每次 settle 都删掉入站基线 → 下一轮的 #3023 客户端臂 seam 归因静默跳一轮。方向保守(不会错误归因)、仅诊断面,但相对 v0.1.208 是覆盖回退;建议保留基线、把该行的 client 臂标为不可用。

同时解除两个我方软性疑虑(有据为 clean):uncovered.ts 的共享-clone 双 processTurn 窗口差分是稳的 —— kernel compress.ts:2030 的 recommendedRanges 无条件计算,cadence 戳只影响 shouldInject;msgid-algebra 的 summarySeen && ≥3 vanished ⇒ 全部 compressed 粗启发式唯一消费者是 prepare-anthropic.ts:611-638 的观测日志(try/catch、只记日志和计数器),不进身份判定。util.ts 四项(#4128/#4124/#4452/#3450)的消费者侧(relay.ts:1095/1327/1519)全部核对一致。

上条评论的其余结论(含 P1×2、其余 P2、默认值表、验证干净面)不变。

@ranxianglei

Copy link
Copy Markdown
Owner Author

(ai: zhipuai-lb/glm-5.3)

v0.1.208..master 补充审核(第 3 轮)——针对前两轮声明的薄弱面

审核方式:前两轮(qwen 发版 review + glm 深度审核)各自标注了未覆盖面;本轮补的是 ①qwen 明确写「未逐行精读」的 src/upstream-* + src/storage/* 14 文件、②kernel 全量 diff(前轮只查了三个点位)、③对可疑点实际写复现测试跑在 master 净树(bb7c249)上验证,不靠读码下结论。

去重声明

前轮已发现的 P1×2(release-bugfix jq / manifest 漂移)、P2×10(#4288 撤销、fork 截断、429 默认开、文档失真、一键通道、carve-out 缺门、CCR 错配、relay 死代码、plugin-render 锚、splice 失步)、P3×若干——本轮不重复列。以下全部是新增发现。


新发现 N1(P2,已实测复现):不可解析的块区间落库为 [0,0],kernel 把它当合法退化区间 → 错误认领无关的 seq 0 消息

复现(master 净树,真 store + 真 kernel,node --import tsx --test):

RECORD startSeq=0 endSeq=0      ← 块的覆盖 raw(rawX/rawY)从未入库(迁移/导入形状)
INTERVALS [{"start":0,"end":0}] ← kernel coveredSeqIntervals 接受了它(0 >= 0)
COVERED0 true                   ← isCoveredBySeq(0) === true:seq 0 是 new1,与 b1 毫无关系

机制链:

  1. src/storage/store.ts:887-893 boundsForCovered 在覆盖 id 无法解析时返回 [0,0](注释:"keep the 0 placeholder"),mysql.ts 的孪生实现同样。而 Post-fold resaves erase resolved block interval bounds | 折叠后重存会把已解析的块区间边界抹回未知(-1/-1) #4608 的守卫(CASE WHEN excluded.start_seq >= 0)只防负数——注释里写的 "-1/-1 unknown" 与代码实际返回值不一致;
  2. kernel/src/prune.ts:66 coveredSeqIntervals 的接受条件是 endSeq >= startSeq,[0,0] 通过 → 成为一个只覆盖 seq 0 的真实声明;
  3. prune.ts:516 的 isCoveredBySeq 据此把 seq 0 消息判为「已折叠」→ 其原文被抑制出站,尽管该块从未折过它;sync.ts 的 blockSeqPresent 同样会把任何 seq 0 消息当作「块仍在场」的证据。

触发人群:统一存储迁移的存量安装——会话里已有折叠块,被覆盖的 raw 早于统一存储开启(从未落行)。第一次 unified 落库就写入 [0,0]。seq 0 通常是迁移后第一条入库消息(快照/合成消息或真实消息)——若是后者即真实内容静默丢失。另注:后续落库能解析时 >=0 守卫会接受新值,自我修复为真实区间;所以窗口 = 迁移后到 raws 重新入库之间(被折叠掉的旧消息永不重新入库,窗口即永久)。

修法:不可解析必须存「无声明」——start_seq/end_seq 落 NULL(或哨兵 -1),并让 coveredSeqIntervals/blockSeqPresent 跳过 startSeq < 0;顺带把 #4608 注释与实现对齐。两个后端(sqlite/mysql)一起修。

附带说明(诚实记录):我最初怀疑 #4608 的 upsert 守卫整体是死代码(boundsForCovered 返回 [0,0] 而非 -1),实测证伪——守卫在常规路径工作正常(第二次落库区间 [0,1] 存活),因为 boundsForCovered 查的是存储里的全量行而非本批。真正的问题只剩上面的退化认领。

新发现 N2(P3):每次带块的落库全表扫描 messages

boundsForCovered 的输入 seqSpanById 每次都 SELECT msg_id, seq FROM messages WHERE session_id = ?(store.ts:870、mysql.ts 同)——无 LIMIT、无 retire 过滤、每个有块的会话每次 save 都执行。产品目标场景是百万 token 长会话(messages 表可达 10 万行级),persist debounce 默认 ~2s:每 2 秒全表扫一遍。今天正确性无恙(只读),但这是每折会话的固定税。修法:增量维护 span(落行时顺手更新内存区间)或按 covered ids 点查(WHERE msg_id IN (...))。

新发现 N3(P3):429 治理器对 loop 车道(压缩重发)不可见

upstreamThrottleLocalReject/noteUpstreamThrottle429 只接在 relay 的主转发路径(relay.ts:816/1584);压缩循环 round-2+ 的重发请求(preflight refold / in-request resend)不走这两个钩子——上游对压缩请求持续 429 时治理器不 arm,重发风暴保护恰好缺了最可能高频重发的那条道。今天无害的原因是压缩轮有自己的预算/超时,但「stop amplifying」的承诺在这条道上是空的。修法:loop 车道的 fetch 也过 gate/observe 对(或至少 observe 侧)。

复核确认(与前轮结论一致、加深过、无需改判)


一句话:新 P2×1(N1,已复现,建议随发版修——迁移人群的静默内容抑制)+ P3×2(N2 扫描税、N3 loop 车道盲区);其余薄弱面复核后无新问题。前轮的 P1/P2 清单维持不变。

ework-agent and others added 3 commits October 26, 2026 00:16
The first resolve step calls jq 4 times, but the workflow carries no jq
install step: on the 2026-10 runner images (observed jq missing, runs
40193290049 et al exit-127) the emergency carve-out channel dies at
ignition exactly when it is needed. v0.1.208 shipped this bootstrap
(e7b0a1e2); the consolidation trains that rebuilt master kept the older
workflow file and dropped it. Port the step verbatim from v0.1.208.
The four plugin manifests (.agents/plugins/marketplace.json,
.claude-plugin/marketplace.json + .claude-plugin/plugin.json,
plugins/codex/.codex-plugin/plugin.json) sat at 0.1.205 while package.json
is 0.1.207 — the #4449 gate (node scripts/sync-codex-plugin-version.mjs
--check) fails on master, so any release branch cut now would be rejected
by release.yml's pre-tag check, and the Codex/Claude marketplaces have not
offered updates since v0.1.206. Run the sync script (no code changes).
…ndow

After a model switch shrinks the context window, the round-boundary exit judged on decisionTokens, which is floored by the session usage baseline. That baseline was measured under the prior wider-window model, so it sits above the new window and the exit never trips on an already-fitting payload. The summarization ladder then burns every round until the client times out and the session wedges (#4288).

Judge the round-top exit on result.payloadEstimate instead, the floorless quantity the caller forward gate already trusts. The floored condition implies this one, so folding never increases versus the old behavior; only the redundant ladder-burning on fitting payloads is removed. The intra-walk exits stay floored (conservative mid-walk).

Adds a regression test: model switch, stale high usage baseline, payload fits, and preflight forwards without spending a single fold call.

(cherry picked from commit 6a9257a)
ework-agent added 2 commits October 26, 2026 00:49
…message exceeds the budget

A pair range [tiny tool-call + oversized tool-result] under a window whose
0.6 chunk budget is smaller than the result split into [call-only fragment]
[result]; the fragment's preview is atomically rejected by the kernel's
minCompressRange gate ('Total compressible content too small (64 chars …,
min 5000)') — reproduced live in gate:local (gate-1025, '64 chars'/'77
chars' rejections burning a preview per round), and on the batch lane
(one span per range) the range never folds at all. Apply the min-chars
floor in both baseline regimes: a sub-floor chunk merges forward with the
oversized message into one coherent span instead of standing alone.

Fixes #4740
unifiedLiveRowCount counts live rows, but cloneSessionRows wants the
inclusive throughSeq and seqs anchor at MAX(seq)+1 — tombstones keep
their seq, so any retired row makes count < lastLiveSeq + 1 and
count - 1 silently dropped the newest live rows from the cloned child
(the fork receipt then serves a truncated ledger while the kernel view
kept every number). unifiedLastLiveSeq (MAX(seq) over live rows) is now
the throughSeq source across store/mysql/backend/shadow/persist;
unifiedLiveRowCount stays on the shadow surface for its other callers.
Regression: tests/issue4730-fork-live-seq.test.ts (retire a middle row,
clone must still carry the newest live row; count-1 control documents
the old truncation).
ranxianglei and others added 2 commits October 26, 2026 10:39
…lane, missing-manifest gate, autoFold docs

Three unfixed items from the #4725 review ledger (#4757 landed separately via
the ci-fixes sweep):

- release-bugfix.yml lost the #4449 manifest --check when the v3 lane rewrite
  landed (v0.1.208 ran it before Publish guard; master's rewrite dropped it).
  Ported back with the #4576 pre-#4449 lane existence guard, gated on the
  resolve step's actual proceed output (this variant has no path output).
- scripts/sync-codex-plugin-version.mjs silently SKIPPED a missing manifest
  file — in --check mode a missing file greened the gate, neutering the
  release guard. A missing target is now a hard error naming the file; the
  four manifests are a fixed contract. Regression test added (RED on the old
  skip).
- CONFIGURATION.md en+zh: document the autoFold benefit gate (#3444: growth
  folds arm only on ≥4096 tokens over the effective target; sub-4096 saving
  arms the backoff; image-dominant exempt) and the measured floor (irreducible
  baseline raises an unreachable target, never above the window). Both
  languages in sync.

Sync tests 5/5, typecheck clean.
@ranxianglei

Copy link
Copy Markdown
Owner Author

(ai: zhipuai-lb/glm-5.3)

审核清单收尾:剩余未修项已处理(ec3576b)

上一轮盘点(#4725 (comment) 之后)中「可以直接修」的四项:

  1. decision request: ACP tag token counts wrong after proxy restart with unified-full storage (wire-parity proofs born-red) #4757 tokenSnapshot 重映射 — 无需新工作:qwen 的 4c6aefe 已由 ci-fixes 列车(6e7e274 帮合并扫)进入本分支,验证存在(maybeRestampToLedger 两遍法移动 + refLedgerAligned 同过)。
  2. release-bugfix.yml 丢失的 [PR] feat: Codex Desktop Plugin (Git marketplace + MCP tools + version sync) | feat: Codex 桌面版插件(Git marketplace + MCP 工具 + 版本同步) #4449 manifest --check — 已补回(v0.1.208 :322 的步骤移植,含 [PR] fix(release): train mode survives pre-#4449 patch lanes #4576 pre-[PR] feat: Codex Desktop Plugin (Git marketplace + MCP tools + version sync) | feat: Codex 桌面版插件(Git marketplace + MCP 工具 + 版本同步) #4449 lane 存在性守卫;if 用本变体的 resolve.outputs.proceed,不是 v0.1.208 的 path 输出——那个输出在这个重写版里不存在,照抄会永远不触发)。位置:Read version 之后、Publish guard 之前,作用于 carve-out PR head 树。
  3. sync 脚本对缺失 manifest 静默跳过 — 改为硬错误(缺少 manifest:<文件> 不允许跳过,exit 1)。原行为在 --check 模式下等于把发版守卫钻了个洞:manifest 不存在照样绿。新增回归钉 a MISSING manifest file fails the gate(旧码必红)。
  4. CONFIGURATION.md autoFold 文档缺口 — en+zh 同步补齐 auto-fold sharp edges: a sub-floor autoFoldTargetTokens causes a fold storm, and externalSummary.* file edits do not take effect until a PUT /__bili/config #3444 语义:增长折叠的 4096-token 收益门槛(武装侧+折叠后侧)、图片主导豁免、实测下限(不可压缩基线抬目标,永不超过模型窗口)。

验证:sync 测试 5/5、issue1195 A/B/C + #2777 + #4288 三钉全绿(rebase 到 master 合并点 4e0c773 之后)、typecheck 0 错。

仍开放的项(均需 owner 拍板或另行处理,非代码可直接修):429 治理器默认开启的 severe release-notes 条目(发版 PR 内)、gate 脚本对 #4288 fit-forward 的适配、inline 车道 429 治理/熔断旁路(P3,设计取舍)、decompress imageRef 的 restampSuperseded 守卫(P3,两位审核员结论相反)、reference/release.md v3 章节与 release-manual RETIRED 标注的文档面统一、master 0.1.207≠npm 0.1.208(下次发版自愈)。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[bot] 🏷 (ai: vllm-qwen/qwen3.8-27b)

冲突车道状态确认(对最新 head 复核)

我负责的 #4725 基线冲突(auto-fix lane)已解决并落地;此轮针对分支后续推进做了 ground-truth 复核,结论如下。

我之前做的(已完成):把当时 master 合并进 PR 头,唯一冲突在 src/persist.ts import 块——取两侧并集(保留 master 的 type MessageRefContentRow #4738 + PR 侧 contentStoreOf #4733)。fast-forward 推送(785af36c9..f3a38165f,无 force-push),提交 f3a38165f。推送后 GitHub 已转 mergeable: true(原 dirty 消失)。

本轮复核(分支作者又推了 round-3 修复 + 自己又 merge 了一次 master):

  • 我的冲突合入 f3a38165f 仍是最新 head 825fd2c49 的祖先——未被覆盖、完整在链上。
  • merge-tree:最新 head 825fd2c49 × 最新 master 8290f413c → 无 CONFLICT,基线仍干净。
  • 分支正被其作者主动维护(自行向前合并 master);master 侧新增提交均不与之冲突。

结果:冲突维度保持绿,我这边无需再改动;是否合入归 owner,等 CI 转绿即可。若状态再次变 dirty,我会按同一「核对→并集→fast-forward」流程继续处理。

@ranxianglei
ranxianglei merged commit 931c66a into master Oct 26, 2026
24 of 25 checks passed
ranxianglei pushed a commit that referenced this pull request Oct 26, 2026
…ores (#4599)

maybeRestampToLedger called contentStoreOf() speculatively to re-key the CCR content store after ref restamping (#4733). contentStoreOf is a get-or-MATERIALIZE helper: for a session that has never had a store it assigns a fresh empty envelope, so every full-mode cold load started persisting/serving contentStore={version:1,byHash:{},byRef:{}} where the legacy path keeps undefined. The storage-unified parity pin (full serve = legacy serve + ledger alignment) digests contentStore and went red on both FULL-mode read subtests at a4a17cb (#4733, landed via #4725).

Guard the re-key with if (session.contentStore): storeless sessions have nothing to re-key and keep their pre-#4733 shape; sessions WITH a store are re-keyed exactly as #4733 intended (the retrieveByRef misattribution fix stays intact).

Verified locally (targeted): tests/storage-unified.test.ts 14 pass/0 fail (was 12/2); tests/issue4733-ccr-restamp.test.ts 2/0; kernel/tests/ccr-restamp.test.ts 3/0; typecheck clean. Full-suite verdict is the CI test lanes on the pushed head.
@github-actions

Copy link
Copy Markdown
Contributor

📦 Merged Build Published

This merge to master was published as 0.0.850-master.931c66a (rolling master tag).

npm install -g [email protected]  # 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.

ranxianglei pushed a commit that referenced this pull request Oct 26, 2026
…erdict; #847/#1492B contracts reconciled to the #4288 world

Both files were red since the #4725 merge (verified at 931c66a in an isolated
worktree): the re-landed #4288 exit fired at round top, but the final verdict
block still stamped an exhausted failure whenever currentTokens — floored by
the same stale baseline the exit exists to bypass — read over-limit. A
fit-forward walk then reported 'no viable range could be compressed' while the
caller forwarded the fitting payload anyway: the marathon was prevented, but
the reported verdict lied.

- preflight.ts: fitExitForward flag — a round-top fit exit suppresses the
  final failure stamp (aborts still win).
- #1492 B: contract updated to the #4288 doctrine — a usage-grade baseline
  above the window on a FITTING payload forwards; a usage baseline above the
  limit cannot have been measured under this window regime, and a real
  overflow arms the one-shot rescue (#1110/#987) on rejection.
- #847: the honest-exhaustion pin now covers its actual post-#4288 meaning —
  the fitting sub-gate payload exits fit-forward with no verdict; the
  exhaustion path stays for payloads that genuinely exceed the target.

issue847 4/4, issue1492 3/3, issue4288 3/3, issue1195 4/4, preflight family
21/21, 4797 family 4/4, typecheck clean.
yanhuojiyusheng pushed a commit to yanhuojiyusheng/billion-context that referenced this pull request Oct 26, 2026
… declaration for lockfile-only churn

kernel/package-lock.json is generated state, not kernel source. Agents' test
prep (npm install inside kernel/, sweep-bot merges of stale lockfiles) churns
it without any intent to change the kernel — 8 PRs (ranxianglei#4823 ranxianglei#4808 ranxianglei#4802 ranxianglei#4800
ranxianglei#4799 ranxianglei#4794 ranxianglei#4790 ranxianglei#4785) tripped the human gate on lockfile-only diffs, and
the previous stopgap (bots appending kernel-change: declarations to PR
bodies) was correctly rejected by the owner as bypassing the approval step.

The human gate exists to protect kernel SOURCE. Rule 1 now ignores
kernel/package-lock.json when deciding whether a PR 'touches kernel/'; real
source/build-config changes still require the declaration + owner approval,
and lockfile CONSISTENCY stays enforced by the separate lock-sync job (which
fails on genuine drift — the ranxianglei#4725 merge red being today's live proof).
@github-actions github-actions Bot mentioned this pull request Oct 27, 2026
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 p3 scope/ci

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant