open-standards/wai/wai-rs/include
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Transaction Science 4961fccf1e wai-rs: test the writers' limits through the writers
The test named for the writers called manifest_json_within and u32_field
directly and never called Wai::to_bytes or WaiMulti::to_bytes, so putting
serde_json::to_vec and `as u32` back in both writers left every test green.
Both writers now run to_bytes_within(WriteLimits), and to_bytes passes
SPEC's limits. The test writes each envelope at limits equal to its
manifest's and payloads' lengths, and requires manifest_too_large one byte
below the manifest, the field error one byte below a payload, and the sum
error when two payloads each fit and their total does not.

MANIFEST_MAX_LEN's doc cites staged-delivery Appendix A.3 for the 2^20-unit
cap (section 3 bounds a count only by 32 bits), and says the limit bounds
the bytes read, not the memory a parse takes. wai.h regenerated.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-09 16:46:13 -04:00
..
wai.h wai-rs: test the writers' limits through the writers 2026-10-09 16:46:13 -04:00