Repository navigation
[PR] fix: retain nested transport codes in upstream health reports - #6743
Merged
ranxianglei merged 1 commit intoNov 14, 2026
Merged
ranxianglei merged 1 commit into
ranxianglei merged 1 commit into
Conversation
This was referenced Nov 14, 2026
Merged
Merged
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.
Closes #6741
Problem
Native Node Fetch failures commonly expose their transport error as
TypeError.cause.code. The existing taxonomy follows that cause chain, but the separate errno reader only inspects the outer error. As a result, the upstream alert and/__bili/upstreamsreport can identify a failure category while dropping the specific errno, and a repeated alert can keep an older code instead of the current cause.Change
Follow the same bounded eight-entry cause order when reading the errno. Keep the first nonempty string code, including an outer code when present. Both alert records and open-circuit health records use this helper. Failure classification, retry behavior, circuit transitions, and the report schema stay as they are.
Validation
a8bbb8d23108ba9148d09512927041364625d910, the targeted 29 tests produced 11 failures and 18 passes. Ten failures are new cause-code cases; the other is the new errno assertion in the existing real-proxy failure/recovery test.TypeErrorwithcause.code = UND_ERR_SOCKET; the public alert/circuit health records retain that code. The existing proxy integration also verifiesECONNREFUSEDthrough the real/__bili/upstreamsendpoint.npm run typecheck,npm run build, andgit diff --checkpass on Node 24.22.1 / Linux.Existing work checked
The complete Afloat16 historical PR patch index and non-PR issue index contain no earlier change to this helper. I also checked the actual patches for #5147 (the health report and outer-only errno reader), #5177 (cause-aware proxy logging), and #4417 (unknown circuit-failure accounting). None repairs the errno stored in the alert and health records.