Repository navigation
修复 Bun 1.4.4 上拨出的升级被拒与证书被拒 - #583
Merged
Merged
Conversation
Bun 1.4.4 的 ws 客户端在有 unexpected-response 监听时不再自己关闭连接 (与 npm ws 一致),拨出要等 10 秒握手时限才失败;证书被拒改为 Node 式 的错误码加关闭码 1006,不再是 1015,被归为 retryable。 - 读完拒绝的响应体就结束连接并报错,同 Node 运行时 - 错误码指向证书(CERT/SIGNATURE/ALTNAME/ISSUER)时归为 auth-rejected; 1015 仍然认
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
问题
network-macos上dial_conformance的bun::a_wrong_token_is_retried_as_rejected和bun::an_incompatible_access_point_stops_the_dialer从今天起几乎每个 PR 都失败(#563、#578–#582),报timed out (10s): rutis: refused: auth-rejected (/incompatible (。不是 rutis 的某次合并引起的:这个任务装的是最新的 Bun(
bun-version: latest),Bun 1.4.4 在 2026-10-22 10:19Z 发布,失败都在这之后。本地 macOS 上,同一份代码用 Bun 1.4.3 全部通过,用 1.4.4 稳定复现;bun/rutis-bun自己的test/websocket.test.ts在 1.4.4 上也有两个失败。原因(Bun 1.4.4 的
ws客户端两处行为变化)unexpected-response监听时,1.4.4 照 npmws的做法把请求交给监听者处理:发出unexpected-response、读完响应体,之后没有close。我们的拨出只在close时报错,所以要等到 10 秒的握手时限才失败,刚好超过测试的 10 秒上限。最小复现:1.4.3 在 7 ms 时close 1002,1.4.4 3 秒后仍没有close。close 1015;1.4.4 是带 Node 错误码的error(UNABLE_TO_VERIFY_LEAF_SIGNATURE)加close 1006,被归成了retryable。修复(
bun/rutis-bun/src/websocket.ts)node/rutis-runtime/src/channel/websocket.mjs)的做法一样。新旧 Bun 都只报一次。CERT|SIGNATURE|ALTNAME|ISSUER,跟 Node 运行时用的规则相同)时归为auth-rejected。1015 仍然认,旧版 Bun 继续可用。docs/design-bun-runtime-2026-10-09.md/.en.md同步改了说明。验证
bun test(bun/rutis-bun)通过 129 个、失败 0 个(修复前分类测试超时、TLS 测试得到retryable);cargo test -p rutis-bridge --all-features --test dial_conformance bun::通过 8 个(修复前失败 2 个)。bun test通过 129 个。network-macos和runtimes-bun (latest)用的就是 1.4.4,runtimes-bun (1.4.0)覆盖旧版。其他用到
ws的地方bun/rutis-bun里只有src/websocket.ts的open(拨出)用了ws客户端,只有它依赖close和 1015 的行为。监听用的是Bun.serve,连上以后的关闭由wrap处理。用 Bun 1.4.4 跑了rutis-bridge的bun_channel、bun_runtime、websocket_conformance、websocket_cross、dial_conformance,全部通过。Node 运行时用的是 Node 上的 npmws,不受影响。