Awesome Reviewers

Define networking behavior so failures don’t cause duplicate work, hangs, or incorrect routing.

Apply these rules: 1) Track dispatch boundaries for retry/resend UX

2) Ensure every network path is bounded/abortable

3) Make disconnect/reconnect semantics explicit

4) Preserve correct proxy + loopback behavior when customizing HTTP dispatchers

Example patterns:

A) Avoid duplicate resend after dispatch

type SendFailure = { dispatched: boolean; kind: "pre_dispatch" | "post_dispatch"; /* ... */ };

function uiResendAllowed(err: SendFailure) {
  // Only allow resend when we know it was never dispatched.
  return err.dispatched === false && err.kind === "pre_dispatch";
}

B) Abort fallback fetches too

async function fetchModelIdsFromSource(url: string, signal: AbortSignal) {
  const res = await fetch(url, { signal });
  // ...
}

Checklist for PRs touching networking