Contributing

This page covers how a change gets into SynergyDB: the branch and commit conventions, the checks to run before a pull request, the make targets, and the status-entry convention in docs/status/. It describes main at 8a689c5c (2026-11-30). Paths in source pointers are relative to the repository root.

CONTRIBUTING.md predates most of the current tree. Where it and the code disagree, this page follows the code and says so.

Licence and upstream

CONTRIBUTING.md describes a fork-and-pull-request workflow with an upstream remote on GitHub (source: CONTRIBUTING.md, "Fork and Clone"). The README.md licence section says the software is proprietary, with no rights granted without a separate written agreement (source: README.md, "License"; Cargo.toml, license-file). Check with the project owner before treating the fork workflow as open to outside contributors.

The upstream organisation named in CONTRIBUTING.md differs from the one used in README.md. Use the remote your team gives you rather than either file's example (source: CONTRIBUTING.md, "Fork and Clone"; README.md, "From source").

The repository snapshot has no .github/ directory, so no PR template, CI workflow or code-owner file is checked in (source: repository root listing). Not verified: whether CI runs on pull requests and which checks it requires.

Prerequisites

Need Detail Source
Rust CONTRIBUTING.md asks for 1.75 or later. There is no rust-version key or toolchain file. See Building for what the build actually needs. CONTRIBUTING.md, "Prerequisites"; Cargo.toml
Git and a GitHub account For the fork workflow CONTRIBUTING.md, "Prerequisites"
Docker and Python 3.10+ Only for the proof pack and the differential suites prove/README.md

Workflow

flowchart LR A["Branch from main"] --> B["Change code and add a regression test"] B --> C["cargo fmt, clippy, test"] C --> D["Run the gates that cover the change"] D --> E["Add one docs/status entry"] E --> F["Open the pull request"]

Branches

Branch names take a prefix by kind of change: feature/, fix/, docs/, refactor/ or test/, followed by a short description, for example feature/add-redis-migration (source: CONTRIBUTING.md, "Branch Naming").

Commit messages

Commits use the conventional-commit form type(scope): description, with an optional body and footer. The types are feat, fix, docs, style, refactor, test and chore. A footer such as Closes #123 or Fixes #456 links an issue (source: CONTRIBUTING.md, "Commit Messages").

Size

One feature or fix per pull request. Split large changes (source: CONTRIBUTING.md, "Keep Changes Focused"). The status convention below enforces the same thing from the other side: one entry per change.

Checks before a pull request

CONTRIBUTING.md lists these, in order, after rebasing on the upstream main (source: CONTRIBUTING.md, "Before Submitting"):

Check Command Notes
Formatting cargo fmt -- --check No rustfmt.toml is checked in, so the defaults apply (source: repository root listing)
Lints cargo clippy cargo clippy --features full also lints the feature-gated code (source: CONTRIBUTING.md, "Linting")
Tests cargo test Runs unit and integration tests. See Testing for narrower commands

The status entries show what changes are actually checked against in practice. In the 2026-11-30 entries, cargo test --lib with pass, fail and ignore counts is by far the most common gate, followed by the differential suite of each wire the change touches (for example the PG 16, SQL Server, Oracle and Snowflake suites) and, in a few entries, cargo fmt --check. The template's own example also lists the feature matrix (source: docs/status/README.md, "Template"; docs/status/2026-11-30-*.md, "Gates run"). Run the gates that cover what you changed:

Changed Gates that cover it Where described
Engine, storage, SQL cargo test --lib; the PostgreSQL differential suite; the feature matrix Testing
One wire That wire's suite through make prove-quick ARGS='--wires <key>' Testing
Auth or a pre-authentication path cargo test --test wire_preauth_gate; the real-auth suites Testing
Performance-sensitive code The relevant cargo bench target, or make bench ARGS='--wires <key>' Benchmark harnesses

STATUS.md also lists smoke checks to run on changes, including the ORM batteries and the concurrent-transaction script under test-scripts/ (source: STATUS.md, "Test invariants for next session"). Not verified: those ORM battery directories are not in the snapshot, so their current expected counts cannot be checked here.

Make targets

The Makefile has five targets. All but build drive the proof pack in prove/ (source: Makefile).

Target Runs Use it for
make build cargo build --release --features full with release debug info off A release binary with every optional feature
make prove prove/prove.sh $(ARGS) Every wire against its reference database, plus throughput
make prove-quick prove/prove.sh --skip-bench $(ARGS) Correctness only
make prove-report prove/prove.py --report-only prove/out/latest/results.json in the pack's virtualenv Re-render the last report
make bench prove/prove.sh --bench-only $(ARGS) Throughput only

ARGS passes options through to prove.py, for example --wires postgres,mysql (source: Makefile; prove/prove.py, main). The full option list is on Testing.

Coding conventions

From CONTRIBUTING.md, "Coding Standards", checked against the code:

  • Errors. Library code returns crate::error::Result with the crate's Error type. CONTRIBUTING.md shows Error::InvalidArgument as an example variant, and it exists (source: CONTRIBUTING.md, "Error Handling"; src/error.rs, Error).
  • Async. Network and I/O code runs on Tokio. Protocol handlers implement the async_trait trait ProtocolHandler (source: CONTRIBUTING.md, "Async Code"; src/protocol/mod.rs, ProtocolHandler).
  • Tests next to code. Unit tests sit in a #[cfg(test)] mod tests in the same file; integration tests go in tests/ (source: CONTRIBUTING.md, "Testing Guidelines").
  • Regression tests. Fixes in the status entries come with a test named for the behaviour they protect (source: docs/status/2026-11-24-statement-snapshot.md; src/query/engine.rs, sum_over_concurrent_transfers_sees_whole_transactions).
  • Environment toggles in tests. A test that sets SYNERGYDB_DEV_INSECURE_AUTH holds lock_dev_insecure_auth_env() (source: src/lib.rs, lock_dev_insecure_auth_env).

Stale examples in CONTRIBUTING.md

Some code samples in CONTRIBUTING.md no longer compile against the current API. Use the real signatures:

Sample in CONTRIBUTING.md Current API Source
storage.get(b"key", u64::MAX) get(&self, key: &[u8], timestamp: Option<Timestamp>), so pass None for the latest value src/storage/mod.rs, StorageEngine::get
storage.put(b"key", b"value", 1) put(&self, key: &[u8], value: &[u8], timestamp: Timestamp); matches src/storage/mod.rs, StorageEngine::put
HnswIndex::new(128, DistanceMetric::Cosine, 16, 200) HnswIndex::new(dimension, metric); graph parameters go through HnswIndex::with_params src/index/hnsw.rs, HnswIndex::new, HnswIndex::with_params

Recording status: docs/status/

Since 2026-11-24 each change records what it did in its own file under docs/status/. Before that, every PR prepended a block to STATUS.md and edited the pass-rate lines at the top of CLAUDE.md, so every merge conflicted with every other open branch (source: docs/status/README.md; STATUS.md, header).

The rule

  • A feature or fix PR adds exactly one new file in docs/status/. It does not edit STATUS.md or the top of CLAUDE.md (source: docs/status/README.md, "The rule").
  • The file name is YYYY-MM-DD-<topic>.md: the date the work was verified, then a short kebab-case topic. On a name collision, add a suffix such as -2 (source: same).
  • Never edit someone else's entry. Write a new one that supersedes it and say so (source: same).
  • Roll-ups fold entries into STATUS.md sections ("Current pass rates (baseline)", "What works", "What's still broken") in a PR that changes nothing else. The entries stay as history, and the roll-up notes the newest entry it covered (source: same).

The template

# <What changed, in one line>

Date: YYYY-MM-DD · Branch: <branch> · PR: #<n>

## What changed
## Capability shift
## New bugs or gaps found
## Gates run
| Gate | Result | Notes |
|---|---|---|

"Gates run" lists every gate you ran, with its number, and says which gates you did not run. "None" is an acceptable answer under "Capability shift". "New bugs or gaps found" records what you noticed but did not fix, so it is not lost (source: docs/status/README.md, "Template").

Reading status

The newest entries are more recent than the STATUS.md baseline. Sort the directory by name to read them in order (source: docs/status/README.md, "The rule"). The snapshot holds 194 entries dated 2026-11-24 to 2026-11-30 (source: listing of docs/status/). The session log that STATUS.md carried from 2026-05-08 to 2026-11-23 is kept in docs/status/archive/session-log-2026-05-08-to-2026-11-23.md (source: docs/status/README.md, "Archive").

Two documents still describe the old arrangement:

  • README.md's repository map describes STATUS.md as "Engineering log, newest session first", which is the pre-2026-11-24 role (source: README.md, "Repository map").
  • STATUS.md and docs/status/README.md refer to pass-rate lines at the top of CLAUDE.md, which is not in the snapshot (source: repository root listing).

Documentation changes

CONTRIBUTING.md asks for README.md updates for user-facing changes and docs/ updates for detail (source: CONTRIBUTING.md, "README and Docs"). A change to a wire usually also touches its scorecard row in README.md, its entry in prove/wires.py (including the gaps list the proof report prints) and, when the pass count moves, prove/ci-baseline.json (source: README.md, "Wire scorecard"; prove/wires.py, Wire; prove/gate.py, main). See Adding a wire.

Issues

Bug reports should give the SynergyDB version, Rust version, operating system, steps to reproduce, expected and actual behaviour, and logs. Feature requests should give the use case, proposed solution, alternatives and whether you will implement it. Labels: bug, enhancement, documentation, good first issue, help wanted, question (source: CONTRIBUTING.md, "Issue Guidelines").

Related pages