fuzz: seed ipc_body with the daemon-stop bodies #226

Merged
natsukium merged 1 commit from issue-152 into main 2026-09-08 21:49:05 +09:00
Owner

The extend-ipc checklist asks for a curated fuzz/seeds/ipc_body/ seed per new message, and the daemon-stop pair shipped without one. Nothing failed as a result — the gap only meant libFuzzer had to rediscover the OpsStop / OpsStopReply tags on its own, and both an empty submessage nested in a oneof and an AttachFailure value at the top of the enum range are shapes random mutation reaches late. These three seeds put those arms in front of the first mutations.

Seeds added (bytes produced by felis_protocol::codec::encode, so they decode to the messages their names claim):

  • proto-ops-stop-when-empty.binOpsMsg::Stop { mode: WhenEmpty }
  • proto-ops-stop-reply-draining.binOpsMsg::StopReply { outcome: Draining { sessions: 2 } }
  • proto-session-attach-failed-draining.binSessionMsg::AttachFailed { reason: DaemonDraining, .. }

Verified with ./fuzz/seed-corpus.sh plus cargo fuzz run ipc_body -- -runs=10000 (clean) and a full just check (clean).

Fixes #152

The `extend-ipc` checklist asks for a curated `fuzz/seeds/ipc_body/` seed per new message, and the daemon-stop pair shipped without one. Nothing failed as a result — the gap only meant libFuzzer had to rediscover the `OpsStop` / `OpsStopReply` tags on its own, and both an empty submessage nested in a oneof and an `AttachFailure` value at the top of the enum range are shapes random mutation reaches late. These three seeds put those arms in front of the first mutations. Seeds added (bytes produced by `felis_protocol::codec::encode`, so they decode to the messages their names claim): - `proto-ops-stop-when-empty.bin` — `OpsMsg::Stop { mode: WhenEmpty }` - `proto-ops-stop-reply-draining.bin` — `OpsMsg::StopReply { outcome: Draining { sessions: 2 } }` - `proto-session-attach-failed-draining.bin` — `SessionMsg::AttachFailed { reason: DaemonDraining, .. }` Verified with `./fuzz/seed-corpus.sh` plus `cargo fuzz run ipc_body -- -runs=10000` (clean) and a full `just check` (clean). Fixes #152
fuzz: seed ipc_body with the daemon-stop bodies
Some checks failed
bench / Criterion full-suite snapshot (pull_request) Has been skipped
fuzz / cargo fuzz nightly long-run (pull_request) Has been skipped
bench / Criterion regression gate (pull_request) Successful in 2m5s
darwin / detect relevant changes (pull_request) Successful in 3s
darwin / darwin docs-only no-op (pull_request) Has been skipped
fuzz / cargo fuzz smoke (per target) (pull_request) Successful in 1m4s
pr / nix flake check (pull_request) Successful in 21s
pr / frontend smoke (x86_64-linux) (pull_request) Successful in 1m6s
pr / publish felis (x86_64-linux) (pull_request) Has been skipped
windows / detect relevant changes (pull_request) Successful in 3s
windows / windows docs-only no-op (pull_request) Has been skipped
darwin / build felis (aarch64-darwin) (pull_request) Successful in 51s
pr / cargo build / clippy / test / deny (pull_request) Failing after 1m14s
pr / wire schema is compatible with the base (pull_request) Successful in 15s
windows / cargo nextest (Windows) (pull_request) Successful in 6m2s
windows / frontend smoke (Windows) (pull_request) Successful in 2m28s
windows / package felis (x86_64-pc-windows-msvc) (pull_request) Has been skipped
windows / cargo clippy (Windows cross) (pull_request) Has been cancelled
c8d92542a1
The daemon-stop pair and the drain refusal reason reached the wire
without a curated seed, so libFuzzer had to rediscover their tags from
scratch: a `StopIfEmpty`-style empty submessage nested in a oneof and an
`AttachFailure` value at the top of the enum range are exactly the
shapes random mutation finds late. Priming the corpus puts the
`OpsStop` / `OpsStopReply` arms and the `DAEMON_DRAINING` sentinel in
reach of the first mutations instead.

Assisted-by: Claude Code
natsukium force-pushed issue-152 from c8d92542a1
Some checks failed
bench / Criterion full-suite snapshot (pull_request) Has been skipped
fuzz / cargo fuzz nightly long-run (pull_request) Has been skipped
bench / Criterion regression gate (pull_request) Successful in 2m5s
darwin / detect relevant changes (pull_request) Successful in 3s
darwin / darwin docs-only no-op (pull_request) Has been skipped
fuzz / cargo fuzz smoke (per target) (pull_request) Successful in 1m4s
pr / nix flake check (pull_request) Successful in 21s
pr / frontend smoke (x86_64-linux) (pull_request) Successful in 1m6s
pr / publish felis (x86_64-linux) (pull_request) Has been skipped
windows / detect relevant changes (pull_request) Successful in 3s
windows / windows docs-only no-op (pull_request) Has been skipped
darwin / build felis (aarch64-darwin) (pull_request) Successful in 51s
pr / cargo build / clippy / test / deny (pull_request) Failing after 1m14s
pr / wire schema is compatible with the base (pull_request) Successful in 15s
windows / cargo nextest (Windows) (pull_request) Successful in 6m2s
windows / frontend smoke (Windows) (pull_request) Successful in 2m28s
windows / package felis (x86_64-pc-windows-msvc) (pull_request) Has been skipped
windows / cargo clippy (Windows cross) (pull_request) Has been cancelled
to ae86753293
All checks were successful
fuzz / cargo fuzz nightly long-run (pull_request) Has been skipped
bench / Criterion full-suite snapshot (pull_request) Has been skipped
bench / Criterion regression gate (pull_request) Successful in 2m18s
darwin / detect relevant changes (pull_request) Successful in 3s
darwin / darwin docs-only no-op (pull_request) Has been skipped
darwin / build felis (aarch64-darwin) (pull_request) Successful in 50s
fuzz / cargo fuzz smoke (per target) (pull_request) Successful in 1m13s
pr / nix flake check (pull_request) Successful in 6s
pr / cargo build / clippy / test / deny (pull_request) Successful in 1m57s
pr / wire schema is compatible with the base (pull_request) Successful in 8s
pr / frontend smoke (x86_64-linux) (pull_request) Successful in 58s
pr / publish felis (x86_64-linux) (pull_request) Has been skipped
windows / detect relevant changes (pull_request) Successful in 3s
windows / windows docs-only no-op (pull_request) Has been skipped
windows / cargo nextest (Windows) (pull_request) Successful in 4m59s
windows / frontend smoke (Windows) (pull_request) Successful in 2m39s
windows / package felis (x86_64-pc-windows-msvc) (pull_request) Has been skipped
windows / cargo clippy (Windows cross) (pull_request) Successful in 14s
2026-09-08 20:40:05 +09:00
Compare
natsukium deleted branch issue-152 2026-09-08 21:49:05 +09:00
Sign in to join this conversation.
No description provided.