Stream: git-wasmtime

Topic: wasmtime / PR #14656 wasi-http: report body errors from f...


view this post on Zulip Wasmtime GitHub notifications bot (Oct 10 2026 at 18:51):

xia-chao opened PR #14656 from xia-chao:fix/wasi-http-trailers-body-error to bytecodealliance:main:

The contract makes this future the place for "trailers received, or an error", but on a body error it reports "no trailers".
This PR sends the error into that future, and adds a test.
Here I choose to leave the real error to the read path; what goes to the future is a synthesized Error::HttpProtocolError, because that keeps the change surface smallest. But the real error could also be sent to the future as a whole, with the read path changed to return the category error.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 10 2026 at 18:51):

xia-chao requested rvolosatovs for a review on PR #14656.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 10 2026 at 18:51):

xia-chao requested wasmtime-wasi-reviewers for a review on PR #14656.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 10 2026 at 18:51):

xia-chao requested wasmtime-core-reviewers for a review on PR #14656.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 10 2026 at 18:51):

xia-chao requested dicej for a review on PR #14656.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 10 2026 at 18:52):

:cross_mark: xia-chao closed without merge PR #14656.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 10 2026 at 19:06):

xia-chao reopened PR #14656 from xia-chao:fix/wasi-http-trailers-body-error to bytecodealliance:main.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 10 2026 at 19:06):

xia-chao updated PR #14656.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 10 2026 at 19:17):

xia-chao updated PR #14656.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 12 2026 at 15:23):

rvolosatovs assigned rvolosatovs to PR #14656.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 12 2026 at 16:02):

:memo: rvolosatovs submitted PR review:

Thanks, I think this looks good overall, but there are some improvements we could make. I don't think we can avoid having to report the "real" error in both places, therefore I think we need to wrap the error in an Arc

I noticed that http_error_code reporting is currently broken on p2, I opened https://github.com/bytecodealliance/wasmtime/pull/14667, which also refactors the error_to_p2 to take a reference, which we'd need here to use the Arc

view this post on Zulip Wasmtime GitHub notifications bot (Oct 12 2026 at 16:02):

:speech_balloon: rvolosatovs created PR review comment:

This is now redundant, right?

view this post on Zulip Wasmtime GitHub notifications bot (Oct 12 2026 at 16:02):

:speech_balloon: rvolosatovs created PR review comment:

    Error(Arc<Error>),

view this post on Zulip Wasmtime GitHub notifications bot (Oct 12 2026 at 16:02):

:speech_balloon: rvolosatovs created PR review comment:

                };
                let e = Arc::new(e);
                if let Some(tx) = tx {
                    let _ = tx.send(StreamEnd::Error(Arc::clone(&e)));

view this post on Zulip Wasmtime GitHub notifications bot (Oct 12 2026 at 16:02):

:speech_balloon: rvolosatovs created PR review comment:

                            match stream.blocking_read(4096) {
                                Ok(buf) if buf.is_empty() => break format!("eof bytes={bytes}"),

This is not correct usage according to the spec, since an empty buffer could mean that there are no bytes available at the time. blocking_read should never return an empty buffer

view this post on Zulip Wasmtime GitHub notifications bot (Oct 12 2026 at 17:42):

:memo: xia-chao submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 12 2026 at 17:42):

:speech_balloon: xia-chao created PR review comment:

Yes, the mem::replace above already sets Closed.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 12 2026 at 17:45):

xia-chao commented on PR #14656:

Thanks!
All four are fine and I have them ready, I'll push once #14667 lands.
But with the Arc, the read path's http-error-code goes back to none. The error is an Arc<Error> now. (I have that ready too.)

view this post on Zulip Wasmtime GitHub notifications bot (Oct 13 2026 at 13:57):

xia-chao updated PR #14656 (assigned to rvolosatovs).

view this post on Zulip Wasmtime GitHub notifications bot (Oct 13 2026 at 13:59):

xia-chao commented on PR #14656:

Submitted

view this post on Zulip Wasmtime GitHub notifications bot (Oct 13 2026 at 16:57):

:thumbs_up: rvolosatovs submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 13 2026 at 16:57):

:speech_balloon: rvolosatovs created PR review comment:

technically this should never happen, but I think it's fine to keep it

view this post on Zulip Wasmtime GitHub notifications bot (Oct 13 2026 at 16:57):

rvolosatovs added PR #14656 wasi-http: report body errors from future-trailers to the merge queue.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 13 2026 at 17:35):

:check: rvolosatovs merged PR #14656.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 13 2026 at 17:35):

rvolosatovs removed PR #14656 wasi-http: report body errors from future-trailers from the merge queue.


Last updated: Oct 31 2026 at 23:03 UTC