Skip to content

release v0.1.189 - #2451

Merged
ranxianglei merged 1 commit into
masterfrom
2026-10-09_release-v0.1.189
Oct 9, 2026
Merged

ranxianglei merged 1 commit into
masterfrom
2026-10-09_release-v0.1.189

Conversation

@github-actions

@github-actions github-actions Bot commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

Auto-fallback from the one-click release workflow: direct push to master was blocked by branch protection. Merging this PR publishes via the standard release.yml flow.

Changes since v0.1.188

@github-actions

github-actions Bot commented Oct 9, 2026

Copy link
Copy Markdown
Contributor Author

📦 Built Package Artifact

Branch: 2026-10-09_release-v0.1.189 (e8d4d8c)

Option A — Install this exact build (recommended)

npm install -g billion-context@0.0.2662-pr.2451.1d47163-a2

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

Install instructions are refreshed on each push.

@ranxianglei

Copy link
Copy Markdown
Owner

🤖 Powered by ework · qwen3.8-27b

release v0.1.189 审查结论

判定:可合(代码层面无拦截性回归)。 PR 自身 diff 干净——仅 package.json + package-lock.json 版本号 0.1.188 → 0.1.189。已按发版类 PR 规则对 v0.1.188..master 全窗口(137 commits / 196 files / +22531 −4269) 做整体通读审计(非逐分支拼接)。CI 审查时仍在跑(mergeState=unstable),绿色以 CI 为准;以下为代码层面人工逐域核查。

高危域逐项点名核查

域 结论
自动更新/自更新(src/update.ts) ✅ 窗口内未触碰,无需 no-op 验证发版
dsh 集成/安装/升级/守护 ✅ ①dsh-compaction-guard.ts(新增,fail-closed 在流量层本地拒绝 dsh 原生压缩调用:MARKER-DECISIVE,去掉 ≤4-msg SHAPE 门槛[#2193 rc.2 回放整段致静默放行→不可逆 substrate 丢失],补 Responses 通道[#2360 desktop 走 /v1/responses]);②#2381 model-info 缓存按 (provider,model) 重键(修跨模型窗口污染:旧单槽用全局默认模型名盖会话头→proxy exact-match 门丢弃整个 header 通道→窗口落回 fallback);③#2399 dsh fork 子代际采纳(isSeeded 门控);④#2432 本地压缩 rebase + breaker-awareness(各附 200+/354 行测试)
版本钉死 / lockfile ✅ 唯一运行时依赖仍 zod 4.1.8 不变;typebox ^1.3.34 为 devDependency(不入 dist);acp-kernel 0.0.107→0.0.109(随 src 升版,KERNEL 边界纪律成立);pi-subagents 由 registry 0.1.1 → file:./pi-subagents@0.1.3(#2384 入仓)
systemd / env 模板 不涉及(窗口无此类改动)
网络 / 代理路径 ✅ preflight 紧急摘要折叠(#2383)、runaway-guard(#2346/#2363)、四协议 adapter 均已核

重大行为变更清单(old → new + 原因)

  1. plugin.snapshotCapBytes 默认 16 MiB → 100 MiB(src/knobs.ts:283)。原因:全景:派生会话(fork / resume / 子代理 / 辅助人格)的会话身份治理 — 现状盘点与缺口 #2394 G3(owner 于 DSH 分叉会话后触发大量 preflight overflow compress #2383 线程签批)——~20MB+ 的 dsh fork 回放须开箱可 fork。env/file/0 仍可覆盖/禁用。这是唯一提高资源驻留上限的默认值,明确列出供知悉(有界,超限仍 409 fail-closed)。
  2. 新增配置字段(均为 owner 批准 feat,缺省=旧行为,无需迁移):
  3. kernel 行为(0.0.107→0.0.109,human-gated):
  4. preflight 确定性紧急摘要折叠(DSH 分叉会话后触发大量 preflight overflow compress #2383):当 entryLocal/window > EMERGENCY_FOLD_COVERAGE(=MAX_PREFLIGHT_ROUNDS×2×CHUNK_FRACTION,由本循环自身覆盖数学导出,非任意倍数)时,折叠改 CPU-only 结构摘要(零上游调用、无失败模式、原文经 CCR 可 decompress 还原)。判据用 FOLDABLE 质量 entryLocal 而非 baseline 地板 entryTokens(避免外来模型 baseline 误触发,e2e 已验证)。正常会话不逼近该界;LLM 路径字节不变。
  5. token 估算计入 thinking 质量([follow-up #2369] calibration k̂ denominator omits projected thinking mass — extended-thinking routes over-scaled under the two-way clamp #2407/[bug] anthropic wire: signature-only thinking blocks missing from compressible estimate — savings receipts overstate, nudge stays idle (claude native) #1320):estimateCoreMessages 改用 countMessageTokens(含 host 投影 thinking tokens)。含 thinking 时估算偏高 → k̂ 校准分母、preflight 预算、输出钳制、image-cost textSide 更贴计费口径。属修正而非回归。
  6. runaway-guard 常驻流拦截(【bug1】失控枚举无内在终止条件:单条消息 265 个标签,撞输出上限或需手动掐断 #2346/fix: intrinsic termination gate for runaway enumeration (#2346) #2363):relay.ts 对 pluginBody 与 responseBody 均套 wrapStreamWithRunawayGuard;保守多信号阈值远高于合法单消息上限(ACP_TAG=50 vs 实测上限 11;TOOL_XML=300 vs runaway≈8700)+ 佐证信号(单调 ref 连击 / ≥90% 零 token 占比)。检出即 abort 上游流。误报风险低。
  7. pi-subagents 入仓(billion-context-pi-subagents 直接纳入本项目 像acp-kernel一样 #2384):新组件边界,自持版本 0.1.3,新增 CI pi-subagents-guard(版本纪律,刻意比 kernel-guard 轻:无 PR-body 声明/human 门)。
  8. npm 包现随附 CONFIGURATION.md(+zh)(files[]):修 conflict-docs 指针引用了安装包里不存在的文件。
  9. server.ts → handle.ts + relay.ts 重构(audit: 全仓冗余审计与重构计划——server.ts 解体、客户端矩阵去重、死代码、AGENTS.md 模块图腐化 #1440 P2 cut3/cut4):纯抽取(server.ts −3662 / 两新模块 +3642),公共 API 保留;完整性由先前已审 PR + CI typecheck/test + e2e(codex/pi/dsh 全管道)兜底。

缓存 / 重试 / 游标影响

  • 前缀缓存:lean 摘要确定性(无时间戳)保字节稳定;head system 消息不变 → 不破坏。
  • 重试策略:preflight 上游错误分类(瞬态 / 形状拒绝 / 传输)逻辑保持;runaway-guard 仅在新检出时 abort,不改既有重试语义。
  • 增量游标 / 持久化:deadRefs 追加式可选字段,persist.ts 以 parsed.deadRefs ?? fresh.* 水合,向后兼容。

结构化八问

  1. 是什么问题:发版 v0.1.189,需对上一版本以来全部变更做区间回归审计并给合并判定(非单一 bug)。
  2. 什么原因导致的:不适用(发版聚合);窗口内各 fix 均针对已定位根因([dsh] 原生压缩拦截门的 SHAPE 信号(≤4 条消息)在 dsh-compaction-basic 0.2.0-rc.2 上恒假 → 压缩静默落地 → 1510 条 fold 锚点永久失配,连刷 166 条 no-anchor-match 且面板仍报 netSaved 355.9M #2193 压缩守卫静默放行致不可逆丢失、DSH 分叉会话后触发大量 preflight overflow compress #2383 dsh fork 回放不可收敛、DSH插件按「全局默认模型」上报上下文窗口,导致会话真实模型匹配不到窗口、回落默认200K #2381 跨模型窗口污染等)。
  3. 影响范围与严重程度:全体 bili 用户面;无"完全无法使用"项;唯一默认值变化(snapshotCapBytes 16→100MiB)在特定条件(dsh 大 fork 回放)下改善可用性,代价是资源驻留上限提高,已有界(fail-closed)。
  4. 怎么修复的:见上「重大行为变更清单」逐条机制说明;核心是根因修复(疏)而非症状掩盖(堵)。
  5. 是否有回归问题:本版本引入回归:无(逐条高危模式已过)——fail-fast 未变吞错;阈值/时序漂移仅 snapshotCapBytes 一处且已披露+owner 签批;输出格式无意外变化;golden wire-contract 未动;version 纪律(kernel/pi-subagents)成立。
  6. 是否破坏缓存:不破坏(见上节)。
  7. 是否改了设计方向:无架构转向;仅在既有边界内新增组件边界(pi-subagents 入仓)与安全机制(runaway-guard / dsh-compaction-guard / dead-ref)。
  8. 是否引入新配置:是——tierNudgeTokens / nudgeModelDecided(默认关)/ nudgeDecisionMaxTokens(默认 200);另 snapshotCapBytes 默认 16→100MiB。迁移:全部可选/缺省即旧行为,无需迁移。

收工判定:建议合并,待 CI 转绿(当前 unstable 仅为运行中)。若 owner 想压低资源驻留,可把 snapshotCapBytes 调回或显式设值——那是产品决策,不构成本次拦截理由。

@ranxianglei

Copy link
Copy Markdown
Owner

Release review — cumulative diff v0.1.188..v0.1.189 (137 commits, 196 files, +22531/−4269)

Reviewed the whole range as one diff, plus focused passes on: server extraction (handle/relay), fork adoption (#2399/#2408/#2426), dsh native-compaction rebase (#2372/#2432), kernel 0.0.107→0.0.109, and the dsh auto-update surfaces.

Local verification on 64443f9: build + typecheck clean; update suites 40/40 (update-dsh-self-refresh, update-dsh-converge, update-desktop-inplace, update-tarball, update-integrity, update-host-guard); e2e-native-dsh 2/2; release-canary e2e 1/1 (verdaccio dual-version N-1/N, live proxy self-flip, dsh profile convergence N-2→N, restart, ACP smoke). CI green on ubuntu-22/windows-22/windows-24. (A local full npm test run shows 33 ✖ confined to dsh-native/claude-native suites — all caused by this reviewer's own dev proxy holding port 18787; identical tree passes in CI.)

Verdict: ✅ mergeable. The PR body is a version bump; everything below is a forward-fix item on new in-range features — none regress existing behavior. Fixes incoming on a follow-up branch.

Major (verified in-source, follow-ups recommended)

  1. [bug] DSH 桌面端 0.1.188:宿主原生压缩落地摧毁折叠基底 → 同一区间永久不可锚定、compress 连片失败并熔断(compaction-basic auto:false 仍无效) #2432 rebase wired into one of three dsh wires — carriesDshLocalCompactionSummary has exactly one call site: src/server/prepare-openai.ts:146 (chat/completions). The equivalent slot in src/server/prepare-responses.ts:212 is codex-gated (isCodexClient(req.headers)), yet CONFIGURATION.md's dsh.allowDshCompaction row says responses is "the lane dsh desktop's compaction actually rides" (bili 插件模式下 allowDshCompaction 在 responses 线路上完全失效 —— DSH 原生压缩落地、折叠基底被摧毁、compress 连片失败 #2360). A dsh desktop session whose native compaction lands without transiting bili replays [checkpoint, tail…] on /v1/responses with no detector → the pre-[bug] DSH 桌面端 0.1.188:宿主原生压缩落地摧毁折叠基底 → 同一区间永久不可锚定、compress 连片失败并熔断(compaction-basic auto:false 仍无效) #2432 death spiral. Tests only exercise the openai lane (tests/issue2432-dsh-local-compaction.test.ts is all /v1/chat/completions; the e2e headless profile pins api: openai-completions). Fix: wire the guard into prepare-responses (+ anthropic lane if dsh traffic rides it) and add a responses-lane test.

  2. Breaker recovery instructions contradict across surfaces — src/stream.ts:259 (substrateDestructionPauseParagraph) tells the model: "exactly ONE recovery step: run acp_status once, then compress ONLY a range it currently reports as compressible", but src/acp-status.ts:165 suppresses the Compressible-ranges list whenever the breaker is armed ("Do not attempt to compress now"), and the substrateInvalid branch says "start a fresh conversation". The promised recovery path is unreachable while the breaker the receipt itself just armed is active — recreating the bili 插件模式下 allowDshCompaction 在 responses 线路上完全失效 —— DSH 原生压缩落地、折叠基底被摧毁、compress 连片失败 #2360 two-orders failure mode. Fix: exempt the substrate-destruction cause from the suppression (or reword the receipt).

  3. runaway-guard tool-xml lane trips uncorroborated — src/runaway-guard.ts:114-117 aborts on raw toolXml >= 300 matches with no corroborator (the acp lane requires monoRun ≥ 50 OR zeroFraction ≥ 0.9). A legitimate tool call writing a ~150-element XML document (~300 open/close tags) gets cut mid-stream — violates [bug] 插件透传会剥掉工具调用参数里的 render tag(arguments 流挂了 tag-echo 过滤器) #1039 ("tool args are user intent"). Fix: add a corroborator (e.g. tag-shape diversity collapse or prose-fraction).

Minor / nits

Verified clean

@ranxianglei

Copy link
Copy Markdown
Owner

Forward-fix PR for the review findings above: #2460 (M1 dsh responses-lane rebase, M2 breaker-aware acp_status recovery path, M3 tool-xml gap-average corroborator, + relay URL-masking and bootSmoke windowsHide nits). All targeted suites green locally (tsc, 38/38 compaction, e2e-native-dsh 2/2, update 12/12, responses-lane neighbors 62/62).

@ranxianglei

Copy link
Copy Markdown
Owner

🤖 Powered by ework · qwen3.8-27b

PR #2460 审查结论(前向修复)

先说明:收到你的评审后我正在本地实现同样的修复(分支 2026-10-09_release-v0.1.189-forward-fixes,仅改了 3 个 src 文件,未 push)。见你已开 #2460,为避免并行重复 PR,我已废弃并删除该本地分支,改为独立复核 #2460。以下为我逐条读 diff + 关键代码交叉验证后的结论。

总体:✅ 可合(待 CI 转绿)。 PR 基于最新 origin/master(无需 rebase,领先 4 commit / 8 文件 +518 −29,含 3 个测试文件)。3 个 Major + 2 个 nit 全部正确,各自只在其目标窄窗口生效,无回归。

逐条核验

结构化八问

  1. 是什么问题:v0.1.189 发版评审发现的 3 个 Major 前向修复 + 2 个 nit(非单一 bug)。
  2. 什么原因导致:M1 dsh 桌面走 responses 通道时无检测器;M2 breaker 激活期 acp_status 仍抑制 ranges 使承诺的恢复路径不可达;M3 tool-xml 仅凭裸计数≥300 abort 误伤合法大 XML 工具参数;两 nit 为日志主机名泄漏 / Windows 控制台闪烁。
  3. 影响范围与严重程度:全体 bili 用户面;无完全无法使用项。M1/M2 为特定条件下的正确性缺陷,M3 为特定条件下(合法大 XML 参数)的数据损坏风险(严重但触发面窄),nit 属体验/可观测性。
  4. 怎么修复:见上逐条(机制层)。核心是根因修复:补齐缺失通道的检测、让 acp_status 与 breaker receipt 语义对齐、给 runaway-guard 补上 acp 通道同等的双信号佐证。
  5. 是否有回归:无。M2 豁免窗口与 stream.ts:282 发射条件精确对齐(已验证);acp_status 文案变化仅在其目标窗口出现、向后兼容;M3 只收紧 abort(更少误报)、不动 acp 通道;M1 仅对 dsh 生效。golden wire-contract / version / kernel / persistence 均未触碰。
  6. 是否破坏缓存:不破坏(重基/摘要路径未变,M2 仅改「是否列 ranges」的判定时机)。
  7. 是否改设计方向:无架构转向,均为既有机制补全。
  8. 是否引入新配置:不涉及(无新 env/config/默认值;TOOL_XML_GAP_AVG_BYTES=64 为内部阈值,非配置面)。

#2460 未覆盖、建议单独跟踪(均来自你这轮评审的 Minor/nits)

这三者分属不同机制,按「一 issue 一机制」宜分开。建议:#2321 我可开一个小而独立的 follow-up PR(精确、安全相关、~3 行 header + 测试);#2394 与 fork 簇立 tracking issue 或并入后续。等你一句话,我就动手;在此之前不动它们,以免又和你在做的东西撞车。

收工判定:#2460 建议合并(待 CI 绿)。我的重复本地工作已清理,无并行 PR 冲突。

@ranxianglei

Copy link
Copy Markdown
Owner

🤖 Powered by ework · qwen3.8-27b

状态再确认(此条与你之前的发版评审同内容,已处理;同步现状)

当前工作区干净,无并行 PR。等你对这 3 项的决定。

@ranxianglei

Copy link
Copy Markdown
Owner

🤖 Powered by ework · qwen3.8-27b

#2460 CI 现已全绿(独立复核)

复核你新推的 head 4243e284:26/26 check-runs 全部 success,之前的唯一红项 unused-exports 已消除。

那个失败我本地独立复现过:M3 引入的 src/runaway-guard.ts: TOOL_XML_GAP_AVG_BYTES 被 export const 声明但仅本文件使用(gate 判为 INTERNAL_ONLY)。你的跟进 commit 4243e284c(drop redundant export)正是正确修法——去掉 export 让它成模块私有常量,而不是加 waiver(它是内部调参阈值,没有公共 API 角色)。我在当前 head 重跑 node scripts/check-unused-exports.mjs:clean(exit 0)。

→ 我之前「#2460 可合(待 CI 转绿)」的保留项现已解除:代码层面 + CI 均通过,#2460 可合。

仍等你一句话的 3 项(#2460 未覆盖):

建议不变:#2321 开独立小 PR(精确、~3 行 header + 测试);后两者立 tracking item。你拍板我就动手,在此之前不擅自开工。当前工作区干净,无并行改动。

ranxianglei pushed a commit that referenced this pull request Oct 9, 2026
The armed/pre-armed suppression of the Compressible-ranges list is gone.
The table is live by construction — buildCompressibleRanges (kernel/src/
recommend.ts) derives refs from the CURRENT resent view only, after
screening covered/media/protected/withdrawn messages — so an advertised
range always anchors, and hiding it behind failure-cause policy only
produced contradictions:

- armed on substrate-destruction, the receipt orders "run acp_status
  once, then compress ONLY a range it currently reports" — suppression
  made that promised recovery unreachable (#2451 review M2, the #2360
  two-orders shape);
- armed/pre-armed on stale-ref, the failed refs were the model's stale
  INPUT, not the table — suppression hid the very remedy.

acp_status now reports the table unconditionally and carries no order of
its own: substrate-destruction attribution keeps the receipt's recovery
line; every other cause mirrors the receipt's STOP order ("do not
attempt to compress now; continue the task"). Anti-loop pressure stays
where it belongs — in the receipts.

tests: armed (unknown cause / stale-ref / substrate) and pre-armed
(n=1/2) all assert the table stays up, the matching annotation renders,
and no SUPPRESSED claim appears anywhere.
ranxianglei pushed a commit that referenced this pull request Oct 9, 2026
- relay.ts upstream debug log now routes through maskUrlForLog (the
  import already existed).
- update.ts bootSmoke spawn gains windowsHide — the only callsite the
  #2441 sweep missed (console flash in GUI hosts during the #1575
  desktop in-place update).
ranxianglei added a commit that referenced this pull request Oct 9, 2026
fix(#2451): address review findings M1–M3 + two nits
LoveDoLove pushed a commit to LoveDoLove-Forked-Projects/billion-context that referenced this pull request Oct 9, 2026
…ses lane too

The ranxianglei#2432 dsh local-compaction rebase landed on the openai lane only,
while CONFIGURATION.md names responses "the lane dsh desktop's
compaction actually rides" (ranxianglei#2360). A dsh-bound session replaying
[checkpoint summary, retained tail…] on this wire kept the pre-ranxianglei#2432
death spiral: partially-alive blocks, self-destructing fold anchors,
every later compress failing to anchor (ranxianglei#2451 review M1).

prepare-responses.ts now runs the same detector as prepare-openai.ts:
dsh-bound session (metadata.pluginAgent === "dsh") + checkpoint framing
in a resent message (carriesDshLocalCompactionSummary) + decimated fold
coverage (missing >= DSH_LOCAL_COMPACTION_MIN_MISSING and >= half the
covered set) -> markNativeCompactionBoundary + reconcile back-to-back,
re-seeding refs onto the compacted view in the SAME turn. The codex
detector (ranxianglei#2372) is preserved verbatim on its own lane branch; decimated
coverage without either producer's framing stays on the churn paths.

Folds in the new e2e are driven through POST /__bili/plugin/tool —
plugin mode suppresses the compress loop, so the model-fold fixture
from the codex tests cannot drive a dsh-bound session. Negatives pin:
intact history with framing (paste analog), a session never dsh-bound,
and foreign (codex) framing on a dsh-bound session.
@ranxianglei
ranxianglei merged commit 4d5dab9 into master Oct 9, 2026
37 checks passed
@ranxianglei
ranxianglei deleted the 2026-10-09_release-v0.1.189 branch October 15, 2026 05:32
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