Add negative and boundary tests for blobgen and types (closes #170) #192

Merged
clawbot merged 1 commits from issue-170-blobgen-types-negative-tests into next 2026-09-22 14:28:35 +02:00
1 Commits
Author SHA1 Message Date
sneak fba0f74667 Add negative and boundary tests for blobgen and types (closes #170)
check / check (pull_request) Successful in 2m20s
Test-only. internal/blobgen and internal/types had no negative or
boundary coverage. Adds, in package blobgen_test: Writer-to-Reader round
trips at the 64 KiB age-segment edges for random and compressible data,
checking plaintext, byte counts and the reader/writer hashes by
decrypting; a wrong-identity open; truncation and single-byte corruption
of a multi-segment blob at every region; trailing bytes, empty input and
garbage; rejected and accepted compression levels; nil, empty and invalid
recipients; and a failing destination. In package types_test: Value/Scan
round trips, NULL, wrong-type and malformed Scan, Parse and IsZero for
FileID and BlobID.

internal/crypto and CompressStream/CompressData no longer exist and are
skipped. The "cut right after the age header and nonce" truncation is
excluded: it reads as valid and empty today and belongs to #152. Reworded
two writer_test.go messages that overstated what the double hash prevents.

Model: opus-4-8
2026-09-22 12:01:42 +00:00