feat: publish-ready overhaul — lints, tests, docs, CI, fuzzing, mutant testing

- Enable clippy pedantic + nursery lints; fix all warnings
- Add config validation (SF, CR, frequency range checks)
- Zeroize passphrase intermediates after key derivation
- Convert to lib+bin crate for fuzz target accessibility
- Replace Vec with VecDeque for O(1) log/bucket rotation
- Add TUI minimum terminal size guard

Testing:
- 145 unit + property tests (was 15)
- 6 proptest groups (frame roundtrip, hash, SNR, air time, peer list, padding)
- 2 cargo-fuzz targets (gossip frame decode, peer list decode)
- cargo-mutants: 0 missed, 241 caught, 54 unviable

Documentation:
- README with prerequisites, quick start, config reference, architecture
- Module-level and item-level rustdoc on all public items
- LICENSE (MIT), rustfmt.toml, .gitignore

Infrastructure:
- GitHub Actions CI (fmt, clippy, test, audit)
- cargo-mutants config (.cargo/mutants.toml)
- justfile for common tasks
This commit is contained in:
swaits committed 2026-04-06 11:39:43 -06:00
1 parent b3bd92c5f8
commit 5dbec82aa9
24 files changed
+3048 -563

No files matched your search

+26
View File
@@ -0,0 +1,26 @@
[package]
name = "donglora-bridge-fuzz"
version = "0.0.0"
publish = false
edition = "2024"
[package.metadata]
cargo-fuzz = true
[dependencies]
libfuzzer-sys = "0.4"
[dependencies.donglora-bridge]
path = ".."
[[bin]]
name = "fuzz_gossip_frame_decode"
path = "fuzz_targets/fuzz_gossip_frame_decode.rs"
doc = false
[[bin]]
name = "fuzz_decode_peer_list"
path = "fuzz_targets/fuzz_decode_peer_list.rs"
doc = false
[workspace]
@@ -0,0 +1,7 @@
#![no_main]
use libfuzzer_sys::fuzz_target;
fuzz_target!(|data: &[u8]| {
// decode_peer_list must never panic on arbitrary input.
let _ = donglora_bridge::gossip::decode_peer_list(data);
});
@@ -0,0 +1,7 @@
#![no_main]
use libfuzzer_sys::fuzz_target;
fuzz_target!(|data: &[u8]| {
// GossipFrame::decode must never panic on arbitrary input.
let _ = donglora_bridge::packet::GossipFrame::decode(data);
});