Skip to content

[PR] Upstream hang on compressed summary no longer silent: added first-byte budget + watchdog/preflight logging (#5904) | 压缩摘要上游卡死不再静默:新增首字节预算+看门狗/预检日志(#5904) - #5917

Merged
ranxianglei merged 5 commits into
masterfrom
fix/issue5904-first-byte-budget
Nov 8, 2026

Conversation

@ranxianglei

@ranxianglei ranxianglei commented Nov 8, 2026 •

Copy link
Copy Markdown
Owner

这是啥问题?

代理向模型发的压缩摘要请求,上游(冷启动的 sglang 中继)接收了请求却永不应答。代理所有现有时长预算都是「流中间」的:12 分钟空闲看门狗只在收到首个字节之后才挂上,所以零字节的卡死会一直静默挂着,直到客户端(gate,300 秒轮次预算)先超时中止——不重试、不报错、日志里一行痕迹都没有。这是发布 gate Lane A 三连红的根因(取证:t2 到达 00:32:36.702,preflight fold 00:32:36.704,之后 300s 零响应、零日志、连接零断开)。

根本原因

  • src/fetch-util.ts 单阶段看门狗:计时器只覆盖「发出→首字节之后」的流中间静默;AbortController 触发时无任何日志。
  • src/preflight.ts requestSummaryBody 每次尝试发出/收到响应均无进度日志,永久失败也不记 error。

如何解决

  1. 两阶段看门狗(src/fetch-util.ts):阶段一(请求发出→fetch resolve,实测 undici 在首个 body 数据时才 resolve)使用独立预算 min(timeoutMs, upstreamFirstByteMs());阶段二重挂到完整空闲预算——保住 Opencode failed to send message with error: upstream stream ended before a completion event; this turn may be incomplete #1706/配置面收敛:移除全部 BILI_*/ACP_* 行为类环境变量,统一迁入 config.json #1714 的保证:长静默预填充/思考永不误杀。
  2. 新旋钮(src/knobs.ts/src/config.ts):BILI_UPSTREAM_FIRST_BYTE_MS / network.upstreamFirstByteMs,默认 = 720000ms(完整空闲预算)——默认行为与现状逐字节一致,只有显式收紧的部署才变(比如 300s prefill 的本地模型部署:不设置就完全不受影响)。文档已进 CONFIGURATION.md / CONFIGURATION.zh-CN.md / website/config-reference/process.yaml(config-surface-guard 绿)。
  3. 日志:看门狗每次触发记 warn(阶段+预算+方法+URL);preflight 每次摘要尝试记 sent/headers/permanent-fail 及耗时。
  4. gate 侧(scripts/release-gate-local.mjs):设 BILI_UPSTREAM_FIRST_BYTE_MS=120000——是本环境观测到的最慢合法首字节(冷 GPU 上 73s)的 1.6 倍。按既有语义,看门狗中止不重试、直接永久失败(src/preflight.ts SummaryTransportError retryable = !aborted):120s 无首字节即以带原因的真实错误结束该轮,gate 快速红且可诊断,而不是静默拖到 300s 客户端中止。

测试

  • 新增 tests/issue5904-upstream-first-byte.test.ts 4 用例全绿:旋钮解析、阶段一卡死快速失败、阶段二慢 chunk 间隙不误杀、显式 timeoutMs 封顶。
  • 回归:fix-551/fix-437/fix-15/fix-78/issue2652/issue3148(27)、external-summary-*(104)、knobs/config(44)全绿;tsc --noEmit 干净。

Fixes #5904

kernel-change: src/fetch-util.ts src/knobs.ts src/config.ts src/preflight.ts

…tchdog/preflight logging

The release-gate Lane A triple-red root cause: an upstream (GPU-restart-cold
sglang via relay) accepted the proxy's compress-summary request and never
answered. Every existing budget was mid-stream: the 12-min idle watchdog only
re-arms AFTER the first body byte, so a zero-byte wedge sat silent until the
client's 300s abort — no retry, no error, no log line.

Three changes, defaults byte-identical to current behavior:

1. src/fetch-util.ts two-phase watchdog: phase 1 (request sent -> fetch
   resolves, empirically around the first body data) gets its own budget
   min(timeoutMs, upstreamFirstByteMs()); phase 2 re-arms to the full idle
   budget, preserving the #1706/#1714 guarantee that long silent prefills/
   thinking phases are never truncated.
2. src/knobs.ts + src/config.ts: BILI_UPSTREAM_FIRST_BYTE_MS /
   network.upstreamFirstByteMs, default = the full 720000ms idle budget
   (opt-in tightening only). Documented in CONFIGURATION(.zh-CN).md +
   website/config-reference/process.yaml (config-surface-guard green).
3. Watchdog + preflight logging: the idle watchdog historically fired
   SILENTLY — now every trip logs phase + budget + method + URL; preflight
   logs each summary attempt sent/headers/permanent-fail with timings, so a
   wedged attempt is visible in bili.log immediately.

scripts/release-gate-local.mjs sets BILI_UPSTREAM_FIRST_BYTE_MS=120000 for
gate lanes: 1.6x the slowest legitimate observed first byte (73s, cold GPU),
two attempts fit the 300s turn so the wedge surfaces as a real error.

Tests: tests/issue5904-upstream-first-byte.test.ts (4 cases: knob resolution,
phase-1 wedge abort, phase-2 slow-gap non-truncation, explicit timeout cap);
regression suites fix-551/fix-437/fix-15/fix-78/issue2652/issue3148 (27),
external-summary-* (104), knobs/config (44) all green; tsc clean.
@github-actions

github-actions Bot commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

📦 Built Package Artifact

Branch: fix/issue5904-first-byte-budget (2078758)

Latest build — install this exact version

npm install -g billion-context@0.0.8606-pr.5917.da76a7a

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
2078758 billion-context@0.0.8606-pr.5917.da76a7a build
987de7c billion-context@0.0.8601-pr.5917.4af370a build
9492212 billion-context@0.0.8584-pr.5917.2a2b77f build
b4a4026 billion-context@0.0.8583-pr.5917.1feeff7 build
e3434a3 billion-context@0.0.8582-pr.5917.2e54382 build

Download artifact

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

Install instructions are refreshed on each push.

…dger entry

docs-sync and lifecycle-ledger-guard reds on #5917: the new
network.upstreamFirstByteMs / BILI_UPSTREAM_FIRST_BYTE_MS knob needs its
generated artifacts (CONFIGURATION tables, website i18n tt.network summary)
regenerated via tools/gen-config-docs.mjs, and the env var registered in
LIFECYCLE.md §2.3 (permanent network-tuning family, default = full idle
budget, release gate sets 120000).
@ranxianglei ranxianglei changed the title 压缩摘要上游卡死不再静默:新增首字节预算+看门狗/预检日志(#5904) [PR] Upstream hang on compressed summary no longer silent: added first-byte budget + watchdog/preflight logging (#5904) | 压缩摘要上游卡死不再静默:新增首字节预算+看门狗/预检日志(#5904) Nov 8, 2026
Review findings on PR #5917 (comments/docs contradicted the code):
- src/config.ts: comment claimed default 120000; actual default is
  UPSTREAM_FIRST_BYTE_MS = UPSTREAM_TIMEOUT_MS = 720000
- src/knobs.ts + src/fetch-util.ts: 'release gate sets 45s' was stale —
  scripts/release-gate-local.mjs sets BILI_UPSTREAM_FIRST_BYTE_MS=120000
- src/knobs.ts: garbled '(120000s-free default ...)' phrasing cleaned up
- CONFIGURATION.md + website/config-reference/process.yaml: duplicated
  phrase 'to the client's abort' (en); regenerated from the seed

Comment/doc-only change; no behavior change.
@ranxianglei ranxianglei added bug Something isn't working p2 scope/wiring labels Nov 8, 2026
@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

查重:不重复 —— 按「首字节预算 / 看门狗静默卡死 / preflight 摘要请求」主题检索了 open+closed issue 与在途 [PR] 清单,无其他同机制条目;本线程即 GitHub #5904 的唯一修复 PR(#5917),无并列第二 PR。

标签:bug + scope/wiring + p2(一句话理由:机制在代理请求管道的 fetch 看门狗,属协议接线面;缺陷仅在「上游接收后永不应答」时触发、有绕行(重启/收紧配置),不到 p1)。

实况(刚验证):PR open,mergeable 无冲突——分支下垫的 4 个非 #5904 提交已随 #5905 进 master,对最新 master 的真实 diff 是干净的 12 文件,不含任何 kernel/ 改动(PR 正文的 kernel-change: 行实际列的是 host 文件,与最终 diff 不符,但 CI kernel-guard 不因此红)。CI:静态门禁全绿(static-gates / docs-sync / unused-exports / lifecycle-ledger-guard / mysql-contract),test 矩阵检查时仍在跑。

审查中发现的小问题已直接修掉(独立标注 commit 9492212,纯注释/文档,零行为变更,已推到 PR 分支):

  1. src/config.ts 注释写「default 120000」——实际默认是 UPSTREAM_FIRST_BYTE_MS = UPSTREAM_TIMEOUT_MS = 720000(生成文档里写的也是 720000);
  2. src/knobs.ts 与 src/fetch-util.ts 注释各有一处「release gate sets 45s」——gate 脚本实际设的是 BILI_UPSTREAM_FIRST_BYTE_MS=120000;
  3. src/knobs.ts 注释有乱码式措辞「(120000s-free default …)」,顺手理顺;
  4. 英文文档 CONFIGURATION.md + process.yaml 种子重复短语「until the client's abort to the client's abort」,改种子后用 gen-config-docs 重新生成。

一个需要你拍板的点(最终八问里展开):旋钮默认值钉死在常量 720000,而不是跟随用户配置的 upstreamTimeoutMs()。仓库自己文档化的场景——本地模型长 prefill 把 BILI_UPSTREAM_TIMEOUT_MS 提到 12 分钟以上——在这类部署上,若上游把响应留到较晚才出字节(fetch 迟迟不 resolve),首字节前的静默容忍度会被阶段一看门狗悄悄压回 720000,与 PR 宣称的「默认行为与现状逐字节一致」矛盾。推荐 A:默认改为跟随 upstreamTimeoutMs()(未设旋钮时阶段一预算恒等于旧单阶段预算,逐配置成立);选项 B 维持常量并显式文档化该行为差。你拍板前我先不动这块语义。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

审查结论 — 结构化八问(PR #5917,head 现为 9492212,含我补的注释/文档修正)

  1. 是什么问题:代理发出的压缩摘要请求,若上游「接收了却永不应答」,会零字节静默挂死——现有全部时长预算只覆盖「流中间」,零字节卡死不重试、不报错、日志零痕迹,直到客户端 300s 轮次预算先中止。这是发布 gate Lane A 三连红的根因。
  2. 什么原因导致的:fetchWithTimeout 单阶段看门狗的计时器只在 body chunk 到达时重挂——一个字节都不来时它只能等满整个预算才触发,且触发时不记任何日志;requestSummaryBody 每次摘要尝试的发出/收到响应也无进度日志 → 卡死在观测面上完全不可见。
  3. 影响范围与严重程度:任何「上游接受请求后永不应答」的部署(冷 sglang 实测复现)都会中招:摘要路径静默挂住、turn 拖到客户端 abort、排查无迹可循。p2——需要特定上游故障条件、有绕行(重启/收紧配置),核心能力其余场景可用;默认部署同样受影响(这正是缺陷本身)。修复后默认行为不变,只有显式收紧的部署获得更快失败+日志。
  4. 怎么修复的:两阶段看门狗——阶段一(发出→fetch resolve)用独立预算 min(显式 timeoutMs, 新旋钮);fetch resolve 瞬间立即重挂到完整空闲预算(阶段二),其后逐 chunk 继续重挂;新旋钮默认 = 完整空闲预算;看门狗每次触发记 warn(阶段+预算+方法+URL);preflight 每次摘要尝试记 sent/headers/permanent-fail+耗时;gate 侧设 120000ms(观测最慢合法首字节 73s 的 1.6 倍,两次尝试 <300s 轮次预算,卡死以真实错误浮出)。
  5. 是否有回归问题:逐项审过既有行为——
  6. 是否破坏缓存:不涉及——前缀缓存/稳定性、重试游标、去重键均未触碰;只改变失败浮现的速度,不动任何 wire 字节。
  7. 是否改了设计方向:不涉及——在既有单看门狗框架内增加独立阶段一预算(显式收紧 opt-in),没有引入新的流中间停滞检测器([0.1.158] MITM 链路上客户端侧疑似闲置连接拆除 RST+上游短周期停滞无看门狗——附一次客户端进程崩溃的完整取证,请评估是否需要加固 #1452 时代 guard 的退役结论保留,注释同步更新)。
  8. 是否引入了新的配置:是——BILI_UPSTREAM_FIRST_BYTE_MS / network.upstreamFirstByteMs,默认 720000(= upstreamTimeoutMs,即现状);未设即现状,无迁移;CONFIGURATION.md en/zh + LIFECYCLE.md + website seed 齐备,config-surface-guard 绿;作者即 owner,配置面纪律满足。

测试有效性:新增 4 例是真测试——断言有牙(阶段一卡死 <5s 快速失败 vs 12 分钟旧预算、旋钮解析含非法值回落、负向不误杀、显式 timeoutMs 封顶),gate 双向纪律齐;作者报告的回归面(fix-551/fix-437/fix-15/fix-78/issue2652/issue3148、external-summary、knobs/config)合理覆盖触碰路径,全量裁决以远程 CI 为准。

小问题已直接修掉(commit 9492212,纯注释/文档,零行为变更):① config.ts 注释 default 写错(120000→实为 720000);② knobs.ts/fetch-util.ts 两处「release gate sets 45s」过期(实为 120000ms);③ knobs.ts 乱码措辞理顺;④ 英文文档重复短语修正并重新生成。

CI 实况(本回复时刻):静态门禁全绿;test 矩阵仍在跑(12 shard in progress,目前零失败)。合并请等其转绿。


🔶 需要决策

  • 背景一句话:新旋钮的默认值钉死在常量 720000,而不是跟随用户配置的 upstreamTimeoutMs()。
  • 待决问题:未设置旋钮时,阶段一预算取什么?
  • 选项:
    • A:默认跟随 upstreamTimeoutMs()——未设时阶段一预算恒等于旧单阶段预算,对所有配置无条件成立,「未设=逐字节一致」名副其实;代价是一行实现+一条测试断言的调整。推荐此项:本 PR 的卖点正是「不误杀、不静默改行为」,而 B 恰好留下一个洞——仓库文档化的本地模型长 prefill 场景(fetch-util.ts 明确写了 >12 分钟 prefill 的存在)把 BILI_UPSTREAM_TIMEOUT_MS 提到 12 分钟以上的部署,在上游把响应字节留到较晚才出时,首字节容忍度会被悄悄压回 720000,与 PR 自述的「默认行为与现状逐字节一致」矛盾。
    • B:维持常量 720000——零代码改动;代价是上述部署的行为差需要显式文档化,否则属于未披露的默认值语义漂移。
  • 不决定的默认行为:按 B 原样可合(CI 转绿后),但建议至少在 CONFIGURATION.md 里写明该行为差。

收工判定:机制审查通过、测试有牙、小问题已修;等你拍板默认语义(推荐 A);选 B 或接受现状则 CI 绿即可合并。

…mTimeoutMs

Review caught a real regression in the first cut: the unset fallback was
pinned to the UPSTREAM_FIRST_BYTE_MS constant (720000), so deployments that
raise BILI_UPSTREAM_TIMEOUT_MS above 12 min (documented: >12-min local-model
prefills) would have had their first-byte budget silently re-capped at 12 min
— breaking this PR's own 'unset = byte-identical' claim for exactly the
#1706/#1714 population it promises to protect.

- src/knobs.ts upstreamFirstByteMs(): fallback is now upstreamTimeoutMs()
  (the resolved idle budget) — unset holds for EVERY configuration.
- src/fetch-util.ts: drop the UPSTREAM_FIRST_BYTE_MS constant (would be an
  unused export); note documents why no default constant exists here.
- tests: the knob-resolution case now also pins BILI_UPSTREAM_TIMEOUT_MS=
  3600000 → first-byte follows 3600000, explicit knob still wins, garbage
  falls back to the RESOLVED budget.
- docs regenerated: default '= upstreamTimeoutMs (resolved; 720000 when
  unset)', desc explains the follow semantics.

Adopts option A from the review decision point.
@ranxianglei

Copy link
Copy Markdown
Owner Author

评审提到的回归确认属实,已修:采纳选项 A(commit 987de7c)。

确认的回归:首版把未设旋钮的回落钉死在常量 720000——把 BILI_UPSTREAM_TIMEOUT_MS 提到 12 分钟以上的部署(文档明载的 >12 分钟本地模型 prefill 场景)首字节预算会被悄悄压回 12 分钟,恰好违背本 PR「未设=逐字节一致」的自述,伤的正是 #1706/#1714 要保护的人群。

修法:

  • src/knobs.ts upstreamFirstByteMs() 回落改为 resolved upstreamTimeoutMs()——未设时对所有配置都等于旧单阶段预算;
  • 删掉 UPSTREAM_FIRST_BYTE_MS 常量(已无人使用,避免 unused-export),src/fetch-util.ts 留注释说明为何此处故意不设默认常量;
  • 测试补钉:BILI_UPSTREAM_TIMEOUT_MS=3600000 时未设首字节旋钮 → 3600000(跟随);显式设 45000 → 45000(显式优先);非法值 → 回落解析后预算;
  • 文档重新生成:default 标注 "= upstreamTimeoutMs (resolved; 720000 when unset)"。

验证:本测试 4/4、fix-551/fix-437/fix-15/config-surface-guard/knobs-precedence 30/30、tsc 干净、lifecycle-ledger OK;等 CI 全绿。

另外回应一下评审第 4 点里沿用的旧说法:看门狗中止按既有语义(SummaryTransportError.retryable = !aborted)不重试、直接永久失败,120s 无首字节即以带原因错误结束该轮——PR 描述已更正过,不是"两次尝试"。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

选项 A 修复已逐项核验通过(commit 987de7c8b,6 文件 +39/-22,是我上一提交 9492212 的线性后继):

  • ✅ src/knobs.ts upstreamFirstByteMs() 回落改为 resolved upstreamTimeoutMs()(第 103 行 return Number.isInteger(v) && v > 0 ? v : upstreamTimeoutMs();)——未设时对所有配置都等于旧单阶段预算;
  • ✅ UPSTREAM_FIRST_BYTE_MS 常量已删,全仓无残留引用(仅剩 env 变量名 BILI_UPSTREAM_FIRST_BYTE_MS 与注释);src/fetch-util.ts 原位留注释说明此处故意不设默认常量(钉死 720000 会把提到 12 分钟以上的部署悄悄压回去);
  • ✅ 测试补钉齐全:BILI_UPSTREAM_TIMEOUT_MS=3600000+旋钮未设 → 3600000(跟随);显式 45000 → 45000(显式优先);非法值 → 回落解析后预算;finally 的 env 还原完整(含 prevIdle),确定性无泄漏;
  • ✅ 文档重新生成:default 标注 "= upstreamTimeoutMs (resolved; 720000 when unset)",en/zh 描述都正确写明 follow-resolved 语义并回溯 [PR] Upstream hang on compressed summary no longer silent: added first-byte budget + watchdog/preflight logging (#5904) | 压缩摘要上游卡死不再静默:新增首字节预算+看门狗/预检日志(#5904) #5917 评审来源。

本地定向验证:在 987de7c8b 上实跑 tests/issue5904-upstream-first-byte.test.ts —— 4/4 绿,与你报告的验证一致。

重试语义更正:核实成立,接受更正。src/preflight.ts:1397 this.retryable = !aborted && code !== undefined && TRANSIENT_SUMMARY_CODES.has(code)——看门狗中止 ⇒ aborted=true ⇒ 不可重试,第 1465 行循环立即以永久失败结束该轮,带原因错误浮出,不重试。我此前「两次尝试」的说法是从 PR 初版描述沿用的旧措辞,以你更正后的 PR 描述为准。

增量八问(仅覆盖本提交 diff):

  1. 是什么问题:首版旋钮未设回落钉死常量 720000,会静默压低把 upstreamTimeoutMs 提到 12 分钟以上部署的首字节预算——即我评审标记的那处回归。
  2. 什么原因导致的:回落取的是编译期常量而非运行时解析值。
  3. 影响范围与严重程度:仅显式设置 BILI_UPSTREAM_TIMEOUT_MS > 720000 的部署(文档明载的 >12 分钟本地模型 prefill 场景)受影响;p2,已在合并前修复。
  4. 怎么修复的:回落在函数上跟随 resolved upstreamTimeoutMs(),删除常量,补三向测试钉(跟随/显式优先/非法值回落),文档同步。
  5. 是否有回归问题:无——未设路径现在对所有配置逐字节等于旧单阶段预算;显式与非法值路径有测试钉住;除选项 A 本身外未引入新行为。
  6. 是否破坏缓存:不涉及。
  7. 是否改了设计方向:不涉及——按拍板的选项 A 在既有旋钮解析链(env > file > resolved default)内落地。
  8. 是否引入了新的配置:无新键;同一键的回落语义变更(旧=固定 720000,新=跟随解析值)正是本次要修的回归,属有意变更且已在文档披露。

状态更新:needs-decision 标签已移除(决策已定 A),镜像标签现为 [bug, p2, pr, scope/wiring]。CI 在新 head 上运行中(12 shard in progress,目前零失败)。CI 全绿后此 PR 即可合并——合并动作在你这边。

…-byte-budget

# Conflicts:
#	CONFIGURATION.md
#	CONFIGURATION.zh-CN.md
#	LIFECYCLE.md
@ranxianglei
ranxianglei merged commit 3ac3e95 into master Nov 8, 2026
50 checks passed
@github-actions

github-actions Bot commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

📦 Merged Build Published

This merge to master was published as 0.0.1087-master.3ac3e95 (rolling master tag).

npm install -g billion-context@0.0.1087-master.3ac3e95  # 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.

Louie0806 added a commit to Louie0806/billion-context that referenced this pull request Nov 8, 2026
…TS.md and the ranxianglei#5904 first-byte budget

Upstream delta 48ee6a7..3ac3e95 (83 files, 20 commits). The substantive ones:
- e3434a3 fix(ranxianglei#5904): phase-1 first-byte budget for upstream summary calls + watchdog/preflight logging
- b4a4026 docs(ranxianglei#5904): regenerate config artifacts for upstreamFirstByteMs + ledger entry
- 9492212 docs(ranxianglei#5904): align first-byte-knob comments and docs with shipped values
- c7db020 fix(opencode): route host console chatter to bili.log and teach the config key (PR ranxianglei#5710, closes ranxianglei#5706)
- 984d3dc fix(gate): opencode lane one-time warmup round for fresh storage dirs (PR ranxianglei#3497)
- 8f1fca8 docs: live architecture hub + module pages + file-map CI guard
- 2a15b5a docs: all 8 architecture module pages live
- 44faff0 docs: slim AGENTS.md (KDD text to reference/design-decisions.md, triage table to reference/triage.md)
- 6f4f248 docs: add docs/README navigation landing page, en+zh
- 3ac3e95 Merge pull request ranxianglei#5917

Conflict surface: only the four generated artifacts, all auto-merged. The lane's chat
row is still in the regenerated docs/configuration.md (line 294) after
`node tools/gen-config-docs.mjs generate`, and the docs fixed point holds.

kernel stayed at 0.0.187 and was rebuilt before measuring. Lane anchors intact:
src/server/relay.ts:2070 still calls `pipePluginJson(toClient, res, undefined,
prepared.protocol, ...)`, src/storage/mysql.ts:77 still exports MYSQL_SCHEMA_VERSION,
symbols unchanged (stripDriftResidue 6, isDraftDump 6, containsRenderTagText 21,
mayStartDegenerateRenderTag 6, DRIFT_BARE_MISMATCH 3, DRAFT_CLOSE_TAIL 3).

Gates: tsc 0, four guards 0, gen-config-docs fixed point.
Tests: issue5175 58/0, tag-echo 79/0, issue2190-degen-close 32/0, golden-storage-render 5/0,
storage-engine-proofs 12/0, native-compact-terminal 1/0, issue4666 2/0, and the three
new upstream suites: issue5904-upstream-first-byte 4/0,
issue5706-opencode-host-console 2/0, issue1815-unknown-top-level-keys 5/0.
Louie0806 added a commit to Louie0806/billion-context that referenced this pull request Nov 8, 2026
…rub, x.ai WS recovery

Upstream delta fe963d7..f1a4af4 (15 files, 20 commits):
- 96fc75d fix: give a tightened first-byte timeout its own replayable failure
  kind `upstream-headers-timeout`, replayed in-proxy under BILI_REPLAY_RETRY_MAX
  (ranxianglei#5807/ranxianglei#5831, ranxianglei#5917 review); 16b149e pins the classification; 3a52fdbfd
  corrects the split-condition wording
- 907fcea fix(log-mask): scrub JSON-quoted credentials and Groq/Hugging Face keys
- 0c213c0 fix: recover x.ai Responses WS continuations rejected without a type
- 204f79f fix: hide the host composer seat while the Context tab is open (ranxianglei#4406)
- e7b0cee / 6436b23: the two golden-realign commits are ALREADY ancestors of
  this branch (they landed on the lane earlier via ci-fixes), so the only golden
  movement here is none; both verified with merge-base --is-ancestor.

Three files overlap and all three auto-merged: src/loop/core.ts (upstream adds one
TRANSPORT_FAILURE_LABELS row for upstream-headers-timeout; the lane's isDraftDump
gate is elsewhere in the file), docs/configuration.md and docs/configuration.zh-CN.md
(regenerated from the seed, fixed point holds), plus website/main.js and
website/docs/index.html regenerated too.

kernel stayed at 0.0.187 and was rebuilt before measuring. Lane anchors intact:
src/server/relay.ts:2097 still calls `pipePluginJson(toClient, res, undefined,
prepared.protocol, ...)`, src/storage/mysql.ts:77 still exports MYSQL_SCHEMA_VERSION,
symbols unchanged (stripDriftResidue 6, isDraftDump 6, containsRenderTagText 21,
mayStartDegenerateRenderTag 6, DRIFT_BARE_MISMATCH 3, DRAFT_CLOSE_TAIL 3).

Gates: tsc 0, unused-exports 0, config-surface 0, lifecycle-ledger 0,
test-import-graph 0, gen-config-docs fixed point.
Tests: issue5175 58/0, tag-echo 79/0, issue2190-degen-close 32/0,
golden-storage-render 5/0, storage-engine-proofs 12/0, native-compact-terminal 1/0,
issue4666 2/0; plus the upstream suites this delta touches: issue5807-first-byte-replay
5/0, log-mask 26/0, xai-responses-ws-error-envelope 2/0, dsh-settings-ui 27/0 (the 7
failures seen without stripping the live host's BILLION_CONTEXT_ATTACH/DSH_* env are a
sandbox artifact, not a regression: pristine master shows the same 20/7, and the same
tree is 26/0 clean).
ranxianglei pushed a commit to TimBriseby/billion-context that referenced this pull request Nov 9, 2026
…, PR ranxianglei#5177)

Resolves the dirty state against current master (e7b3d28):
- src/upstream-fail.ts: keep master's new upstream-headers-timeout kind
  (ranxianglei#5807/ranxianglei#5917) AND apply the PR's neutral wording to the upstream-timeout
  docstring + hint (this category alone does not prove idle expiry).
- CONFIGURATION.md / CONFIGURATION.zh-CN.md: adopt master's redirect stub
  (content moved to docs/configuration*.md during docs centralization).
- Port the PR's three doc edits (upstream-timeout table row, masked causes=
  diagnostics paragraph, four-step checklist step 1) into
  docs/configuration.md / docs/configuration.zh-CN.md where they now live.

Verified: typecheck clean; 57/57 targeted timeout/failure diagnostic tests pass.
@github-actions github-actions Bot mentioned this pull request Nov 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

1 participant