You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(llm): use Windows WSA errnos instead of string matching (#953)
## Summary
- Follow-up to #951. The Windows CI failure resolved there with a
string-matching fallback has a deeper, fully typed fix.
- `syscall.ECONNREFUSED` on Windows is defined as \`APPLICATION_ERROR |
iota\` (an invented value, not the real WSA error code), so
\`errors.Is(err, syscall.ECONNREFUSED)\` *always* returns false on
Windows for real network errors. Same for \`ENETUNREACH\` and
\`EHOSTUNREACH\`.
- Split \`connectionErrnos\` across build-tagged files: POSIX uses the
standard \`syscall.*\` constants; Windows uses
\`golang.org/x/sys/windows.WSAECONNREFUSED\` / \`WSAENETUNREACH\` /
\`WSAEHOSTUNREACH\` (already a direct dep, exposed as \`syscall.Errno\`
so \`errors.Is\` works).
- \`isNetworkError\` collapses to a simple loop over the
platform-specific list; the substring fallback comes out. Zero string
matching on either platform.
- \`AGENTS.md\`: codify "no \`err.Error()\` substring classification"
with the Windows errno caveat documented inline so the next agent
doesn't fall into the same trap.
0 commit comments