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
The network demos across all backends were silently failing — every
example printed success regardless of whether HTTP requests actually
succeeded. This hid two real bugs:
- AnyPollable::block() polled with a tight yield_now() loop capped at
100k iterations. Real HTTPS requests take hundreds of milliseconds,
but 100k yields complete in microseconds, so the guest always gave up
before the response arrived. Remove the iteration cap and keep the
yield so the loop waits as long as the request needs.
- The HyperlightJS sandbox eval-based handler couldn't support await.
The handler ran guest code through synchronous eval(), so
'await fetch(...)' created an unresolved promise that crashed outside
the try/catch. Wrap the code in AsyncFunction to make top-level await
work. Additionally, denied HTTP requests now return proper HTTP
responses (403/500/502 status codes) instead of throwing JS exceptions
via json_error.
All network demos now have real assertions that will fail CI if anything
regresses. An HTTPS integration test against httpbin.org covers TLS
end-to-end.
Signed-off-by: James Sturtevant <jsturtevant@gmail.com>
0 commit comments