Skip to content

[PR] batch-2: 4 held Afloat16 fixes (2 as-is, 2 with review-patch commits) - #7101

Merged
ranxianglei merged 7 commits into
masterfrom
batch/afloat16-2026-11-18-b2
Nov 18, 2026
Merged

ranxianglei merged 7 commits into
masterfrom
batch/afloat16-2026-11-18-b2

Conversation

@ranxianglei

Copy link
Copy Markdown
Owner

batch-2: Afloat16 评审保留的 4 个修复(2 个原样 + 2 个原版带评审补丁)

接 #7074(已合并的 20 个小修复),把评审时保留待讨论的 4 个 PR 收进来。#7038 按讨论打回,不在此列。

每个修复是干什么的

原样收(评审通过,Afloat 原始 commit 未动)

PR Issue 干什么
#7004 #7003 配了上游 CA(network.caFile/NODE_EXTRA_CA_CERTS)后,合并信任集的底座原来只用 Node 内置 Mozilla 包,不含系统 CA / 程序注入的 CA——undici 的 connect.ca 是替换语义,配完 caFile 后其他信任源反而全失效。改成以 Node 实际生效的信任集(22.15+ 的 tls.getCACertificates("default"),旧 Node 回退内置包)为底座再叠加,配与不配两条路径的信任一致。
#6845 #6842 Google 的普通文本 part 也可能带 thoughtSignature(逐字节校验)。原来会剥这段文本里的 ACP 标签 → 客户端回传验签失败 → 会话 400 断。三层(压缩循环 / 非流式 JSON / 客户端流式)统一"带签名的 part 原样放行",与 thought part 既有裁决(#1960)一致。两个边角已在 #6845 评审记录在案:签名 chunk 含 ACP 垃圾会原样漏给客户端(被迫接受);签名晚于文本 chunk 到达时该 turn 最坏一次显式 400(代理层不可修,另行跟进)。

原版 + 评审补丁(每 PR 2 个 commit:Afloat 原版 + 我 1 个补丁 commit)

PR Issue 原版干什么 评审发现 补丁
#7022 #7019 tunnel 自检改为覆盖整个 127/8 + ::1(原来只枚举 127.0.0.x 和接口 IP) 只改了 localMachineIps() 两个消费方之一:selfAddressedLocalPath(绝对形式自请求的本地路由)没跟上 → http://127.0.0.5:selfport/... 这类未配置别名从"本地自服务"变成误判 403 src/server.ts 的 mine 判定加 classifyIp(host)==="loopback" + 2 条回归测试(不修红/修了绿)
#7026 #7025 嵌入式 server 反复启停时进程级信号处理器重复安装(install/remove 幂等化 + 重新 listening 时重装) 移除时机错:close 在"监听器停止接收新连接"时触发,早于会话 flush(finishDrain,可数秒)——此刻处理器已被移除,flush 窗口里第二次 Ctrl+C 无人处理,进程直接死掉、压缩状态没 flush 完 removeProcessHandlers 在 shuttingDown 期间跳过移除(进程反正要 exit(0),handler 留着正合适;嵌入式 server 未走 shutdown 的 close 路径如端口阶梯重试仍照常清理)+ 1 条回归测试(不修红/修了绿)

著作权

验证

  • typecheck / build 通过
  • 4 个修复的相关测试 + 相邻 server 生命周期测试 82/82 通过(含 2 条新回归测试的红/绿验证)
  • CI full(ci:full 标签触发)

合并后

#6845 #7004 #7022 #7026 可按 superseded 关闭(后两个的完整内容 = 本分支的"原版 + 补丁",合本 PR 即收全)。

Fixes #6842
Fixes #7003
Fixes #7019
Fixes #7025

Afloat16 and others added 7 commits November 18, 2026 09:46
…ocalPath

The tunnel-side fix stops enumerating 127.0.0.x in localMachineIps()
(classifyIp covers the range now), but selfAddressedLocalPath still
relies on the interface set — an absolute-form self request via an
unconfigured alias such as 127.0.0.5:selfport would fall through to
tunnel classification and 403 instead of being served locally.

(cherry-pick pending: proposed fix for PR #7022)

(cherry picked from commit 9f594c159dfb824d2430c91fbca951bcb689c1a1)
close fires when the listener stops accepting, i.e. before the session
flush in finishDrain. Removing the handlers there left a second Ctrl+C
during the flush window unhandled — the process died with unflushed
compression state. Skip removal while shuttingDown; a closed embedded
server that never shut down (port-ladder retry) still cleans up.

(cherry-pick pending: proposed fix for PR #7026)

(cherry picked from commit 6b7865d847e7da14817b6bc5e563c9fd1f630fde)
@ranxianglei ranxianglei added the ci:full Run the FULL CI matrix (all e2e lanes + 12-leg test matrix) on this PR label Nov 18, 2026
@github-actions

Copy link
Copy Markdown
Contributor

📦 Built Package Artifact

Branch: batch/afloat16-2026-11-18-b2 (894835a)

Latest build — install this exact version

npm install -g billion-context@0.0.10695-pr.7101.bebf047

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
894835a billion-context@0.0.10695-pr.7101.bebf047 build

Download artifact

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

Install instructions are refreshed on each push.

@ranxianglei ranxianglei changed the title batch-2: 4 held Afloat16 fixes (2 as-is, 2 with review-patch commits) [PR] batch-2: 4 held Afloat16 fixes (2 as-is, 2 with review-patch commits) Nov 18, 2026
@ranxianglei
ranxianglei merged commit 0e475ce into master Nov 18, 2026
105 of 151 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

📦 Merged Build Published

This merge to master was published as 0.0.1229-master.0e475ce (rolling master tag).

npm install -g billion-context@0.0.1229-master.0e475ce  # 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.

This was referenced Nov 18, 2026
ranxianglei pushed a commit that referenced this pull request Nov 18, 2026
…lict at 0.0.200

Master advanced past the PR base again (batch11 wave11 #6827, lean-compress
receipt #7105, wire-client-sidecars #7083, p1 batch b2/b3, #7087, #7101 ->
kernel 0.0.199, storage-render goldens regenerated for #6775 persisted
fields, 400 files). Content hunks auto-merged (kernel/src/compress.ts,
kernel/src/types.ts, all four storage-render goldens); the only conflicts
were the three kernel version lines, resolved at 0.0.200 = master's 0.0.199
+ this PR's kernel/src change, per the CI-enforced kernel version discipline.

Targeted local verification: tests/golden-storage-render.test.ts 5/5,
tests/storage-state-fields.test.ts 2/2, kernel issue6116/issue3769/
hide-consumed suites 27/27.
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 root-cause

Projects

None yet

2 participants