Skip to content

test: ignore the checksum in the snapshot descriptor round trip - #146

Merged
mattmattox merged 1 commit into
mainfrom
test-snapshot-fuzz-roundtrip
Nov 14, 2026
Merged

mattmattox merged 1 commit into
mainfrom
test-snapshot-fuzz-roundtrip

Conversation

@mattmattox

Copy link
Copy Markdown
Contributor

Unblocks #144: its nightly fuzz run fails FuzzDecodeDescriptor on main.

This is a false positive, not a snapshot bug. Since #140, bytes 26-27 and 32-35 of a descriptor hold the birth generation only when FlagHasTargetBirth is set. Without the flag, decoding ignores them and re-encoding writes zeros there, so the stored checksum changes while every decoded field stays the same. The round-trip check compared the checksum too; it now compares the fields. The input that found it is kept as a regression seed.

Tested on .68: -race on internal/snapshot, 60 s of fuzzing, golangci-lint.

🤖 Generated with Claude Code

Since #140, bytes 26-27 and 32-35 hold the birth generation only with
FlagHasTargetBirth. Without the flag, decoding ignores them and
re-encoding writes zeros, so the checksum changes while every field
stays the same. FuzzDecodeDescriptor compared the stored checksum too
and failed on such descriptors; it now compares the fields. The input
that found it is kept.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mattmattox
mattmattox merged commit b968a0a into main Nov 14, 2026
17 checks passed
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