mirror of
https://github.com/luxfi/consensus.git
synced 2026-09-24 00:26:58 +00:00
Seven main packages sat at 0% coverage. Only cmd/consensus reaches a user: .hanzo/workflows/release.yml builds it into the release artifact. The other six were built by a Makefile CI never invokes, or by nothing at all, and nothing in or outside the module imports them. They did not merely go unused, they misreported. bench printed a 30k TPS figure that was the throughput of a failed map lookup, its chain half unable to start at all. checker exited 0 announcing "all health checks passed" while asserting nothing. sim drew from rand and formatted it like a quorum. server asserted its engine to an interface the engine does not implement, so health was a hardcoded true, and it was in no build recipe. conformance printed a 1-of-3 accept as normal. params duplicated cmd/consensus. cmd/consensus keeps only what it can prove. The engine "test" and "health" actions started an engine, printed a check mark and asserted nothing, so they would pass against a Start that does nothing; they are gone along with the stale "not yet implemented" arms for constructors that do exist. What remains is the parameter report, absorbing the -json flag from params. An unknown -network no longer falls back to mainnet. A typo used to print mainnet's K=21 while the operator read it as the network they asked for. Its old test never called a single symbol from main.go: it reimplemented a CLI in the test file, parsed flags main.go does not have, and passed with main.go deleted. Replaced with tests pinned to config, each verified to fail under a deliberate mutation of the code it covers. The .gitignore build-artifact patterns were unanchored, so `consensus` and `bench` matched the cmd/consensus and bench source directories and silently untracked new files in both. Anchored to the root artifacts they meant. Also drops the Makefile and scripts that drove the deleted binaries, the zmq-bench target chain building a cmd/ package absent for many commits, and the E2E server test that can now only ever skip. cmd/consensus: 0.0% -> 100.0% of statements, 1302 lines deleted. Co-authored-by: Hanzo Dev <[email protected]>