Skip to content

release v0.1.180 - #1910

Merged
ranxianglei merged 2 commits into
masterfrom
2026-10-02_release-v0.1.180
Oct 2, 2026
Merged

ranxianglei merged 2 commits into
masterfrom
2026-10-02_release-v0.1.180

Conversation

@github-actions

@github-actions github-actions Bot commented Oct 2, 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.179

@github-actions

github-actions Bot commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor Author

📦 Built Package Artifact

Branch: 2026-10-02_release-v0.1.180 (45d296a)

Option A — Install this exact build (recommended)

npm install -g billion-context@0.0.1902-pr.1910.647d04b

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

Install instructions are refreshed on each push.

@ranxianglei

Copy link
Copy Markdown
Owner

🤖 Powered by ework · qwen3.8-27b

[bot] 🏷 收到。这是 one-click release 的 fallback PR(直推 master 被分支保护拦下),按规范进入发版本审计:核对 PR 本身 diff(应仅版本行)+ v0.1.179→v0.1.180 全窗口回归审阅 + CI 状态。先报进度,完整结论随后补一条结构化回复。

…al window state

The docs-refresh commit (d45d00c) landed mid-window, before the acp-kernel
pin bump to 0.0.100 and the later test additions — both facts went stale in
the same window this release ships. Review of #1910.
@ranxianglei

Copy link
Copy Markdown
Owner

🤖 Powered by ework · qwen3.8-27b

[bot] 🏷 ## Review 结论:release v0.1.180 — 可合(CI 全绿 + 版本区间回归审计通过)

按发版本类 PR 规则(②b),审查窗口从 PR 自身 diff 扩到 v0.1.179..head 全部 42 个 commit(51 文件,+4090/−242),所有分支/提交的变更合并为一个整体综合审阅。PR 自身 diff 仅 release v0.1.180 一个 commit、只改版本行,符合 one-version-one-commit 纪律;非 merge commit 清单与正文 Changes-since 逐项一致。

结构化七问:

  1. 是什么问题:不是缺陷,是 one-click workflow 被 master 分支保护挡住后的自动 fallback release PR——合并即触发 release.yml 发布 v0.1.180。审查对象是窗口内全部变更。

  2. 什么原因导致的:不涉及(release 流程)。窗口内各修案的根因均在各自 issue([follow-up #1483] Advisory visibility in native/plugin lanes: all three surfaces are effectively invisible #1577/advisory 回滚形态公告:target↔latest 振荡(autoUpdate=ON)与回滚成功后无持久重启提示 #1588 advisory 可见性与回滚形态、compat.dropFields:按 provider 删除客户端固定发送的字段(SenseNova Responses 严格 schema 400) #1757 strict-schema 上游拒绝客户端固定字段、[config] misplaced/unknown top-level keys are silently ignored — root-level promptPack does nothing without any warning #1815 未知配置键静默丢弃、任何一轮没有拿到 usage 报告的请求,都会把上下文分母放大 12–20×(nudge 读到 >1000% usage、假 EMERGENCY、基线冻结数分钟) #1839 estimate-grade 值污染 context sizing 分母产生 ghost、fork-adoption SUPPORTED 只有 {openai, anthropic}:responses(codex)/google 线换 id resume 仍不继承 refs/blocks(#1834 残留) #1853 responses/google wire resume-fork 无继承、bug: Responses degenerate retry overlooks custom tool calls and drops completed-attempt usage #1862 Responses degenerate retry 误判 custom_tool_call 轮次为空轮、dsh 渠道把桌面应用独占的 profiles/desktop 当普通 profile 驱动 —— 第二写者冲突 #1575 dsh desktop profile 副本冻结、pi lane 同族 dsh plugin-market installs never auto-update: the refresh chain's only trigger is a global bili self-update #1196)。

  3. 怎么修复的(机制层面):

    • Advisory:新可见性面(acp_status//acp panel/doctor/web)共享 describeAdvisory;回滚形态新增候选拦截(advisoryBlocksVersion,fail-open)+ 重启横幅持久化到 running version 离开 affected range。
    • compat.dropFields:opt-in 结构删键,在最终转发边界统一施加(所有 verbatim early branch + side requests + compress-retry wireTransform),no-match = 原字节透传(不 re-stringify),字符串叶子永不触碰。
    • 任何一轮没有拿到 usage 报告的请求,都会把上下文分母放大 12–20×(nudge 读到 >1000% usage、假 EMERGENCY、基线冻结数分钟) #1839:provenance 重新分层——overflow arming 从 "usage" 降级为 "overflow-arm";rescue-grade 消费者(effectiveTokenCount fast path、preflight floor/evidence)显式接受,billing-grade 消费者(budget.ts baseline、thinking-mass 归因)继续排除;分母改为直接用 lastUsageGradeTokens 锚点而非对重发的完整 inbound history 重新估算(kill the ghost at the reader);preflight 自相矛盾态改为 forward-once 仲裁。
    • Updater:pi lane 由 proxy 经 pi 自己的通道(pi update --extension npm:billion-context,仅未 pin 条目)自刷新;dsh desktop profile bili in-place 拥有(owner 决定,豁免 native模式下自动更新问题需要解决 #991);pnpm store junction 安全化(位移 link 而非跟随)。
    • fork-adoption 覆盖全部四条 wire(responses/google 镜像 prepare* 的 mutation 顺序保 id parity);custom_tool_call 计入可执行输出;被替换 attempt 的 usage 立即入账。
  4. 是否回归问题:本版本引入回归:无。逐项审过的既有行为及结论:

    • Wire fidelity:默认(未配置)路径逐条验证 byte-exact——dropped===0 返回原始 Buffer,tool arguments/字符串叶子不受影响,billion-context ACP kernel 改写 body 导致 ZCode (zcode.z.ai) 405/3012 #661 fingerprinting 契约完整;WC-013 负向控制测试钉死 opt-in 默认(未配置时字段原样到达 strict upstream 并中继其 400)。
    • Provenance 消费者全清点(全仓 grep 每个 lastInputTokensSource 读取点):rescue-grade 显式接受 overflow-arm,billing-grade 显式排除,无静默漂移。唯一语义漂移点在 budget.ts(未改文件):overflow arm 不再喂 billing baseline——这是重新分层的有意后果,最坏情形是 overflow 拒绝后多一次 upstream round-trip,有 preflight(现已 arm-aware)兜底,判为可接受。
    • Updater 正常 npm-global 流程(下载/sha512 校验/staged extract/cp/backup/rollback/cross-process lock/CHECK_INTERVAL_MS)除 symlink/junction 分支外未动;junction 位移有专用测试 + windows CI 矩阵覆盖(绿)。
    • 两种压缩模式:compat-drop 在转发边界施加,plugin mode 下只影响客户端发送字段(与 compat.roles billion-context: 400 Bad Request when codex sends role: "developer" messages — request a request-body compat transform hook #552 同族);fork-adoption 的 id parity 论证对 plugin-mode sysdev 标记成立(marked/hoisted items 两种模式下都不产生 core msg)。
    • 高危模式逐项过:fail-fast→forward-once(preflight 自相矛盾态)是有意的自相矛盾修复,PR #489 后续: 默认图片计费 b64/4 在像素 tile 计费上游(官方 Anthropic/OpenAI)会硬 502 误杀多模态会话 #496 house pattern,单次 forward 有界;其余错误处理均未从 fail-fast 变吞错(advisory 新门的 fail-open 方向正确——误拦升级比漏拦危险)。

    重大行为变更清单(旧→新,均为有意且已披露):
    a. overflow arming provenance:"usage" → "overflow-arm"(rescue 效果不变,退出 billing-grade 消费者);
    b. nudge/context 分母:有真实 usage 锚点时,从「对 inbound msgs 重新估算」→「lastUsageGradeTokens 本身」(两次上报间的增长由 preflight 兜底);
    c. preflight floor/evidence 现接受 overflow-arm(更早折叠,修 使用pi 压缩后就提示prompt is too long #1195/context window problem continues #987);
    d. preflight「own view fits 但 rebuild 超窗」态:fail-fast 502 → forward-once 仲裁;
    e. [acp-compress-obs] 不可能比率改为 "baseline untrustworthy" 行(日志格式变化);
    f. advisory 强制安装后横幅持久化到重启(原先同周期清除),独立 restart-hint warnOnce key;
    g. 正常自更新循环跳过新鲜 advisory affected range 内的候选(新门,fail-open);
    h. 未知顶层配置键产生 warn 日志(原先静默丢弃),KNOWN_TOP_LEVEL_KEYS 已验证与 FileConfig 34 键双向零差集;
    i. pi lane:proxy 定期检查时驱动 pi update --extension npm:billion-context(仅未 pin)——lane 所有权转移,符合 dsh plugin-market installs never auto-update: the refresh chain's only trigger is a global bili self-update #1196 契约;
    j. dsh desktop profile:bili in-place 写入(owner 批准的 native模式下自动更新问题需要解决 #991 例外);
    k. retry usage ledger:被替换 attempt 的 usage 现在入账(内部 ledger 数字在重试轮次上升;client-facing completion 仍只带最终 attempt);
    l. /__bili/stats 与 web session data 增加 contextTokensSource(additive API);
    m. acp_status 活跃 advisory 时多一行输出(additive)。

  5. 是否破坏缓存:否。前缀缓存稳定性逻辑(systemToUser/acp_summary carrier)未动;compat-drop 默认 byte-exact 不引入新的缓存失效面;任何一轮没有拿到 usage 报告的请求,都会把上下文分母放大 12–20×(nudge 读到 >1000% usage、假 EMERGENCY、基线冻结数分钟) #1839 的修改实际减少了 ghost 导致的假折叠(该事故曾使 ~129K token 缓存前缀失效)。advisory deferral 不触及请求管线。

  6. 是否改了设计方向:无架构转向。两处 lane 所有权调整都在既有 Install-Lane & Update-Ownership Contract(dsh plugin-market installs never auto-update: the refresh chain's only trigger is a global bili self-update #1196)框架内并已在 AGENTS.md/代码注释中记录;provenance 分层扩展了既有 [Question] 非白名单上游(如 DeepSeek)图片按 b64/4 估算,实测高估约 100×;且该估算被写回 lastInputTokens 并自愈成 confirmed 窗口,使 #496 逃生门永久失效 #857 scheme 而非替换。

  7. 是否引入新配置:是——compat.dropFields(global + per-provider,dot-path 字符串数组,additive union,opt-in,默认空 = byte-exact)。CONFIGURATION.md en+zh 双语镜像完整,含 canonical SenseNova 示例;owner-decided shape A 记录于 src/compat-drop.ts 头部(compat.dropFields:按 provider 删除客户端固定发送的字段(SenseNova Responses 严格 schema 400) #1757)。无新 env var / CLI flag,纯 additive,无需迁移。

验证证据:

  • CI 在 head dd7631c 全绿:typecheck+test 矩阵 ubuntu/windows × node 22/24、e2e codex(真实 CLI)、hermetic registry e2e ubuntu+windows(含新 advisory-rollback drill)、real pi/opencode/dsh/codex 四 lane、build-artifact、version-guard。
  • 跨仓门禁:acp-kernel@0.0.100 已确认 live on npm;billion-context npm latest = 0.1.179 = master 版本,drift guard 前提成立。
  • Wire-contract ledger([CI/testing] wire-contract anti-regression system: validation-parity fake upstreams + golden schema snapshots + constraint ledger + staged 4-protocol x 3-mode client smoke matrix #1304)合规:WC-013 新增带 provenance(SenseNova gateway 实测 2026-09-30 + OpenAI 参考),enforcement 在 validateResponsesBody 且先于 tools early-return,正负双控制;ledger 只增未减。
  • 每个主要修案均有专属回归测试(compat-drop、issue1815、issue1839-ghost-denominator[真实 server + 内容路由 503 裁决,断言有牙]、resume-adoption-wires、update-desktop-inplace、update-pi-self-refresh、e2e-advisory-rollback)。

顺手小修(独立标注 commit):AGENTS.md 两处窗口内事实过期——kernel pin 写 0.0.99(本分支实际 pin 0.0.100)、test count 写 385(实际 .test.ts 399)。原因是 docs-refresh commit(d45d00c)落在窗口中段,早于后续 pin bump 和测试新增。已以 docs(AGENTS): sync kernel pin (0.0.100) and test count (399) 单独提交推到 release 分支(head 现为 45d296aa,纯文档两行,CI 在新 head 上重跑中,预期绿)。

判定:可合。 合并后 CI 自动发布 v0.1.180 并打 tag。合并操作保留给人类。

@ranxianglei
ranxianglei merged commit 2acbeb5 into master Oct 2, 2026
23 of 24 checks passed
ranxianglei added a commit that referenced this pull request Oct 2, 2026
test: rmrf exponential backoff + sweep remaining bare recursive rmSync (#1646 follow-up, #1910)
antclt pushed a commit to antclt/billion-context that referenced this pull request Oct 2, 2026
…e rmSync (ranxianglei#1646 follow-up, ranxianglei#1910)

The ubuntu-22 release-gate leg of ranxianglei#1910 hit the ranxianglei#1646 ENOTEMPTY teardown
race again: side-request-isolation ranxianglei#1129's finally-block rmrf exhausted the
flat 10x50ms retry budget while a late debounced session flush (5ms debounce
recreating <tmp>/<provider>/) kept the tree alive past every retry under
full-suite load. All of the test's assertions had already passed — the gate
was killed by its own cleanup.

- tmp-rm.ts: escalate to a bounded exponential-backoff loop (25->1600ms,
  ~3.2s total, only paid on an actual race) around the same transient-error
  set Node's rimraf retries (ENOTEMPTY/EBUSY/EPERM/EACCES/EMFILE). Sync
  sleep via Atomics.wait — legal on any thread, and teardown wants the loop
  blocked, not interleaved.
- tests/tmp-rm.test.ts: pin the contract — rmrf must outlive a writer that
  recreates the tree every 10ms for ~250ms, force swallows ENOENT,
  non-transient errors still throw.
- sweep the 36 leftover bare rmSync(..., { recursive: true, force: true })
  calls across 11 suites onto rmrf; codex-overlay-env's local rmrf wrapper
  is replaced by the shared import.

Local: tmp-rm 3/3, launcher+fix-decompress-tofile 261/261, side-request-
isolation green, the other swept suites green; dsh-settings-ui (5) and
dsh-native fail identically on clean master locally (stale dist — CI legs
green); typecheck clean.

Refs ranxianglei#1646, ranxianglei#1194 (same signature on an earlier release gate).
@github-actions github-actions Bot mentioned this pull request Oct 3, 2026
ranxianglei pushed a commit that referenced this pull request Oct 12, 2026
… class)

The new guard defined its own bare-rmSync rmrf while all 143 sibling suites
import tests/tmp-rm.ts, whose retry ladder exists because loaded CI runners
(#1646/#1910) and Windows teardown under c=4 (#2908) make bare deletes flaky.
Aligns the file with repo convention; no behavior change.
antclt pushed a commit to antclt/billion-context that referenced this pull request Oct 14, 2026
…ei#3147)

A: fork-nudge-deadzone lane proof read bili.log once via readFileSync right
   after the response returned, racing the logger's async append stream
   (src/logger.ts createWriteStream) — under a loaded Windows runner the nudge
   line had not flushed yet and the assertion false-red'd. Bounded poll (5s,
   50ms ticks) until the session's nudge line lands; write-order keeps the
   negative assertion sound. Teeth unchanged (timeout fails the same way).
B: golden-storage driveWire scratch moved out of os.tmpdir() into the
   gitignored workspace-local tmp/golden-drive/ — on Windows hosted runners
   %TEMP% is an AV/indexer hot path shared by all c=4 legs, and external
   locks there repeatedly outlasted the ~9.8s rmrf ladder (ranxianglei#2908 family).
   Teardown cleanup is now best-effort (warn + inert leftover, swept >6h old
   on next import) since every assertion precedes it. Root-cause part: the
   tee logger (configured unconditionally by startServer) held a file stream
   into the deleted tree — any later log line made getStream() reopen the
   orphaned path and resurrect the tree mid-rmrf (ranxianglei#1646/ranxianglei#1910 race class);
   closeLogger()+configureLogger("off")+store.cancelAll() now run before
   rmrf so no in-process writer can recreate it.
C: preflight-hold asserted an absolute wall-clock bound (tHeaderMs < SLOW_MS
   = 1500ms) — a loaded runner stalls the event loop and eats the fixed
   margin while the behavior stays correct (observed 1724ms). Both stream
   and non-stream legs now assert the relative invariant the message always
   claimed: headers arrived BEFORE the mock's actual summarization completion
   (timestamped in-mock, same clock). A ranxianglei#568 regression (no early commit)
   lands headers at stream end, i.e. after summarization finished — still
   caught. Lower bound tEndMs >= SLOW_MS untouched.

Targeted local: fork-nudge-deadzone 3/3, preflight-hold 4/4,
storage-engine-proofs 12/12, golden-storage-render 5/5, tmp-rm 6/6,
typecheck clean. Full-suite verdict: remote CI.
@ranxianglei
ranxianglei deleted the 2026-10-02_release-v0.1.180 branch October 15, 2026 05:32
ranxianglei pushed a commit that referenced this pull request Oct 26, 2026
…the Windows AV-lock race at file level

Two consecutive CI runs (windows-22) show the SUBTEST green (3.4s) with the
FILE marked red: the after() hook's bare rmSync threw on the transient
EBUSY/EPERM that tests/tmp-rm.ts exists to absorb (#1646/#1910/#2908 ladder).
Same class as the plugin-fork bounded-wait fixes in the #4599 sweep.
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