Skip to content

Add fuzz targets for custom Block, Mark, and Content serde#90

Merged
gvonness-apolitical merged 1 commit intomainfrom
fuzz/custom-serde-targets
Feb 16, 2026
Merged

Add fuzz targets for custom Block, Mark, and Content serde#90
gvonness-apolitical merged 1 commit intomainfrom
fuzz/custom-serde-targets

Conversation

@gvonness-apolitical
Copy link
Collaborator

Summary

  • Add block_parser fuzz target: exercises custom Block::deserialize with all 20+ block type dispatch paths
  • Add mark_parser fuzz target: exercises custom Mark::deserialize including both string and object mark parsing
  • Add content_parser fuzz target: exercises full Content deserialization pipeline with nested blocks and marks
  • Register all 3 new targets in fuzz/Cargo.toml

The hand-written serde impls from PR #87 are the most complex recent addition. These targets increase confidence against malformed input causing panics or unexpected behavior.

Test plan

  • cargo check in fuzz/ directory compiles all 5 targets
  • Main workspace: cargo build/test/clippy --workspace --all-features all pass
  • CI passes all 10 jobs

Usage

cargo +nightly fuzz run block_parser
cargo +nightly fuzz run mark_parser
cargo +nightly fuzz run content_parser

The hand-written Serialize/Deserialize impls from PR #87 are the
most complex recent addition. These fuzz targets exercise all type
dispatch paths with arbitrary input to catch panics or unexpected
behavior in the custom deserialization logic.
@codecov
Copy link

codecov bot commented Feb 16, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@gvonness-apolitical gvonness-apolitical merged commit 1ad97ed into main Feb 16, 2026
11 checks passed
@gvonness-apolitical gvonness-apolitical deleted the fuzz/custom-serde-targets branch February 16, 2026 16:04
@gvonness-apolitical gvonness-apolitical mentioned this pull request Feb 16, 2026
3 tasks
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