git clone https://github.com/longcipher/onecipher.git
cd onecipher
just setup # install cargo-sort, cargo-shear, nightly toolchain
just build # build the workspace
just test # run unit + integration tests- Fork and create a feature branch from
main - Write code following the existing conventions
- Add tests for new functionality
- Run the full check:
just ci(lint + test + build) - Open a PR against
main
- Formatting:
cargo +nightly fmt(enforced in CI) - Linting:
cargo +nightly clippy -- -D warnings(pedantic + nursery) - Sorting:
cargo sort -w -g(workspace members sorted) - No unused deps:
cargo shear
These invariants are enforced by CI and must never be violated:
- R56:
oc-crypto,oc-policy,oc-keyagent,oc-session-keymust NOT depend ontokio,reqwest,tungstenite,hyper,async-std, orsmol - R12: The release binary must NOT contain TCP-specific symbols
- R51/R52:
oc-cryptomust have zero I/O and zero network dependencies - R55: Key-Agent must use sync
std::thread+std::os::unix::net, NOT tokio
just test # unit + integration tests
just mutants # mutation testing (cargo-mutants)
just test-all # alias for `just test`- Unit tests: colocated with implementation (
#[cfg(test)]) - Property tests:
proptestfor invariant checking - Mutation tests:
cargo-mutantsto verify test quality — surviving mutants indicate gaps that need new tests or stronger assertions
Follow conventional commits:
feat:new featurefix:bug fixrefactor:code change that neither fixes a bug nor adds a featuretest:adding or updating testsdocs:documentation changeschore:maintenance tasksci:CI/CD changes
See SECURITY.md for reporting vulnerabilities. Never commit
secrets, keys, or credentials. Sensitive material must use HardenedBytes
or secrecy::SecretBox — never plain String or Vec<u8>.
By contributing, you agree that your contributions will be licensed under the Apache License 2.0.