Testing
This page describes every layer of testing in the repository at main 8a689c5c (2026-11-30): Rust unit tests, Rust integration tests, the differential harnesses that compare SynergyDB with the real databases it emulates, and the proof pack (make prove) that runs those harnesses wire by wire and writes the report in docs/proof/. Benchmarks are on Benchmark harnesses and load and soak testing on Load and soak testing.
Layers at a glance
| Layer | Where | Needs | How to run | What it proves |
|---|---|---|---|---|
| Unit tests |
#[cfg(test)] modules in src/
|
Rust | cargo test --lib |
Function and module behaviour, many engine regression tests |
| Integration tests | tests/*.rs |
Rust | cargo test --test <file> |
Storage, recovery, concurrency, security and each wire's handler, through the public crate API |
| Shell checks | tests/*.sh |
A running server, psql and other clients |
bash tests/<script>.sh |
Ad hoc smoke runs (see below) |
| Differential suites |
test-scripts/diff*/, feature-matrix/, wire-matrix/
|
A running SynergyDB, the reference database in Docker, Python drivers | Per suite, or through the proof pack | Same answers, errors, isolation and durability as the real database |
| Proof pack | prove/ |
Docker, Python 3.10+, Rust or a prebuilt binary |
make prove, make prove-quick
|
All of the above per wire, plus throughput, in one report |
(source: CONTRIBUTING.md, "Running Tests"; prove/README.md; README.md, "How we prove a wire")
Unit tests
Size and current counts
A search of src/ finds about 2,600 #[test] and #[tokio::test] attributes in 297 files that have a #[cfg(test)] module, and 8 #[ignore] attributes (source: search of src/**/*.rs). That count includes tests in modules compiled only with non-default features, such as the migrate-* connectors and aws-kms, so it is higher than what a default cargo test --lib runs.
STATUS.md records a baseline of 2173 passed, 0 failed, 5 ignored for cargo test --lib on main 2026-11-24. The status entries dated 2026-11-30 report between 2,445 and 2,545 passed with 5 ignored on their branches. Per the status convention, the entries are the more recent figure (source: STATUS.md, "Current pass rates (baseline)"; docs/status/2026-11-30-*.md, "Gates run").
Running them
| Goal | Command | Source |
|---|---|---|
| All library tests | cargo test --lib |
CONTRIBUTING.md; docs/status/README.md, template |
| One module |
cargo test --lib storage:: (any module path prefix) |
CONTRIBUTING.md, "Running Tests" |
| One test, with output | cargo test <name> -- --nocapture |
CONTRIBUTING.md |
The form STATUS.md uses as a smoke check |
timeout 600 cargo test --lib -- --test-threads=4 |
STATUS.md, "Test invariants for next session" |
STATUS.md notes a rare storage-teardown flake (about one in five full runs) and, on Windows, an "Access is denied" file lock on a Raft snapshot test under concurrent runs. Both pass when run alone. Neither is resolved there (source: STATUS.md, "Current pass rates (baseline)").
Conventions in the code
-
Tests that toggle
SYNERGYDB_DEV_INSECURE_AUTHholdlock_dev_insecure_auth_env()fromsrc/lib.rs, a process-wide mutex that recovers from poisoning, so parallel tests in one binary do not see each other's setting (source:src/lib.rs,lock_dev_insecure_auth_env). -
Crypto crates are optimised in debug builds (
opt-level = 3forsha2,hmac,pbkdf2,digest,aes,aes-gcm,ghash). The comment says PBKDF2 tests timed out under coverage without it (source:Cargo.toml,[profile.dev.package.*]). See Building. -
A fix comes with a regression test named for the behaviour. For example, the statement-snapshot fix added
sum_over_concurrent_transfers_sees_whole_transactionsinsrc/query/engine.rs, which runs transfer sessions and SUM sessions against a 64 KB memtable (source:src/query/engine.rs,sum_over_concurrent_transfers_sees_whole_transactions;docs/status/2026-11-24-statement-snapshot.md).
Integration tests
tests/ holds 56 Rust test files, the shared tests/protocol_helpers/mod.rs module and three shell scripts (source: tests/). Each .rs file is a separate test crate that links synergydb as a library, so run one with cargo test --test <file stem>. Dev-dependencies are criterion, tempfile, proptest and tokio-test (source: Cargo.toml, [dev-dependencies]).
Shared helpers
tests/protocol_helpers/mod.rs is pulled in with mod protocol_helpers; by the files that use it (source: tests/protocol_helpers/mod.rs; for example tests/load_stress.rs).
| Helper | What it does |
|---|---|
test_config(dir) |
A StorageConfig under dir/data and dir/wal with a 1 MB memtable, 4 KB blocks, no compression, WalSyncMode::EveryWrite, 4 memtables, 7 levels, level ratio 10 |
open_storage(config) |
Opens the engine, retrying Error::LockNotAvailable for up to 5 s (a previous engine's Redis fsync thread can hold the directory for up to a second), then writes a warmup key at timestamp 0 |
setup_full() |
Temp dir, storage and a QueryEngine in one call |
exec, select, assert_row_count
|
Run SQL through QueryEngine and check results |
new_redis_executor, redis_cmd, assert_resp_*
|
Drive the Redis CommandExecutor without a socket |
new_mongo_dispatcher, mongo_insert_cmd, mongo_find_cmd, assert_mongo_*
|
Drive the MongoDB CommandDispatcher without a socket |
make_timeseries, name_matcher
|
Prometheus test data |
measure, assert_throughput, run_concurrent
|
Timing and thread fan-out for the load and performance files |
truncate_last_wal_bytes, corrupt_wal_crc
|
Damage WAL files on disk for recovery tests |
write_temp_csv, write_temp_json
|
Input files for migration tests |
(source: tests/protocol_helpers/mod.rs)
tests/wire_preauth_gate.rs deliberately does not use the shared module, so a change to the shared storage config cannot stop the security regression suite from compiling (source: tests/wire_preauth_gate.rs, comment above test_storage).
Files by area
Counts are #[test] plus #[tokio::test] attributes per file (source: search of tests/*.rs).
| Area | Files (tests) |
|---|---|
| Storage, WAL and recovery |
crash_recovery_test.rs (28), proptest_storage.rs (9, property tests with proptest), memtable_rotation_race.rs (2), wal_frame_equivalence.rs (1), size_amp_compaction.rs (2), replace_range_bulk.rs (2), drop_table_batched.rs (1), truncate_fast.rs (5), upgrade_path.rs (20) |
| At-rest encryption |
at_rest_encryption.rs (5), at_rest_plaintext_control.rs (1, the negative control), at_rest_manifest_tamper.rs (1), at_rest_manifest_upgrade.rs (1) |
| Concurrency and failure |
concurrency.rs (28), failure_modes.rs (25), chaos_engineering_test.rs (16), distributed_raft_test.rs (13) |
| SQL engine and persistence |
persistence_query_parity_test.rs (58), integration_showcase.rs (16), copy_bulk_parity.rs (9), copy_wire_atomic.rs (3), pg_class_reltuples.rs (1), embeddings_test.rs (8) |
| Wires |
protocol_redis.rs (178), protocol_mongodb.rs (94), protocol_elasticsearch.rs (89), protocol_gremlin.rs (83), protocol_postgres.rs (65), protocol_prometheus.rs (63), protocol_s3.rs (53), protocol_sqlite.rs (52), protocol_command_test.rs (44), protocol_bolt.rs (39), protocol_mysql.rs (37), protocol_cassandra.rs (36), protocol_arrow.rs (34), protocol_dynamodb.rs (31), protocol_mssql.rs (31), protocol_clickhouse.rs (30), protocol_oracle.rs (29), protocol_grpc.rs (25), protocol_memcached.rs (20), protocol_http.rs (19), protocol_snowflake.rs (16), protocol_matrix.rs (16, cross-wire reads), protocol_kafka.rs (13), protocol_schema_registry.rs (6), protocol_couchdb.rs (5), protocol_influxdb.rs (2), protocol_coverage.rs (1) |
| Security |
security_auth.rs (61), wire_preauth_gate.rs (14) |
| Migration |
migration_import.rs (58) |
| Load and performance |
load_stress.rs (21, 2 ignored), perf_baseline.rs (30), large_data.rs (19, 3 ignored) |
Notes on specific files:
-
wire_preauth_gate.rsseeds a table holding a unique secret, opens a raw socket that skips the handshake and asserts that the wire refuses the request and that the secret never appears in the bytes sent back. It removesSYNERGYDB_DEV_INSECURE_AUTHfirst, so it tests fail-closed behaviour. Its tests cover SQL Server, Oracle, Schema Registry, Kafka, ClickHouse native, CouchDB and several MongoDB commands, not every wire (source:tests/wire_preauth_gate.rs). -
protocol_coverage.rsmeasures "depth" as the share of a reference command list found by a case-insensitive substring scan of each wire's source, with runtime probes only for Redis and MongoDB. It is a presence heuristic, not a behaviour test (source:tests/protocol_coverage.rs, module doc). -
protocol_couchdb.rs,protocol_kafka.rsandprotocol_schema_registry.rsrun the real handler on a TCP port. Most otherprotocol_*files drive command executors in process (source: module docs of those files;tests/protocol_helpers/mod.rs). -
embeddings_test.rsis the only integration test that depends on a feature (rest-api, on by default) (source:tests/embeddings_test.rs; Building). - The ignored tests in
load_stress.rsandlarge_data.rsrun withcargo test --test <file> -- --ignored(source:tests/load_stress.rs;tests/large_data.rs, module docs).
Shell scripts in tests/
| Script | What it does | Source |
|---|---|---|
comprehensive_test.sh |
Feature checks over the PostgreSQL, MySQL, MongoDB and Bolt wires against an already running server (default ports 5435, 3308, 27019, 7689) | tests/comprehensive_test.sh |
full_protocol_test.sh |
DDL, DML, joins, CTEs, window functions, transactions, vector and full-text search, graph queries, over several wires | tests/full_protocol_test.sh |
stress_100_stage.sh |
Runs full_protocol_test.sh, then 100 stages of psql inserts, counter updates, rotating SELECT shapes and deletes. See Load and soak testing
|
tests/stress_100_stage.sh |
Not verified: no status entry, README section or CI file in the snapshot runs these scripts or records a result, so their current pass state is unknown (source: search of docs/status/, README.md, STATUS.md).
Differential harnesses
The project measures wire correctness by sending the same commands to SynergyDB and to the real database, through the client drivers applications use, and comparing the answers (source: README.md, "How we prove a wire"; prove/README.md).
Snapshot scope. The snapshot this page was written from contains test-scripts/diff/ (PostgreSQL), feature-matrix/, wire-matrix/, wire-diff/ (reference container scripts and run.sh), cross-model-acid/ and cluster/. The other suites that prove/wires.py calls (diff-mysql/, diff-mongo/, diff-cypher/, diff-redis/, diff-memcached/, diff-cassandra/, diff-clickhouse/, diff-influxdb/, diff-gremlin/, diff-dynamodb/, diff-elasticsearch/, diff-s3/, diff-kafka/, diff-kafka-retention/, diff-schema-registry/, diff-couchdb/, diff-mssql/, diff-oracle/) and their shared test-scripts/wire_diff_common.py are not in it. Those suites are described here only from how prove/wires.py invokes and scores them and from their committed logs (source: prove/wires.py, WIRES; docs/proof/2026-11-30/proof-pack-a3232c9/logs/).
The three phases
| Phase | Name in suite output | What it does |
|---|---|---|
| One connection |
single, phase 1, phase query
|
The suite's corpus on one connection: rows, column types, ordering, NULLs, error codes |
| Second connection |
cross, phase 2, [conn2], SECOND-CONNECTION PHASE
|
One connection writes, an independent one reads, blocks or conflicts: visibility, isolation levels, locks, unique conflicts, concurrent increments |
| Restart |
durable, phase 3, RESTART PHASE
|
Data is written, SynergyDB is killed with SIGKILL and restarted, the reference gets a normal restart, then a fresh connection re-reads everything |
(source: prove/README.md, "What matches means"; test-scripts/wire-diff/README.md; prove/wires.py, phases regexes)
Suites receive the restart as a shell command. The proof pack passes bash prove/sdb.sh restart for SynergyDB, which sends kill -9 and starts the binary again on the same data directory, and docker restart <container> followed by a readiness wait for the reference (source: prove/prove.py, fill; prove/sdb.sh, restart). PROVE_RESTART=graceful sends SIGTERM and waits up to 30 s instead (source: prove/sdb.sh, stop_graceful).
Errors compare by code (SQLSTATE, MySQL errno, ORA-, CQL error code) and not by message. Values that legitimately differ per server (timestamps, generated ids, revision hashes, request ids) are normalized, and each suite documents what it ignores (source: prove/README.md, "What matches means").
PostgreSQL: diff_harness.py
test-scripts/diff/diff_harness.py applies the same schema and seed (schema.py) to both servers, then runs every query in corpus.py on each and compares typed results (source: test-scripts/diff/diff_harness.py, module doc and main).
-
Defaults. SynergyDB on port 5499, PostgreSQL on 5433. Override with
--synand--pgDSNs orSYN_DSNandPG_DSN. -
Ordering. Queries without a top-level
ORDER BY(the corpus entry has noordered: True) are sorted canonically on both sides before comparison. -
Values. Floats compare with relative and absolute tolerance
1e-9.Decimalcompares by exact value, so50.0equals50.00. An integer equal to aDecimalmatches but is taggedMATCH_SOFT. -
Types. Result column type OIDs must equal PostgreSQL's, because drivers decode by OID.
--no-typesturns this off. - Errors. Both servers erroring counts as a match, with SQLSTATE noted. One erroring is a divergence.
-
Categories.
MATCH,MATCH_SOFT,BOTH_ERROR,SYNERGY_ERROR_PG_OK,SYNERGY_OK_PG_ERROR,COLCOUNT,MISSING_ROWS,EXTRA_ROWS,WRONG_TYPE,WRONG_VALUE. A wrong type OID is reported before value differences. -
Flags.
--verboseprints matches,--only <id>runs one query,--no-setupreuses existing tables,--strictexits 1 on any divergence. -
Output. One
[OK ...]or[XX <category>]line per query, a list of setup and query divergences, and the summary lineDIFFERENTIAL PASS RATE: n/m.
(source: test-scripts/diff/diff_harness.py, values_equal, compare_results, main; test-scripts/diff/corpus.py, module doc)
The corpus size is 279 queries in the proof run, which matches the step note in prove/wires.py. prove/README.md still says 217, and STATUS.md 217/217 at its 2026-11-24 baseline (source: docs/proof/2026-11-30/proof-pack-a3232c9/logs/postgres-query-corpus.txt; prove/wires.py, postgres note; prove/README.md).
PostgreSQL: phases_pg.py
test-scripts/diff/phases_pg.py adds the second-connection and restart phases. Each scenario runs on both servers and the observations must be equal (source: test-scripts/diff/phases_pg.py).
Second-connection scenarios (MULTI_CONN): autocommit_visible, uncommitted_invisible, rollback_invisible, read_committed_sees_commit, repeatable_read_snapshot, unique_conflict_waits_then_23505, concurrent_increments_no_lost_update, row_lock_nowait_55P03, serializable_write_skew_40001, ddl_seen_by_other_session, sequence_shared_currval_private, temp_table_private, prepared_statement_per_session, settings_per_session. Output lines are [OK] or [DIFF], then PG SECOND-CONNECTION PHASE: n/14.
Restart phase:
- Creates typed tables (13 column types including
numeric,jsonb,bytea,uuid,int[]), an index, a unique column, a foreign key, aCHECK, a view, a sequence advanced three times and a 5,000-row table with deletes and updates. - Opens a transaction that inserts two rows and is never committed.
- Reads 11 queries before the restart, runs
--restart-cmdand--ref-restart-cmd, waits up to 180 s for each server, reads them again. - Each read must equal the reference after its restart and SynergyDB's own pre-restart answer (the uncommitted rows must be gone).
-
nextvalafter the restart must be greater than every value handed out before (a crash may skip ahead, never reuse). - Nine statements after the restart: primary key, unique, foreign key,
CHECKandNOT NULLviolations compared by SQLSTATE, and a write, an update and their reads.
That is 21 checks, reported as PG RESTART PHASE: n/21. Without --restart-cmd the restart phase is skipped (source: test-scripts/diff/phases_pg.py, RESTART_SETUP, RESTART_READS, RESTART_AFTER, phase_restart, main).
Feature matrices
| Harness | Scope | Classification | Score line |
|---|---|---|---|
test-scripts/feature-matrix/feature_matrix.py |
One self-contained scenario per PostgreSQL feature, against PostgreSQL 16 |
PARITY, DIVERGE, UNSUPPORTED, PG-ONLY (plus setup failures) |
FEATURE PARITY (all features) and FEATURE PARITY (fair rate); the proof pack reads the first |
test-scripts/wire-matrix/<wire>_matrix.py on wirematrix.py
|
ClickHouse, Cypher, Elasticsearch, InfluxDB, Memcached, MongoDB, MySQL, Redis |
PARITY, DIVERGE, UNSUPPORTED, SYN-ONLY, BOTH-ERROR
|
FEATURE PARITY (fair), which is PARITY / (total - BOTH-ERROR)
|
(source: test-scripts/feature-matrix/feature_matrix.py, module doc and summary print; test-scripts/wire-matrix/wirematrix.py, classify, report; prove/wires.py, FAIR)
The five suites with real authentication
The S3, Kafka, CouchDB, SQL Server and Oracle suites start their own SynergyDB through test-scripts/wire-diff/run.sh with real authentication (no dev bypass), provision the logins the references use, and write per-probe results to /tmp/synergydb_wirediff-<suite>.json. Their phases are single, cross and durable. LocalStack keeps nothing across restarts and does not check signatures, so the S3 reference is not restarted and its signature probes compare against AWS's documented answer (source: test-scripts/wire-diff/README.md). The committed S3 log shows those notes ("compared against the documented answer") above its summary S3: 151/151 match (single 132/132, cross 5/5, durable 14/14) (source: docs/proof/2026-11-30/proof-pack-a3232c9/logs/s3-s3-diff.txt).
refs-core.sh and refs.sh start the reference containers by hand. Benchmarks and reproduction has the manual procedure (source: test-scripts/wire-diff/refs-core.sh, refs.sh).
The proof pack: make prove
Make targets
| Target | Runs | Source |
|---|---|---|
make build |
CARGO_PROFILE_RELEASE_DEBUG=0 cargo build --release --features full |
Makefile |
make prove |
prove/prove.sh $(ARGS): every wire, correctness and throughput |
Makefile |
make prove-quick |
prove/prove.sh --skip-bench $(ARGS): correctness only |
Makefile |
make prove-report |
prove/.venv/bin/python prove/prove.py --report-only prove/out/latest/results.json |
Makefile |
make bench |
prove/prove.sh --bench-only $(ARGS): throughput only |
Makefile |
prove.sh
prove/prove.sh checks that Docker is installed and its daemon reachable, and that Python is 3.10 or later (PYTHON3 overrides the interpreter). Unless SDB_BIN is set it builds target/release/synergydb with --features full (skip with PROVE_NO_BUILD=1). It creates prove/.venv (or PROVE_VENV) and installs prove/requirements.txt when that file is newer than the venv's marker. It removes any leftover container whose name starts with ref-, then execs prove/prove.py with its arguments (source: prove/prove.sh).
prove/requirements.txt pins the client drivers, including kafka-python>=2.0,<3 (3.x changed the admin API the Kafka suite uses) and gremlinpython>=3.7,<3.8 (the 3.8 client sends a request that 3.7 servers reject) (source: prove/requirements.txt).
prove.py control flow
(source: prove/prove.py, run_wire, main)
The report is rewritten after every wire, so a partial report is on disk if a run stops part way (source: prove/prove.py, main, comment on report.render).
| Option | Default | Effect |
|---|---|---|
--wires |
all |
Comma list of wire keys; unknown keys are an error |
--skip-bench |
off | Correctness only |
--bench-only |
off | Throughput only; with --update, keeps the correctness results and replaces only throughput rows |
--bench-secs |
10 | Seconds per throughput workload |
--bench-threads |
8 | Client threads for same-client workloads |
--bench-clients |
1,8 |
pgbench and sysbench client counts |
--pg-scale |
10 | pgbench scale factor |
--keep-refs |
off | Leave reference containers running |
--out |
prove/out/<UTC timestamp> |
Output directory; without it prove/out/latest is pointed at the new run |
--update DIR |
none | Rerun the selected wires into DIR/results.json, keep the rest, record them in env.rerun
|
--report-only FILE |
none | Re-render report.md and report.html from a results.json
|
(source: prove/prove.py, main)
Each step runs through the shell with a per-step timeout: 1,800 s by default, 2,400 s for the five real-authentication suites, Cassandra and Schema Registry, 1,200 s for the Kafka retention suite. A timeout is recorded as rc: "timeout" with the partial output (source: prove/prove.py, run_step; prove/wires.py, Step.timeout).
wires.py: the wire table
prove/wires.py defines two dataclasses (source: prove/wires.py, Step, Wire):
Step field |
Meaning |
|---|---|
name |
Label in the report |
kind |
diff (behaviour against the reference), matrix (feature probes) or durability (SynergyDB only) |
cmd |
Shell command with placeholders {py}, {ts} (the test-scripts directory), {sdb_restart}, {ref_restart:NAME}. Empty means "parse the previous step's output again" |
total |
Regex with two groups (passed, total) for the overall score; the last match in the output wins |
phases |
Phase name to regex |
sections |
Phase name to an output header; [PASS]/[OK] and [FAIL]/[DIFF] lines under it are counted |
timeout, env, pre, note
|
Per-step timeout, extra environment, a shell command run first, report note |
Wire field |
Meaning |
|---|---|
key, name, reference
|
Identifier for --wires, display name, reference description |
refs |
Reference container names from refs.py
|
steps |
List of Step
|
profile |
SynergyDB login profile for sdb.sh (legacy default, or wirediff) |
ports |
SynergyDB listeners to wait for before running steps |
gaps |
Known gaps printed in the report |
When a step has a total and phase scores but no single phase, single is derived as the total minus the other phases (source: prove/prove.py, parse).
The 18 wires, in run order:
| Key | Reference | Steps | Profile | Port waited for |
|---|---|---|---|---|
postgres |
postgres:16 |
query corpus; second connection + restart; feature matrix | legacy | 5499 |
mysql |
mysql:8.0 |
corpus + second connection + restart; feature matrix | legacy | 13306 |
mongo |
mongo:6 |
operation corpus; feature matrix | legacy | 27017 |
cypher |
neo4j:5 |
query corpus + second connection + restart; feature matrix | legacy | 7687 |
redis |
redis:7, and redis:7 with appendfsync always
|
live suite; command corpus; feature matrix | legacy | 6399 |
memcached |
memcached:1.6 |
text, binary, second connection + restart; restart durability; feature matrix | legacy | 11212 |
cassandra |
cassandra:4.1 |
three-phase diff | legacy | 9042 |
clickhouse |
clickhouse/clickhouse-server:24.8 |
query + second connection + restart; feature matrix | legacy | 8124 |
influxdb |
influxdb:1.8 |
three-phase diff; feature matrix | legacy | 8087 |
gremlin |
tinkerpop/gremlin-server:3.7.2 |
four-phase diff | legacy | 8182 |
dynamodb |
amazon/dynamodb-local:2.5.3 |
operation diff; deep diff (boto3) | legacy | 8001 |
elasticsearch |
elasticsearch:8.15.0 |
search diff; feature matrix | legacy | 9201 |
s3 |
localstack/localstack:3.8 |
S3 diff | wirediff | 9100 |
kafka |
apache/kafka:3.8.0 (two brokers) |
Kafka diff; Kafka retention diff | wirediff | 9092 |
schema_registry |
confluentinc/cp-schema-registry:7.7.1 on the Kafka broker |
Schema Registry diff | wirediff | 8081 |
couchdb |
couchdb:3 |
CouchDB diff | wirediff | 5984 |
mssql |
mcr.microsoft.com/mssql/server:2022-latest |
SQL Server diff | wirediff | 1433 |
oracle |
gvenzl/oracle-free:23-slim |
Oracle diff | wirediff | 1521 |
(source: prove/wires.py, WIRES; prove/refs.py, REFS)
NO_REFERENCE lists the wires the pack does not score, with where they are checked instead: Snowflake (a real Snowflake account), Prometheus (the official PromQL compliance suite), Arrow Flight SQL and gRPC (application diffs against GizmoSQL and PostgreSQL 16), and the HTTP/REST and GraphQL APIs (unit and integration tests) (source: prove/wires.py, NO_REFERENCE). Those harness directories are not in the snapshot. See the wire guides.
refs.py: reference containers
Each REFS entry is (image, docker run arguments, readiness probe, start timeout). A container is ready only when a protocol-level probe succeeds twice, 2 s apart, because several images restart once during initialization. Examples: a select 1 for PostgreSQL, SHOW DATABASES must list _internal for InfluxDB, cluster health yellow or green for Elasticsearch, cqlsh -e "describe keyspaces" inside the Cassandra container, kafka-topics.sh --list inside the Kafka container. Start timeouts range from 60 s (Redis, memcached) to 900 s (Oracle) (source: prove/refs.py, REFS, probe, wait).
Other behaviour (source: prove/refs.py):
- Pulls fall back to the public
mirror.gcr.iomirror and retag the image when Docker Hub refuses (not formcr.microsoft.comimages) (pull). - The main Kafka reference postpones its retention check by a day, because the suite writes records with a fixed 2023 timestamp that default retention would delete. A second broker,
ref-kafka-ret, checks retention and runs the log cleaner every second for the retention suite (REFScomments). - Before a Kafka suite,
warmcreates a topic and consumes with a group once, so__consumer_offsetsexists (warm). -
python prove/refs.py start [name...],stop [name...]andwait namemanage containers by hand (__main__).
sdb.sh: SynergyDB lifecycle
prove/sdb.sh fresh [profile] kills any previous instance with kill -9, wipes /tmp/synergydb_wirediff, starts the binary with test-scripts/synergydb.wirediff.toml (every wire on an offset port so references keep the standard ones), and waits up to 90 s for select 1 over the PostgreSQL wire, then for each port in PROVE_WAIT_PORTS. restart crash-restarts with the remembered profile and prints up. stop sends kill -9 (source: prove/sdb.sh).
| Profile | Authentication | Used by |
|---|---|---|
legacy |
A fixed test superuser with SYNERGYDB_DEV_INSECURE_AUTH=1 and SYNERGYDB_ALLOW_INSECURE_BIND=1; MongoDB, Bolt and Redis suites connect without credentials, as against their reference containers |
PostgreSQL through Elasticsearch |
wirediff |
Real authentication; a fixed superuser plus the logins the references use, created over the PostgreSQL wire; S3 access keys from environment; Kafka retention check postponed by a day | S3, Kafka, Schema Registry, CouchDB, SQL Server, Oracle |
wirediff-fastlog |
wirediff with Kafka retention and the log cleaner checking every second |
Kafka retention step (pre) |
(source: prove/sdb.sh, profile_env; prove/wires.py, profile)
These profiles use the development authentication switch and fixed test passwords. They exist only for the local proof run. See Security before reusing any of it.
| Variable | Default | Effect | Source |
|---|---|---|---|
SDB_BIN |
target/release/synergydb |
Binary to run; set it to skip the build |
prove/prove.sh; prove/sdb.sh
|
PROVE_NO_BUILD |
0 |
1 skips cargo build
|
prove/prove.sh |
PYTHON3, PROVE_VENV
|
python3, prove/.venv
|
Interpreter and venv | prove/prove.sh |
PROVE_RESTART |
crash |
graceful uses SIGTERM for restarts |
prove/sdb.sh; prove/prove.py, environment
|
PROVE_PROFILE |
unset | On restart, switch to and remember this profile |
prove/sdb.sh |
SDB_CONF, SDB_LOG, PROVE_STATE
|
test-scripts/synergydb.wirediff.toml, $PROVE_STATE/sdb.log, /tmp/synergydb_prove
|
Config, server log, PID and profile files | prove/sdb.sh |
PROVE_WAIT_PORTS |
set by prove.py from Wire.ports
|
Listeners to wait for after start |
prove/sdb.sh, wait_ports; prove/prove.py, run_wire
|
PROVE_BENCH_VIA_PROXY |
unset |
1 benchmarks references through the published Docker port |
prove/bench.py, D
|
report.py: how scores roll up
For each wire, wire_summary adds up the diff steps only. Feature-matrix steps are shown in their own column, and a durability step fills the restart column only when no diff step reported a restart phase (source: prove/report.py, wire_summary).
| Verdict | Condition |
|---|---|
did not run |
The reference or SynergyDB did not start |
throughput only |
No correctness steps (a --bench-only run) |
suite error |
A step produced no score, or the diff total is 0 |
matches |
Every diff check passed |
near (N differ) |
At least 97 percent of diff checks passed |
gaps (N differ) |
Below 97 percent |
(source: prove/report.py, wire_summary)
The throughput column shows the median SynergyDB-to-reference ratio and its range. The HTML header counts workloads at 90 percent of the reference or better (source: prove/report.py, speed_text, render_html).
gate.py: the CI gate
python3 prove/gate.py <results.json> [baseline.json] fails (exit 1) when a wire's reference or SynergyDB did not start, a step produced no score, a baseline step is missing, or a step passed fewer checks than its min in prove/ci-baseline.json. Steps not in the baseline are shown as new and pass. Wires not in the run are ignored, so --wires subsets work. It prints a Markdown table and appends it to $GITHUB_STEP_SUMMARY when that is set (source: prove/gate.py).
ci-baseline.json says its minimums come from the 2026-11-24 full run and that a minimum is raised when a fix lands and never lowered to get a green run (source: prove/ci-baseline.json, _about). That 2026-11-24 run directory is not in the snapshot. Not verified: no CI workflow file is in the snapshot, so where gate.py runs is not shown.
Reading the proof pack in docs/proof
What is committed
docs/proof/2026-11-30/ holds the run behind the README scorecard: a cargo build --release --features full of main at a3232c9, one 4-vCPU Linux cloud VM with 15 GB RAM, make prove-quick (no throughput), restarts by kill -9 (source: docs/proof/2026-11-30/README.md).
| File | Content |
|---|---|
proof-pack-a3232c9/report.md, report.html
|
The rendered report: 4625/4662 diff checks match, 14 of 18 wires match on every check |
proof-pack-a3232c9/results.json |
The data the report was rendered from |
proof-pack-a3232c9/logs/<wire>-<step>.txt |
Raw suite output, starting with the command line |
snowflake-statement-diff.txt, flight-sql-adbc-app.md, promql-compliance-run.txt.gz
|
Results of the harnesses outside the pack |
(source: docs/proof/2026-11-30/README.md; docs/proof/2026-11-30/proof-pack-a3232c9/report.md)
results.json
| Key | Content |
|---|---|
env |
started, commit, commit_subject, dirty, host, cpu, memory_gb, docker, binary, binary_sha256 (first 16 hex digits), restart_mode, bench_* settings, duration_min, and rerun when --update was used |
selected |
The wire keys of the last invocation |
wires[] |
key, name, reference, gaps, status, images (repo digests), secs, steps[], bench[]
|
wires[].steps[] |
name, kind, note, rc, secs, log, total as [passed, total], phases, failing (up to 12 differing lines), status, and error_tail when no score was found |
wires[].bench[] |
workload, sdb, ref, unit, tool, note
|
(source: prove/prove.py, environment, run_step, run_wire; docs/proof/2026-11-30/proof-pack-a3232c9/results.json)
Reading tips
-
A step's
rcis the suite's exit code, not the verdict. Several suites exit 1 when anything differs. In the 2026-11-30 run, the memcached diff step hasrc: 1and 304/304 (source:docs/proof/2026-11-30/proof-pack-a3232c9/results.json, memcached step). -
"Matches" covers diff steps only. In the same run memcached's verdict is "matches" while its SynergyDB-only
restart durabilitystep scored 9/23, with failing lines such as[FAIL] same reply bytes for 7 items before and after restart. Read the restart column and the per-wire section, not only the verdict (source:docs/proof/2026-11-30/proof-pack-a3232c9/report.md, Memcached section;prove/report.py,wire_summary). -
The baseline would fail that run.
ci-baseline.jsonsetsmin: 20for memcachedrestart durability, with the note "kill -9 may lose the last ~10 ms write batch by design". 9 is below it, sogate.pywould report that step as regressed. The other steps of the run meet their minimums (source:prove/ci-baseline.json;docs/proof/2026-11-30/proof-pack-a3232c9/results.json). -
env.rerunnames wires rerun with--update. The 2026-11-30 run listsmemcached, andselectedis["memcached"]because the last invocation selected only it (source:docs/proof/2026-11-30/proof-pack-a3232c9/results.json,env). -
The report text comes from
wires.pyat render time. The committedreport.mdlists wires without a reference in older wording than the currentNO_REFERENCElist, so re-rendering withmake prove-reportchanges that paragraph but not the scores (source:docs/proof/2026-11-30/proof-pack-a3232c9/report.md;prove/wires.py,NO_REFERENCE;prove/report.py,render_md). -
Each log names the failing checks. The PostgreSQL corpus log prints
[XX WRONG_VALUE] type_sum_int (types)and two similar lines for the three differing queries (source:docs/proof/2026-11-30/proof-pack-a3232c9/logs/postgres-query-corpus.txt).
To rerun one wire into an existing report: prove/prove.sh --wires kafka --update prove/out/latest (source: prove/README.md, "Options").
Other harnesses in test-scripts
| Harness | What it checks | Source |
|---|---|---|
cross-model-acid/acid_wire.py |
Relational, JSONB and vector writes in one PostgreSQL-wire transaction; Cypher CREATE over SQL; Bolt transactions seen over the PostgreSQL wire; MongoDB sessions. Uses its own config synergydb.acid.toml
|
test-scripts/cross-model-acid/acid_wire.py, module doc |
cluster/raft_net_test.py |
A 3-node Raft cluster over loopback: election, replication, failover, catch-up | test-scripts/cluster/raft_net_test.py |
cluster/multiwire_failover_test.py |
Follower writes refused with the leader named, replicated reads, and kill -9 of the leader while seven wires write numbered records |
test-scripts/cluster/multiwire_failover_test.py |
cluster/haproxy_failover_test.py |
Applications through HAProxy (health check on /cluster/writable) across a leader failover |
test-scripts/cluster/haproxy_failover_test.py |
See Raft for the cluster code these drive.
Not in the snapshot: test-scripts/README.md describes ORM batteries (prisma/, drizzle/, knex/, typeorm/), python/ concurrency probes and a CI workflow .github/workflows/correctness.yml that runs four differential suites and the ORM batteries on every PR. None of these files are in the snapshot, so they are Not verified here (source: test-scripts/README.md).