yams/tests/unit/compression
trvon 73e5d3831c
fix(cli): decode compressed content in yams get
Since v0.7.3 'yams get' has requested compressed transfers
(acceptCompressed), and the daemon has answered with a framed payload: a
CompressionHeader followed by a Zstandard body. Only the MCP server
decoded it; 'yams get' wrote the frame itself to stdout or -o, so users
saw the 'CNRK' header and a zstd frame instead of the document. 'yams cat'
was unaffected because it does not request compression.

- Move the frame format into compression/framed_payload
  (encodeFramedPayload/decodeFramedPayload). DocumentService encodes with
  it; 'yams get' and MCP decode with it.
- The decoder checks the header, body size and CRC, and the decoded size
  and CRC. A payload that fails is an error; MCP used to fall back to
  returning the framed bytes as content.

Verified end to end: 'yams get' output (stdout and -o) is byte-identical
to the added file while the transfer stays compressed (51.75x).

Signed-off-by: trvon <me@trevon.dev>
2026-09-26 21:10:00 -06:00
..
compression_comprehensive_catch2_test.cpp fix(security): harden fold-flagged guards 2026-05-17 23:50:32 -04:00
compression_monitor_catch2_test.cpp feat: optimizations based on profile runs in hashing and work coordinator. test updates and correctness fixes 2026-02-24 21:06:43 -05:00
compression_policy_catch2_test.cpp refactor(compression): remove the never-built LZMA compressor 2026-09-23 19:31:37 -06:00
error_handler_catch2_test.cpp fix: test updates and benchmark updates for grep 2026-02-21 21:51:45 -05:00
framed_payload_catch2_test.cpp fix(cli): decode compressed content in yams get 2026-09-26 21:10:00 -06:00
integrity_validator_catch2_test.cpp continued test migration, updating symbol extraction plugin to address plug, search improvements 2025-12-12 15:23:44 -05:00
recovery_manager_catch2_test.cpp fix: test updates and benchmark updates for grep 2026-02-21 21:51:45 -05:00
transaction_manager_catch2_test.cpp fix: test updates and benchmark updates for grep 2026-02-21 21:51:45 -05:00
zstandard_compressor_catch2_test.cpp fix(compression): check stored zstd sizes against the frame before allocating 2026-09-23 18:05:05 -06:00