Repository navigation
[PR] fix: ICMP no-route errno family missing from transport failure taxonomy (#2465) - #2468
ranxianglei wants to merge 5 commits into
Conversation
EHOSTUNREACH/ENETUNREACH/EHOSTDOWN fell through classifyUpstreamFailure to 'unknown', which none of the three taxonomy consumers accept: no bounded transparent replay (isFailFastUpstreamKind), no web banner (ALERT_KINDS), and a hint that asked users to report what bili already logged in full. New kind 'upstream-unreachable' (separate from connect-timeout: immediate ICMP rejection vs deadline expiry, different remediation): added to the classify table, fail-fast set, alertable set, UPSTREAM_FAIL_HINTS, TRANSPORT_FAILURE_LABELS, and zh/en i18n alert.hint.upstream_unreachable with its client.ts switch case (#1024 lint coupling). P1a-2: the unknown hint/i18n key now state facts (full masked error chain is on this log line) instead of demanding a user report. Tests: taxonomy + fail-fast assertions extended; new coverage gate asserts every connect-stage errno lands in a fail-fast AND alertable kind; new P2 gate asserts every alertable kind has a dedicated i18n hint key in both locales.
The dispatch catch printed message + full stack for every classified transport death; field evidence showed 305 x 7 stack frames of pure noise (the one-line formatUpstreamError output already carries kind/code/errno/ syscall/address/hint). The envelope now tags biliTransportFailure so the catch logs that class as one line; the #806 stack rule stays intact for all other error classes.
c4f8e5b to
635e9a7
Compare
📦 Built Package ArtifactBranch: Option A — Install this exact build (recommended)npm install -g billion-context@0.0.2681-pr.2468.e6f7117This exact version is immutable and reproducible. The rolling Option B — Download artifact
tar xzf billion-context-pr2468.tgz
npm install -g packageInstall instructions are refreshed on each push. |
[bot] 🏷 冲突已解决并验证(本次为「上游 PR 冲突」唤醒的处理结论) 情况:PR #2468 分支被系统标为 dirty(与 master 冲突)。拉取最新 master 后确认根因——分支 fork 点之后 master 合入了 处理:rebase 两个提交到当前 master。唯一需手工解决的冲突点: 验证(针对与远端 head
结构化八问:
为何没有再 force-push:远端分支已处于正确且已验证的状态(与我独立 rebase 逐字节一致),再推只会造成 SHA 抖动,且有极小概率与并发解冲突方互相覆盖,无实际收益。若你希望我用本会话的 rebase 覆盖一次,我可照做。 判定:冲突已解除( |
|
(ai: zhipuai-lb/glm-5.3) 陈旧票清理(第三批动作①):目标 issue #2465 已关。为避免重复劳动关闭本 PR;如判断有误请直接 reopen 并留言。 |
Closes #2465
What
The ICMP no-route errno family (EHOSTUNREACH / ENETUNREACH / EHOSTDOWN) was missing from the transport failure taxonomy:
classifyUpstreamFailurereturnedunknownfor them, and none of the three consumers of the table acceptunknown— no bounded transparent replay (isFailFastUpstreamKind), no web banner (ALERT_KINDS), and a hint that asked users to report what bili had already logged in full. Field evidence from the issue: 305 failures in a 35-minute window, 301 with zero replay, zero banner entries.Two commits:
upstream-unreachable(8dce934) — covers EHOSTUNREACH/ENETUNREACH/EHOSTDOWN; wired through all six surfaces: classify table, fail-fast set, alertable set,UPSTREAM_FAIL_HINTS,TRANSPORT_FAILURE_LABELS(in-band client label), and zh/en i18nalert.hint.upstream_unreachablewith itsclient.tsswitch case (Web UI 英文翻译开关(i18n)— 社区 PR #807 (@amirzamli) #1024 lint coupling). Kept separate fromconnect-timeoutdeliberately: immediate ICMP rejection vs deadline expiry carry different remediation (routing/ACL check vs upstream health/timeout budget) — folding would regress the [Enhancement] 代理上游连接异常缺乏区分性诊断(代理 reset vs 超时 vs 客户端 abort)+ 握手层健壮性评估 #1263 distinguishable-remedies goal.unknownhint/i18n key now state facts ("full masked error chain is on this log line") instead of demanding a user report.biliTransportFailureso that class logs one line (theformatUpstreamErroroutput already carries kind/code/errno/syscall/address/hint). The Accepted request is never dispatched and never answered — client hangs forever (no request-scoped deadline) #806 stack rule is untouched for all other error classes.Behavior changes (old → new)
BILI_REPLAY_RETRY_MAXkind=for these errnosunknownupstream-unreachable/__bili/overview)upstream-unreachable)UPSTREAM_FAIL_HINTS.unknown/ i18nalert.hint.unknownNot changed: ETIMEDOUT stays
upstream-timeout(deliberate conservative design, out of scope); P1a-1 (splitting pre-responseunknown) is NOT implemented — undici wraps connect-phase and body-phase socket deaths identically, so the stage is not determinable from error shape alone, and after this PR the observed field family is covered. No new config surface (reuses the existingBILI_REPLAY_RETRY_MAXbudget); the new i18n key is required by the #1024 lint coupling, not a config knob.Tests
tests/upstream-fail.test.ts: taxonomy + fail-fast assertions extended; new connect-stage errno coverage gate.tests/upstream-alerts.test.ts: EHOSTUNREACH record enters the alert path; new i18n-key consistency gate.E2E_CHECK=1preflight showsupstream /models probe: unreachable); CI runs it automatically since the diff touchessrc/server.ts/src/loop/**.