F6a: network is unreachable and no route to host are transport words (issue 1748 review 1)

Claude-Session: https://claude.ai/code/session_01JG73KEq4zoDfM9WtYpcQgZ
This commit is contained in:
2026-11-09 23:33:15 +01:00
parent fe6552ba7c
commit 82f0f6a134
2 changed files with 17 additions and 15 deletions
+16 -14
View File
@@ -317,20 +317,22 @@ func TestPauseCapacityAndComposerKey(t *testing.T) {
// Issue 1748 (ADR 0664): a transport fault is told from a wrong source by its words; a step given again is no end; the
// bus waits 1 minute after the first run and 4 after the second.
for words, want := range map[string]bool{
`Get "https://proxy": dial tcp: lookup proxy.golang.org: i/o timeout`: true,
`Head http://store.internal:5100/v2/x: dial tcp 10.10.0.1:5100: i/o timeout`: true,
"kex_exchange_identification: read: Connection reset by peer": true,
"Connection closed by 10.10.0.1 port 222": true,
"npm error code EAI_AGAIN": true,
"npm error code ETIMEDOUT": true,
"npm error code ECONNRESET": true,
"fatal: unable to access the forge: Could not resolve host: mesh-forge": true,
"Get \"https://example.com/x.tar.gz\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)": true,
(&HolderSilent{Seat: "go-package-registry", Holder: "gopkgs", Node: "ace"}).Error(): true,
"nats: no responders available for request": false,
"fatal: unknown revision or path not in the working tree": false,
"verifying module: checksum mismatch": false,
"./main.go:3:1: syntax error: unexpected }": false,
`Get "https://proxy": dial tcp: lookup proxy.golang.org: i/o timeout`: true,
`Head http://store.internal:5100/v2/x: dial tcp 10.10.0.1:5100: i/o timeout`: true,
"kex_exchange_identification: read: Connection reset by peer": true,
"Connection closed by 10.10.0.1 port 222": true,
"npm error code EAI_AGAIN": true,
"npm error code ETIMEDOUT": true,
"npm error code ECONNRESET": true,
"fatal: unable to access the forge: Could not resolve host: mesh-forge": true,
"Get \"https://example.com/x.tar.gz\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)": true,
(&HolderSilent{Seat: "go-package-registry", Holder: "gopkgs", Node: "ace"}).Error(): true,
`invalid version: Get "https://proxy.golang.org/x/@v/y.info": dial tcp [2a00::1]:443: connect: network is unreachable`: true,
"dial tcp 10.10.0.1:22: connect: No route to host": true,
"nats: no responders available for request": false,
"fatal: unknown revision or path not in the working tree": false,
"verifying module: checksum mismatch": false,
"./main.go:3:1: syntax error: unexpected }": false,
} {
if PassingCause(words) != want {
t.Errorf("PassingCause(%q) = %v, want %v", words, !want, want)
+1 -1
View File
@@ -40,7 +40,7 @@ func (h *HolderSilent) Unwrap() error { return &Passing{Err: errors.New(h.Error(
// reset connection, ssh's key exchange cut by a forge's per-source penalty) and npm's error codes. "no responders" alone is not
// one: it is the same for a seat nothing holds (HolderSilent is the case a holder is named).
var passingWords = []string{"i/o timeout", "no such host", "temporary failure in name resolution", "connection refused",
"connection reset", "tls handshake timeout", "lookup ", "kex_exchange_identification", "connection closed by",
"connection reset", "tls handshake timeout", "network is unreachable", "no route to host", "lookup ", "kex_exchange_identification", "connection closed by",
"could not resolve host", "client.timeout", "operation timed out", "connection timed out", "eai_again", "etimedout", "econnreset", "econnrefused", "enotfound", strings.ToLower(HolderSilentWords)}
// PassingCause says words (a tool's output or a step's reason) are those of a transport fault.