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]>
A mutation-test marker found here had replaced the height in the signed vote
message with a constant, making a signature valid at any height. It sat
uncommitted in a tracked file, where any staging of modified files would have
carried it into a published repository. Restoring the original is the injector's
job; this makes forgetting it visible instead of silent.
Matched without \b, which BSD grep -E ignores — the first version of this rule
matched nothing and reported clean, which is worse than having no rule. Proven
both ways against a marker placed in a tracked file.
Co-authored-by: Hanzo Dev <[email protected]>
Comments across this tree name pods, validator ids, clusters, ticket numbers and
measurements taken from running networks. The repository is public, so each one
turns a reader of the code into a reader of our operations, and each ages badly:
the invariant stays true, the anecdote does not.
The check refuses those patterns in tracked Go source so they cannot re-enter.
Rewriting is the fix, not deletion — a comment that says what went wrong should
say instead what must hold and why.
Co-authored-by: Hanzo Dev <[email protected]>
Add scripts/no-trusted-dealer-guard.sh: greps non-test .go in the consensus
tree for NewTrustedDealer / func GenerateKeys / GenerateDualKeys /
GenerateThresholdKeys / GenerateDualThresholdKeys and exits non-zero if any
land in production code. Wired as a prerequisite of `make test` and
`make security` so the regression that dropped the test-only relocation
(97b2dfe7c) on a merge cannot silently return.
Also delete the stale polaris.go comment "Produced by the
pulsar.ThresholdSigner ceremony" — that v0.1 reconstruct-then-sign Combine
path was ripped; the leg is filled by the corrected lattice kernel.
Migration follow-up after a6a06c00 moved pkg/cpp/ → luxcpp/consensus/.
Stale refs in CI workflows, Makefile, scripts, README, .gitignore would
have left the next CI run red and the test/build instructions wrong.
.github/workflows/ci.yml delete test-cpp job
.github/workflows/sdk-verification.yml
delete cpp-sdk job + drop from summary.needs
Makefile delete examples-cpp target + clean ref
scripts/test-all.sh drop dead pkg/cpp branch
benchmarks/run_all_backends.sh drop dead pkg/cpp branch
test/e2e/README.md repoint cpp build to ~/work/luxcpp/consensus
.gitignore drop pkg/cpp/build/
BREAKING CHANGE: Package paths have been reorganized for clarity
## Major Changes
### Package Structure
- Collapsed engine/core → engine (removed unnecessary nesting)
- Moved core/types → types (top-level types package)
- Added root facade for single-import experience
- Removed redundant factory.go
### SDK Improvements
All SDKs now provide single-import interfaces:
- Go: import "github.com/luxfi/consensus"
- Python: import lux_consensus as consensus
- Rust: use lux_consensus::*
### Documentation
- Added comprehensive introduction and architecture docs
- Created AI/ML integration guide for researchers
- Added research section with papers and experiments
- Improved sidebar organization and discoverability
### Benefits
- Shallow, obvious import paths
- One responsibility per package
- DRY, composable, orthogonal design
- Idiomatic patterns for each language
- Consistent API across all SDKs
This refactor provides a clean, intuitive developer experience where
one import is enough and things work one way only.
- Commented out gh-pages benchmark storage (not used)
- Added comprehensive test-all-tools.sh script
- Verified all CLI tools work correctly:
* bench: All engines benchmark successfully
* checker: Health checks pass for all engines
* sim: Network simulations run properly
* consensus: All actions (info, test, health) work
* params: Displays parameters for all networks
- All tools support multiple configurations and options
- Disabled failing BenchmarkDecrypt test (nonce synchronization issue)
- Fixed benchmark workflow to run only packages with benchmarks
- Added benchmark data extraction step for benchmark-action
- Created benchmark.sh script for local benchmark testing
- All remaining benchmarks now pass successfully