Files
OmniRoute/tests
Diego Rodrigues de Sa e Souza 90458a613c fix(sse): stop the executor-contract guard from hot-looping the router (#10373)
The `instanceof Response` guard from #10256 broke two ways:

1. `instanceof` is nominal against `globalThis.Response`, but proxyFetch dispatches
   through the npm undici package's fetch, whose Response is a different class — so
   valid upstream responses were rejected as contract violations. Replaced with
   `isResponseLike()` (instanceof fast path + structural brand/member probe); genuinely
   malformed shapes still throw.
2. The thrown error had no `.status`, so it fell through to chatCore's BAD_GATEWAY
   default — an internal defect was treated as a flaky provider, cooling the connection
   down and retrying forever. It now carries status 500 + `executor_contract_violation`,
   registered as request-scoped and terminal (no cooldown, no breaker, no retry).

batch_api.test.ts went from exit 124 (infinite hang, pinning Unit shard 4/4 in every
open PR) to exit 0, 22/22 passing.

Closes #10360
2026-08-14 10:03:10 -03:00
..