Thanks for thinking about contributing. This project is small enough that any contribution is genuinely useful — bug reports, hardware-compatibility confirmations, doc fixes, code.
In rough order:
- Hardware-compatibility reports. If you run
lsi-flash detecton any SAS2008 card, file a hardware compatibility issue with the full output. We use these to fill in the support matrix. Negative reports (it failed, here's the error) are more valuable than positive ones. - Bug reports with reproducible failures. Especially anything that bricked a card — those are P0.
- Code. See below.
- Documentation. The CLI's
--helpoutput, the README, and the architecture docs all benefit from a fresh pair of eyes.
git clone https://github.com/MattJackson/lsi-flash
cd lsi-flash
cargo build # debug build
cargo test # 173+ tests (no hardware required — uses MockIoc)
cargo build --release # release buildFor the production musl static binary:
rustup target add x86_64-unknown-linux-musl
cargo build --release --target x86_64-unknown-linux-muslMSRV: Rust 1.74. CI tests against stable + 1.74 to catch MSRV regressions.
cargo fmtbefore committing — CI enforces thiscargo clippy --all-targets -- -D warnings— CI enforces this too- Comment why, not what. The code should make "what" obvious; "why" is what future-you and reviewers actually need.
- When citing an MPI 2.0 struct field offset or a flash region constant,
include a
file:linecomment to the canonical source (mpi2_ioc.h:N,lsirec.c:N, etc.). The format-reference docs in the notes repo cross-check these.
Four layers (per ADR-010):
- Unit tests — pure functions
- Platform mocks —
MockPlatformfor PCI sysfs - MockIoc — in-memory SAS2008 simulator (covers everything that doesn't
need real hardware, including the entire
flash --dry-runorchestrator) - Real hardware —
RealIocagainst actual cards on a test bench
A PR should keep cargo test green at all four layers it touches.
Hardware-bound tests can include a #[ignore] attribute with a comment
explaining the hardware prerequisite.
- One logical change per PR. Refactors and feature work in separate PRs.
- Commit messages: imperative mood, what + why. Reference issues if applicable.
- No
Co-Authored-By: Claude(or any AI/agent attribution). This is a hard rule. Commits go out under the author's name only. - If the PR touches the flash orchestrator or any destructive code path, include a test that exercises the failure mode you're guarding against.
- If the PR adds support for a new card, include the card's
lsi-flash detectoutput (sanitized SAS WWN if you prefer) and a manifest entry inlsi-flash-firmware.
Anything that writes to flash. The 2026-05-20 dev-1 brick taught us that
chained FW_DOWNLOAD operations + missing verify-after-write can leave the
silicon bootloader in an unrecoverable state. Any PR that adds a code path
which could end up calling MPI_FUNCTION_FW_DOWNLOAD against real hardware
needs explicit review focused on the brick scenario.
(Maintainer note, for future reference.)
- Update
CHANGELOG.md - Bump version in
Cargo.toml git tag -a v0.1.0 -m "..."and push- CI builds the musl release binary and attaches it to the GitHub release
Open a Discussion
(when enabled) or an issue with the question label. There's no Discord/IRC
yet — too small a project.
This project follows the Contributor Covenant. By participating you agree to abide by its terms.