Skip to content

fix: wasmtime codec - #1516

Merged
rvolosatovs merged 4 commits into
mainfrom
fix/wasmtime-codec
Oct 7, 2026
Merged

rvolosatovs merged 4 commits into
mainfrom
fix/wasmtime-codec

Conversation

@rvolosatovs

Copy link
Copy Markdown
Member

No description provided.

The owned `wasi:io/input-stream` forwarding loop wrote the end-of-stream
marker on `StreamError::Closed` but kept looping, calling `ready()` on
the closed stream and writing `0x00` until the writer failed. Return
after the marker instead.

Assisted-by: claude:claude-fable-5-1
`InputStream::read` returning an empty buffer means no data is ready
yet, but the forwarding loop encoded it as a zero-length `list<u8>`,
which on the wire is the end-of-stream marker. Skip empty chunks so the
receiver only sees the marker once the stream is actually closed.

Assisted-by: claude:claude-fable-5-1
Only a present payload was checked against the case type, so
`Val::Variant(name, None)` for a payload-carrying case encoded just the
discriminant, which the peer cannot decode. Bail on a missing payload
too, matching the `result` arm and the wave encoder.

Assisted-by: claude:claude-fable-5-1
Record and tuple encoding zipped the value against the type, silently
truncating whichever side was longer. Bail on a length mismatch for
both.

Assisted-by: claude:claude-fable-5-1
@rvolosatovs
rvolosatovs enabled auto-merge October 7, 2026 17:41
@rvolosatovs
rvolosatovs added this pull request to the merge queue Oct 7, 2026
Merged via the queue into main with commit b68bf89 Oct 7, 2026
40 checks passed
@rvolosatovs
rvolosatovs deleted the fix/wasmtime-codec branch October 7, 2026 17:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant