Thank you for your interest in contributing. Minigraf is a solo-maintained project with a long-term vision — quality and correctness matter more than pace. Please read this document before opening an issue or pull request.
-
Read PHILOSOPHY.md — understand the core principles before proposing anything. A well-intentioned feature that violates the philosophy (e.g., adds client-server architecture, breaks single-file storage, or adds heavy dependencies) will not be merged.
-
Read ROADMAP.md — check whether your idea is already planned, deferred, or explicitly out of scope.
-
Open an issue first for non-trivial changes — a quick discussion before writing code avoids wasted effort.
- Bug fixes (with a test that reproduces the bug)
- Performance improvements with benchmarks showing the gain
- Documentation improvements and example additions
- Test coverage improvements (especially error-path coverage)
- Cross-platform compatibility fixes (Linux, macOS, Windows, WASM, mobile, language bindings)
- Features that break the single-file storage philosophy
- Client-server architecture or network protocols in core
- Large dependency additions that increase binary size significantly
- Breaking changes to the public API or
.graphfile format without overwhelming justification - Code without tests
- Features only useful for distributed or enterprise systems
# Clone and build
git clone https://github.com/project-minigraf/minigraf.git
cd minigraf
cargo build
# Run all tests
cargo test
# Run a specific test suite
cargo test --test bitemporal_test -- --nocapture
cargo test --test wal_test -- --nocapture
# Run clippy (must be clean before submitting a PR)
cargo clippy -- -D warnings
# Run the interactive REPL
cargo run
# Try the recursive rules demo
cargo run < demos/demo_recursive.txtInstall cargo-llvm-cov (one-time):
cargo install cargo-llvm-covRun branch coverage and open the HTML report:
cargo llvm-cov --branch --openRun branch coverage to check overall project health before submitting a PR.
- No
unsafecode — the crate enforces#![forbid(unsafe_code)]; do not attempt to work around this - No
unwrap()orexpect()in library code paths — use?and typed errors;unwrap/expectare only acceptable in tests and the binary - Every new feature needs tests — unit tests in the relevant
src/module plus integration tests intests/where applicable - Clippy must pass —
cargo clippy -- -D warningsmust be clean - Format your code —
cargo fmtbefore committing - Error handling — Test success and error paths, including relevant invalid input and I/O errors
- Fork the repository and create a feature branch from
main - Write tests for your change before or alongside the implementation
- Ensure
cargo test,cargo clippy -- -D warnings, andcargo fmt --checkall pass - Update
CHANGELOG.mdwith a brief description of your change under anUnreleasedsection - Open a PR with a clear description of what the change does and why
- Reference any related issues in the PR description
Bugs that can lose, corrupt or hide data are handled so that users can always see them before they adopt a release:
- An issue labelled
data-integrity,corruptionordurabilitywhose fix ships in a patch to a published line (such as v2.0.x) stays open until that patch release is published, not just merged. The closing comment links that release. - A fix merged to a development line whose first release has not shipped yet (such as
mainbefore v3.0.0-alpha, orv3before the #937 branch move) closes its issue on merge: no released version of that line has the bug. If the bug also affects a published release, it keeps its entry in the pinned issue, as below. - Every such bug that affects a published release also gets the
known-issuelabel and an entry in the pinned Known issues in the current release issue: affected versions, symptom, workaround and fix version. The entry is removed when the fix ships. - For bugs found downstream, the issue title or body states the affected version range (for example, "v0.6.0 – v2.0.1").
- The README links to the pinned issue from its "Known issues" section.
At release time, the maintainer updates the pinned issue and closes the issues whose fixes are in the release.
tests/golden/ holds database files written by released versions, each with a manifest of the results it must give (#391). See tests/golden/README.md.
- Golden files are never regenerated, only added. CI fails a pull request that modifies, deletes or renames one.
- Every release that changes on-disk behavior (a new format version, a new page or WAL shape, a migration) adds golden files for it, with the recipe in a generator crate under
tests/golden/gen/.
Before submitting, ask yourself:
- Does this keep the single-file philosophy intact?
- Does this maintain zero-configuration?
- Does this add unnecessary complexity?
- Is this needed for embedded use cases (mobile, WASM, desktop)?
- Does this compromise reliability or crash safety?
If you answer "yes" to the last two questions, reconsider. If in doubt, open an issue and discuss first.
Releases are managed by the project maintainer. The process is documented in issue #133 and the
docs/superpowers/specs/ design files. For each release:
- All prerequisite issue PRs merged and CI green
- Core version bumped in its release manifests. Binding workflows derive their package versions and core dependency pins from the dispatched tag after core publication, using each ecosystem's spelling.
cargo check --workspacepasses cleanly- All affected docs synced (see
CLAUDE.md— "Keep documentation synchronized") - From a clean checkout of the final candidate commit, run
cargo publish --dry-run --lockedbefore creating the tag. Record the commit SHA and result in the release issue; a failure must be resolved before tagging.Cargo.lockis currently untracked, so this check does not establish that CI and publishing used the same dependency resolution. - Confirm successful push runs of Rust, WASM, Lint, Coverage Gates, Policy and Binary Size on that exact SHA. A successful PR run or a run on an earlier commit is insufficient. Workflows absent from the candidate branch are skipped; a present workflow with no successful latest push run blocks the cascade.
- Push the version tag, including the prerelease suffix when applicable (for example,
v3.0.0-alpha). After Release succeeds, Release Cascade validates the official tag-push run and its commit, checks CI, then waits up to 60 minutes for the exact, unyanked crate version in the Cargo sparse index before dispatching bindings. - Publish every binding, including Tier 2, at the matching core version. Use the registry’s version spelling for prereleases. A binding that cannot publish blocks the release until the problem is fixed or a retry succeeds (see support tiers).
- Known-issues issue updated, and
data-integrity/corruption/durabilityissues fixed by this release closed with a link to it (see above) - For a minor or major release: the performance envelope re-run and the snapshot in
docs/BENCHMARKS.mdand the README refreshed (cargo run --profile envelope --example perf_envelope; see Reproducing)
Release uses cargo-dist's local-artifacts-jobs hook to run Release Gate. Failed or cancelled CI on the tagged commit blocks GitHub hosting and crates.io publishing. The gate records the accepted run URLs in its log; after CI succeeds, retry the failed Release run. To update release automation, edit dist-workspace.toml and the reusable workflows, then run dist generate --mode ci and dist generate --mode ci --check with the pinned cargo-dist version. Do not edit release.yml by hand.
Release Cascade must be installed on the default branch (main, the 3.x line since #937), even when the tag is created from v2.x. For recovery after a partial binding release, run gh workflow run cascade.yml --ref main -f tag=v3.0.0-alpha with the published tag. This re-dispatches all seven bindings; it requires a successful official Release run for the tag's current commit and passing CI. The dispatch contract remains core-release with client_payload.version set to the full tag.
The cascade waits for the exact unyanked crate in the Cargo sparse index again before dispatching. It sends the seven requests sequentially and stops on an error; a green cascade confirms dispatch, not downstream publication. Check every binding's release and exact-version registry consumer results before declaring the release complete.
Binding recovery follows the binding release routing design. After #937, the default-branch workflow routes 3.x to main and 2.x to v2.x, with no fallback. To retry just one binding, run gh workflow run release.yml --ref main -f version=<full-tag> in that binding's repository. Do not dispatch its maintenance-branch workflow or delete a tag to retry.
An existing binding source tag (Swift: source-<full-tag>) selects the original tested prepared commit, even if the source branch has advanced. Recovery requires that commit to remain in the selected line and retain the exact core dependency and provenance. It authenticates the original run's retained evidence and artifact digests, accepts matching published files, and uploads only missing original bytes (or a byte-identical rebuild). Swift also retains its generated SemVer tag and the original zip checksum. A conflicting digest, unavailable original evidence, or a tag without the evidence pointer fails closed; investigate the conflict without deleting or moving public tags or replacing published files. The binding workflows request 90-day evidence retention, subject to repository policy; preserve those runs and artifacts throughout recovery. If nothing has been published and no binding source tag exists, the retry prepares and tests from the current source head again.
Repeating the cascade is safe for bindings that already finished: each resumes at the same tested identity, uploads nothing, repairs channels or release classification when needed, and re-runs its exact-version registry consumer. It is not a blind skip of an existing version. Recovery succeeds only after that verification passes; publication, verification and resume failures retain release-broken reporting.
This project follows the Contributor Covenant Code of Conduct. By participating, you agree to uphold it.