Broker test battery + drop unmaintained deps (bincode, rustls-pemfile) - #22
Merged
Conversation
Drop two crates flagged by cargo-audit / cargo-deny as unmaintained. bincode (RUSTSEC-2025-0141) — the broker's cluster layer serialized Raft state and fabric RPCs with bincode. It now uses a new in-house `serde_bin` module: a full serde Serializer/Deserializer implementing bincode 1.x's wire model (little-endian fixint, u64 length prefixes, u32 enum-variant indices, structs-as-seq, non-self-describing), which round-trips openraft's generic types (Entry, Vote, SnapshotMeta, LogId, StoredMembership) unchanged. Verified by serde_bin unit tests, the fabric round-trip test, the full broker suite (121/121), and multi-process chaos (leader-kill failover with zero accepted loss + durable crash recovery). On-disk Raft log/snapshot encoding changes; the broker is unreleased so no migration is needed. (#20) rustls-pemfile (RUSTSEC-2025-0134) — the client's TLS PEM loading now uses the PEM support built into rustls-pki-types (already a dependency, and the crate that owns the CertificateDer/PrivateKeyDer types). No public API change. (#21) ramqp 0.8.0 -> 0.8.1, ramqp-broker 0.8.26 -> 0.8.27.
Add a consistent, scriptable battery under ramqp-broker/scripts/ so the broker
gets the same checks build over build ahead of a crates.io release. Not wired
into CI; run by hand or via run-all.sh. Each stage sources lib.sh (logging,
pass/fail tally, brokerd spawn/teardown, port + RSS helpers) and writes
artifacts to a gitignored out/<timestamp>/.
Stages: static gates; the full suite under a flake-repeat loop; a soak/leak
detector (RSS-flat + no-throughput-decay under connection churn); chaos
(rolling kill -9 of cluster nodes with a zero-accepted-loss verifier, plus
durable crash recovery); an interop matrix (ramqp and fe2o3-amqp clients x
ramqp-broker / RabbitMQ / Artemis); robustness floods; and cargo-fuzz on the
wire decoders. bench.sh (perf-vs-baseline) and cov.sh (coverage) are manual and
never gate.
Load/chaos/robustness drivers that bash cannot express live as example bins
(examples/{loadgen,chaos,recover,robust}.rs) so cargo check --all-targets keeps
them compiling. Fuzz targets (decode_frame, Value) live in ramqp-core/fuzz as
their own workspace, so the main build never pulls libfuzzer.
ramqp-broker 0.8.27 -> 0.8.28.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two things, bundled into one PR:
cargo audit/cargo deny.gets the same checks build-over-build ahead of a crates.io release.
1. Dependency hardening
bincode→ in-houseserde_bin— Closes #20bincode(RUSTSEC-2025-0141) was the broker's serializer for Raft state andfabric RPCs. Replaced with
ramqp-broker/src/serde_bin.rs: a full serdeSerializer/Deserializerusing bincode 1.x's wire model (LE fixint,u64lengths,
u32enum-variant indices, structs-as-seq, non-self-describing), whichround-trips openraft's generic types (
Entry,Vote,SnapshotMeta,LogId,StoredMembership) unchanged. ~30 call sites swapped; crate removed.rustls-pemfile→rustls-pki-typesPEM — Closes #21rustls-pemfile(RUSTSEC-2025-0134) loaded the client's TLS certs/keys. Replacedwith the PEM support built into
rustls-pki-types— already a dependency viarustls, and the crate that owns theCertificateDer/PrivateKeyDertypes.No public API change; crate removed.
Both advisories now clear;
cargo auditreports only the unrelated, dev-onlycrossbeam-epoch(RUSTSEC-2026-0204, viacriterion).2. Broker test battery (
ramqp-broker/scripts/)Each stage sources
lib.sh(logging, pass/fail tally, brokerd spawn/teardown,port + RSS helpers) and writes artifacts to a gitignored
out/<timestamp>/.Run with
scripts/run-all.sh(or--quick).-D· check · doc · audit · denykill -9cluster failover, zero-accepted-loss + durable crash recoveryramqp&fe2o3-amqpclients × ramqp-broker / RabbitMQ / Artemiscargo-fuzzondecode_frameandValuebench.sh(perf-vs-baseline) andcov.sh(coverage) are manual and never gate.Load/chaos/robustness drivers that bash can't express are example bins
(
examples/{loadgen,chaos,recover,robust}.rs) socargo check --all-targetskeeps them compiling; fuzz targets live in
ramqp-core/fuzzas their ownworkspace so the main build never pulls libfuzzer.
Validation
121/121broker suite green (all features);serde_binhas 6 unit tests + the fabric Raft round-trip test.kill -9+ cold start — all Raft log/snapshot serialization now ridesserde_bin.cargo fmt --checkclean;cargo clippy --all-targets --all-features -D warningsclean.Caveat
This changes the on-disk Raft log/snapshot encoding (bincode→serde_bin). The
broker is unreleased, so no migration is needed, but an existing dev
--data-dirmust be recreated. The durable
/durable/*redb store is unaffected.Not included (separate follow-ups)
crossbeam-epochRUSTSEC-2026-0204 (dev-only;cargo update -p crossbeam-epoch).deny.tomlfor thelicensesgate (Unicode-3.0 allowance).Versions
ramqp0.8.0 → 0.8.1,ramqp-broker0.8.26 → 0.8.28.