Skip to content

Testing strategy

Calimero Core is tested in layers that trade scope for speed. Most of the node is covered by real clusters in one process: three nodes, sealed channels, real WASM, driven only through the client. Multi-process behaviour (crashes, freezes, restarts, upgrades) is covered by the process suite, which runs one merod process per node, and data written by the last release by the upgrade path.

Layer Where What it proves Speed
Unit tests #[cfg(test)] in each crate One module’s logic: config merging, key sources, quotas, presence rules, outbound gates Milliseconds
Raft engine crates/log Replication, failover, restart from disk, learner catch-up, snapshot streaming, no plaintext in snapshot files, the store-format migrations, the log.redb migration Seconds
Cluster crates/node/tests/it/cluster.rs The node end to end in one process: sign-up, installs, calls, views, events, orgs and teams, upgrades, blobs, governance, replica moves Seconds to minutes
CLI crates/merod/tests/cli.rs, crates/meroctl/tests/cli.rs merod init/config/run/inspect through the binary; every meroctl command group against a local cluster Seconds to minutes
App logic TestApp in crates/sdk/src/testing (cargo test --manifest-path apps/<app>/Cargo.toml) An app’s methods, events and errors on the real engine Milliseconds to seconds
Scenario files apps/*/scenarios/, workflows/**/scenarios/, run by crates/node/tests/scenarios.rs An app or a flow end to end on an in-process cluster, written as data: orgs, teams, invites, packages, upgrades, blobs, calls as several accounts Seconds per file
Process suite crates/node/tests/fault/suite.py Separate merod run --dev processes: a crash, a freeze and a restart, a frozen leader, orgs and keys, signed packages, a rolling upgrade under load, the kv-store soak Minutes
Consent page crates/node/tests/consent-page/ The node’s consent page in Chromium on real merod processes: the install, update, second-approver, delegation, guest and deployment sheets approved with a virtual WebAuthn authenticator, and the API flows that have no sheet (undo, public links) Seconds per test
Upgrade path crates/node/tests/fault/upgrade_path.py A cluster on the latest published release’s merod, its data written through the public API, rolled onto this tree’s merod as production rolls it, then read back, extended and read again after a restart About two minutes, plus the builds

Use both ends. A green cluster test does not prove a process restart or a frozen leader behaves, and a green scenario does not localize a logic bug.

The cluster and CLI tests build the components they load on first use (calimero_app_build::build_component_cached, cached under $CARGO_TARGET_DIR/app-components; the wasm32-wasip2 target, which rust-toolchain.toml lists): the kv fixture apps/fixture-kv, the other apps/fixture-*, apps/team-space and apps/rooms. No build step comes first. KV_STORE_WASM points meroctl’s tests at another component.

Terminal window
cargo test -p calimero-node # the cluster tests
cargo test -p calimero-node --test it component_cluster::teams_work_like_v1_subgroups -- --nocapture
cargo test -p merod -p meroctl # the CLI tests
cargo test -p calimero-log
cargo test -p calimero-client -p calimero-identity -p calimero-sealed
cargo test -p calimero-outbound --features outbound-testing
cargo test -p calimero-kms-client --features mock-attestation
cargo test -p calimero-tee-attestation --features mock-attestation
cargo test --workspace # everything

The node’s integration tests are one test binary, it (crates/node/tests/it/main.rs, one module per former tests/*.rs file), so they link wasmtime, RocksDB and tantivy once instead of once per file. A test’s name is <module>::<test>: cargo test -p calimero-node --test it job_runs:: runs one module, and cargo nextest run -p calimero-node -E 'binary(it) & test(/^job_runs::/)' does under nextest. Two stay binaries of their own: scenarios (its own main), and auto_updates, which sets hooks that are the whole process’s (testing::shift_update_clock, testing::fail_restore_points). Tests in it share one process under cargo test, so a test hook is keyed to the test’s own nodes (a data directory or a public URL, set in Cluster::start_with’s configure when the node reads it at start, as testing::shared_http_timeout is), never the process’s; a test that needs a process-wide one gets a binary of its own.

The real-process fault tests start merod processes on ports 7600-7699 and need release merod and meroctl (cargo build --release -p merod -p meroctl):

Terminal window
python3 -I crates/node/tests/fault/rooms_fault.py --iterations 200 --seed 1 # Rooms under leader kills
python3 -I crates/node/tests/fault/compute_e2e.py # compute actions: 3 replicas, 2 job nodes

cargo-nextest runs the workspace faster (cargo nextest run --workspace, then cargo test --workspace --doc for the doctests it skips).

crates/node/tests/it/cluster.rs builds clusters with the real run, mock attestation and a soft authenticator, and drives them only through calimero-client, as an SDK user would. Write a new test there when the behaviour crosses the API: start the cluster, sign up, do the thing, assert on what the client sees. Name it for the behaviour (teams_work_like_v1_subgroups, a_node_added_to_a_running_cluster_hosts_replicas).

crates/log/tests/sim.rs runs one group on three engines over the in-memory transport and, for each seed, a plan of 30 steps drawn from it: writes, crashes (half of them losing the writes not yet synced, as power loss would), restarts, a node partitioned off, messages dropped or delayed, and snapshot builds with log purges that make a lagging or restarted node install a snapshot. It then heals everything and checks that no write a leader acknowledged is missing on any replica, that a strong read right after each acknowledged write saw it, and that every replica’s state digest is the same at the same index (State digests).

Terminal window
cargo test -p calimero-log --features testing --test sim # the seeds CI runs (ci_seeds!), a test each
SIM_RUNS=50 cargo test -p calimero-log --features testing --test sim seeds_from_the_environment -- --nocapture # 50 more, each printed
SIM_SEED=1234 SIM_TRACE=1 cargo test -p calimero-log --features testing --test sim seeds_from_the_environment -- --nocapture # one seed again, with its trace

A failure names its seed and the trace of the steps it took. The seed fixes the plan and every fault decision in the order messages are sent; thread scheduling and openraft’s own randomized election timeouts are not under its control, so a replay runs the same faults and may take a few runs to meet the same interleaving. A seed that found a bug joins ci_seeds! with the fix, as seed_8609365135234708664 did when it found the simulator itself comparing replicas that stood at different indexes.

calimero-sdk’s testing feature (crates/sdk/src/testing) runs an app as the real calimero:app component on the real wasmtime engine with an in-memory host: TestApp::new, as_(account).call(..) / .view(..), events_for, tick, advance, mock_http, take_xcalls / deliver, and run_scenario for the shared JSON scenarios below. A component app’s own tests/ use it (cargo test --manifest-path apps/<app>/Cargo.toml); the app author’s view is Testing apps.

Scenario files are end-to-end tests written as data: each runs on an in-process cluster of its own (crates/node/tests/harness/cluster.rs: real run, mock attestation, sealed channels, the real WASM, a package registry on loopback), driven only through calimero-client. One test binary runs every file it finds:

Terminal window
cargo test -p calimero-node --test scenarios # all of them
SCENARIO_FILTER=apps/rooms/,fuzzy-tests cargo test -p calimero-node --test scenarios
cargo test -p calimero-node --test scenarios -- kv-store # a filter argument does the same
SCENARIO_SHARD=3/4 cargo test -p calimero-node --test scenarios -- --test-threads 2
cargo test -p calimero-node --test scenarios -- --list # what would run

It has its own test main (harness = false): --test-threads N (default 2) scenarios run at once, each on its own cluster; SCENARIO_SHARD=k/n keeps every n-th file of the sorted list starting at the k-th, so n shards split the files evenly and deterministically. A file listed in crates/node/tests/scenarios-skip.txt (<path> <reason>) is reported ignored until --include-ignored (or SCENARIO_INCLUDE_SKIPPED=1).

A run fails when it discovers no scenario, or when a filter matches none. Every run also checks that each *.json (other than .org.json) under any directory named scenarios is discovered or listed, with its reason, in crates/node/tests/scenarios-exclude.txt, so no scenario sits on disk unrun without saying why; a stale or reasonless entry fails too.

Variable Default What it does
SCENARIO_FILTER all Comma-separated substrings; a path containing any of them runs
SCENARIO_SHARD none k/n: the k-th of n shards (1-based)
SCENARIO_WAIT_CAP_SECS 2 Longest a wait step sleeps, unless it says "exact": true: the cluster replicates synchronously, and the ported waits were for v1’s gossip
SCENARIO_FUZZY_SECONDS 10 How long a fuzzy_test runs (soak lengths are the Python suite’s)
SCENARIO_TIMEOUT_SECS 600 A scenario still running after this, plus its own fuzzing (each fuzzy_test step’s SCENARIO_FUZZY_SECONDS), fails
SCENARIO_REPEAT_CAP none Most iterations of a repeat step
CORE_WASM_DIR $CARGO_TARGET_DIR/workflow-wasm Where {{env.CORE_WASM_DIR}} fixtures live
SCENARIO_FILES none Comma-separated cluster scenario files to run instead of the discovered ones (crates/node/tests/previous-release/kv-store.json, which needs the previous release’s bundle in PREVIOUS_RELEASE_DIR: scripts/fetch-release-app.py)

After each call the runner waits, up to 10 s, until every replica has applied it. A call that does not settle fails its step, naming each replica behind, the index it waited for and the index that replica had reached. The runner never makes up a refusal: every refusal a step expects is the node’s or the app’s.

Fixtures are built on first use when missing: <crate>.wasm by building that app’s component, and the blobs size sweep’s static/generated/blob-<N>mib.bin as random bytes in memory.

apps/<app>/scenarios/<name>.json is the step array of calimero_sdk::testing::scenario (call, view, tick, advance, removeMember; as, expect, save, $var, @account, events), the same file the app’s own tests/scenarios.rs runs in the harness. Beside it, <name>.org.json is the organization it needs:

{ "admins": ["ada"], "members": ["bob", "cy"], "guests": ["gus"], "teams": { "sales": ["bob"] }, "outsiders": ["mallory"] }

The owner is always owner; an omitted key is empty, and no file means the owner alone. outsiders are accounts a step acts as that hold no place in the org: they sign up and join nothing, so the node refuses them. On the cluster an as that is neither in the org nor a declared outsider fails the scenario before it runs, so a mistyped name cannot become an outsider whose refusal passes. (The SDK’s TestApp harness still treats an unknown name as an outsider.) On the cluster the runner builds the app (a component, with calimero_app_build::build_component_cached), signs every account up, creates the organization, invites each account with its role, creates the teams and adds their members, deploys the app in the organization and runs the steps: step i on node i % 3, as its as account’s own client. @name is that account’s id; a string that is exactly a team’s name in args is that team’s id on the cluster (and a team id in a result reads back as its name). The app clock starts at 1_700_000_100_000 (a 15-minute slot boundary, the harness tests’ time zero); advance moves every node’s clock, tick waits until the timer’s due slot is applied everywhere. Events are each account’s live stream from the log’s start.

A migration scenario, apps/<app>/migrations/<version>.json, is the same step array with one { "op": "upgrade" } step: the app’s own tests/migrations.rs runs it with run_migration, from the component in apps/<app>/releases/<version>.mpk to the crate’s current build (Testing apps). The cluster runner does not discover these files (they are not in a scenarios directory); a node-level upgrade is a cluster scenario’s upgrade_app step.

apps/<app>/scenarios/cluster/**/*.json and workflows/**/scenarios/**/*.json hold node-level steps a harness cannot run. A file is an object:

{
"name": "Blobs across nodes",
"description": "...",
"comment": ["what the YAML's header said: v1 steps dropped in the port, fixes"],
"cluster": { "nodes": 3, "settings": "[outbound]\nenabled = true\n..." },
"accounts": ["alice", "bob"],
"variables": {},
"steps": [
{ "type": "create_org", "account": "alice", "org_name": "Blobs", "outputs": { "org": "orgId" } },
{ "type": "deploy", "account": "alice", "org": "{{org}}",
"wasm": "{{env.CORE_WASM_DIR}}/kv_store.wasm", "outputs": { "app": "appId" } },
{ "type": "upload_blob", "account": "bob", "app": "{{app}}", "file_path": "static/test.txt",
"outputs": { "blob": "blob_id" } },
{ "type": "download_blob", "account": "alice", "app": "{{app}}", "blob_id": "{{blob}}",
"expected_size": 13 },
{ "type": "assert", "statements": ["is_set({{blob}})"] }
]
}

It is merobox’s cloud-v2 workflow format as JSON (where the format comes from); scripts/workflow-to-scenario.py FILE.yml [--delete] converts a YAML workflow, dropping base_port and binary and refusing what it cannot carry over, naming why. Today apps/team-space/scenarios/cluster/ and workflows/fuzzy-tests/ hold them. cluster.settings is the TOML every node starts with (its [outbound] table; the test build has outbound-testing). Every account in accounts is signed up with its own soft passkey on node 1 and talks to node index % nodes (an explicit "node": N, 1-based, overrides).

Conventions, as merobox’s runner had them:

  • {{name}} placeholders: a string that is one placeholder keeps the value’s type; one inside text is spliced in (json.dumps of a non-string). Dotted paths reach into values ({{accounts.alice.account_id}}, {{env.HOME}}), {{a ?? b}} takes the first that resolves, and an unresolved one fails the step. Set for you: accounts.<name>.{account_id,public_key}, public_key_<name>, env.*, ops_token.
  • outputs: { var: path } stores a path of the step’s result ("" the whole result); a call’s or view’s result also has rpc.output (its result, as v1’s JSON-RPC envelope had it).
  • expected_error: CODE makes a refusal with that API code the step’s success, expected_failure: true any refusal, allow_failure: true either outcome; an output whose path starts with error then holds the refusal’s text. expect compares a step’s result; retry_for: S retries a failing step for S seconds; max_seconds: S fails one that succeeds too late.
  • assert statements: is_set(A), is_empty(A), contains(A, B), not_contains(A, B), regex(A, P), equal(A, B) / not_equal(A, B) (also equals / not_equals), A op B for == != >= > <= < (numeric when both sides are numbers); non_blocking: true reports without failing. json_assert: json_equal, json_not_equal, json_subset (and unprefixed). Operands are evaluated as merobox did, with Python’s semantics (crates/node/tests/harness/py.rs): str of a map is its Python repr, 1 == 1.0, a whole {{name}} keeps its type and names a variable directly (no dotted paths), and an unresolved one fails its statement.
  • repeat { count, steps } sets iteration (from 0) and iteration_node (from 1). fuzzy_test { operations: [{ name, weight, steps }], accounts, success_threshold, operation_delay_ms } picks weighted operations at random for SCENARIO_FUZZY_SECONDS, with {{random_account}}, {{random_int(a, b)}}, {{uuid}}, {{timestamp}} and, after a call, {{fuzzy_<arg>}}; it passes at success_threshold percent.

Step types (fields as in merobox; each acting step names an account, or an api_key, or as_key, an account’s public key):

Area Steps
Apps deploy (wasm or package + version/service; org, access, init_args, confirm_methods (ignored: a component declares its own), app_name) answers appId, its context id (for scenario files written for v1), bundle, memberPublicKey; upload_bundle (hash); create_app; upgrade_app (version/package/bundle/migrate, approved with the account’s passkey when the node asks); delete_app; migration_status (apps)
Packages install_package (mpk: published to the cluster’s registry, then POST /packages/install; answers package, version), packages, uninstall_package
Calls call (args, confirm, idempotency_key), view (stale, min_index), wait_for (equals/contains, timeout, interval), events (from, count, timeout)
Accounts whoami (adds publicKey), add_device (another passkey on the account; device then acts as it), create_api_key
Orgs create_org, invite (role, teams), redeem_invite, remove_member, set_role, capabilities, member_capabilities
Teams create_team (team_name, join, parent), team_add (members, role, lead, capabilities), team_remove, team_update (join, metadata, team_name, parent), team_get, team_list, team_join, team_delete
Blobs upload_blob (file_path: beside the scenario or any directory above it; answers blobId, blob_id, size), download_blob (expected_size, expected_sha256), list_blobs, blob_info, delete_blob
Presence publish_presence (seq, state), presence
Approvals transfer_app, approve_release, approve_outbound, upgrade_org, upgrade_run, retry_upgrade_run
Raw http (method, path, body; a 412 CONFIRM_REQUIRED answered with the passkey)
Flow wait (seconds, capped; exact), set (values), assert, json_assert, repeat, fuzzy_test, find_leader

Node process faults (kill_node, pause_node, resume_node, start_node, restart_node, ops) are not steps here: a scenario naming one is refused. They need real processes, and run in the process suite.

The cluster-scenario format and its conventions are those of merobox, the external workflow runner core used before 1.0; merobox is no longer used, and the runner here (crates/node/tests/harness/scenario.rs, with Python’s operand semantics in harness/py.rs) is the only one. A merobox YAML workflow still converts mechanically with scripts/workflow-to-scenario.py. What needs separate processes (a crash, a freeze, a soak) is the process suite’s.

crates/node/tests/fault/suite.py runs the tests that need one merod process per node, so a test can SIGKILL, SIGSTOP, restart or upgrade one node: a crashed, a frozen and a restarted node (kv-failover); a frozen leader under a 10 s write budget (frozen-leader); organizations, scoped API keys and passkey confirmations (orgs-and-keys); signed packages from a registry on loopback (packages); a rolling upgrade of every node under a keyed write load (rolling-upgrade); the kv-store soak (kv-soak); and, nightly, rooms_fault.py’s randomized nemesis (rooms-fault). Each test starts its own 3-node merod run --dev cluster (rv2.py) on ports 7600-7699 (+ WORKFLOW_PORT_OFFSET), drives it over plain HTTP with API keys and through meroctl, and stops it; a failed test keeps its directory under target/fault-suite, with each node’s nodeN.log.

Set What runs
default (PRs) every test but rooms-fault, once, a 30 s soak
--smoke the release-image set: no rolling-upgrade (one image, one build) and no rooms-fault; with --merod PATH, against another binary
--nightly every test three times, a 900 s soak, 50 rooms-fault iterations

--only a,b and --iterations N pick and repeat tests. Its README.md (beside it) lists each test’s checks and every input:

Terminal window
cargo build --release -p merod -p meroctl
export PATH=$PWD/target/release:$PATH
meroctl app build apps/fixture-kv --out target/app-components/kv.wasm
for v in 1.0.0 1.1.0; do
meroctl app pack --wasm target/app-components/kv.wasm \
--package com.calimero.kv-store --app-version "$v" --out "dist/com.calimero.kv-store-$v.mpk"
done
python3 -I crates/node/tests/fault/suite.py --list
python3 -I crates/node/tests/fault/suite.py # the PR set
python3 -I crates/node/tests/fault/suite.py --only kv-failover,frozen-leader
python3 -I crates/node/tests/fault/suite.py --smoke --merod /tmp/merod

The kv fixture is the component apps/fixture-kv; the two signed releases (package com.calimero.kv-store, dev key) are for packages and land in dist/. A node behaviour that only shows across processes (the bounded forward to a frozen leader is the example) gets its regression test here.

The suite’s kv-soak (kv-store’s fuzzy load: the operations and weights of workflows/fuzzy-tests/kv-store/scenarios/fuzzy-test.json, four members) times every call it sends to the cluster (one round trip each). With --soak-report file.json (or SOAK_REPORT) it appends a report to that file: per operation, how many ran and failed, operations and calls per second over the run, and the p50/p95/p99 (and mean, max) latency of its calls in milliseconds, the same per call kind (call set, call get), and the whole run’s (the JSON format merobox’s fuzzy_test wrote, so older reports still render). crates/node/tests/fault/soak.py report file.json (or scripts/soak-summary.sh, which CI runs) prints it as a table:

Terminal window
python3 -I crates/node/tests/fault/suite.py --only kv-soak --soak-seconds 30 --soak-report soak.json
python3 -I crates/node/tests/fault/soak.py report soak.json

A 30-second kv-store run against a debug merod on a shared 4-vCPU Linux container (the shape of the nightly table, not a reference):

Operation Ops Pass % Ops/s Calls Calls/s p50 ms p95 ms p99 ms
cross_node_write_read 7 100.0 0.23 14 0.46 19.5 21.8 21.8
list_entries 29 100.0 0.96 29 0.96 43.3 74.1 85.3
random_read 28 100.0 0.93 28 0.93 11.6 16.2 20.0
set_and_verify 96 100.0 3.18 192 6.36 17.8 29.3 31.9
write_burst 56 100.0 1.86 672 22.28 25.1 30.9 33.5
all (30s) 216 100.0 7.16 935 31.00 22.1 31.8 51.1

The calls run one at a time, so a call’s latency is what one caller sees and calls/s is one caller’s rate, not the cluster’s capacity; the cluster bench (below) measures that. The PR job’s numbers (a fresh release build on a shared runner) are for comparing runs of the same job; the release image’s runs measure the binary that ships. The pass rate (99 %) gates; latency gates nothing.

consent_page.rs approves every kind of request with a software authenticator over plain HTTP, so it never sees the page itself: its script, its copy, a passkey prompt, a redirect back to the app. crates/node/tests/consent-page/ drives the page in Chromium (Playwright) against three real merod run --dev processes, and CI runs it.

What it does:

  • starts three merod processes whose public URL is http://localhost:PORT, because the passkey’s RP id is localhost and the node judges the page’s origin against its public URL (merod local hands out 127.0.0.1 URLs, which a browser cannot approve on);
  • seeds state with meroctl as a person whose dev passkey file it then imports into Chromium’s virtual authenticator (CDP WebAuthn.addVirtualAuthenticator and addCredential), so the browser approves as the same account;
  • serves the app’s own page itself at http://<label>.localhost:PORT/1.0.0/ (the package’s real origin) with mero-js bundled from this tree, signs in there and asks for a consent page as a frontend does;
  • opens the page, checks the model the node sent and the text a person reads, saves a screenshot of each sheet (test-results/screens), clicks approve and checks what the cluster did.
  • shoot saves a sheet’s state in both themes (<name>-light.png, <name>-dark.png); CONSENT_SCREENSHOTS names another folder.

The app’s page signs in with a software passkey for the same account, because Chromium refuses the RP id localhost from a <label>.localhost origin; the consent page, on the node’s own origin, uses the real authenticator. One counter is kept for every authenticator of a run (support/counter.mjs), because the node refuses a passkey counter that does not move forward. Flows with no sheet (undo, public links, the organization’s guest switch) go through meroctl or a mero-js client on the cluster’s registered origin, with the same virtual passkey. A test for a known bug is marked test.fail with the reason on one line; it turns red when the bug is fixed, which is the cue to drop the mark.

Terminal window
cargo build -p merod -p meroctl
meroctl app build apps/fixture-kv --out target/app-components/kv.wasm
pnpm --dir sdks install --frozen-lockfile # mero-js's dependencies, bundled into the page
cd crates/node/tests/consent-page
npm ci && npx playwright install chromium
npm test # about a minute on a laptop

It uses the debug merod and meroctl under target/debug and target/app-components/kv.wasm; MEROD_BINARY, MEROCTL and KV_STORE_WASM name others, as the clients’ cluster tests take them. Safari cannot be driven with a virtual authenticator, so it is not covered.

scripts/pipeline-e2e.py proves a pipeline end to end on a real cluster in one command. It packs the compute fixture and its fanout.yaml into a package signed with --key (or a generated key), installs it and creates the compute-only app. It then uploads three sealed files, runs the fan-out and collect pipeline, and waits for it to end within --timeout. It checks the run succeeded, the each outputs byte for byte, the all output’s size, meroctl cloud compute pipeline receipt --verify, and that a re-run is answered from the step cache with the same bytes. A second pipeline makes 40 files, more than one account may export one by one in a minute, and its run is downloaded and verified too. Each step prints PASS or FAIL, and the exit code is 1 if any failed.

Terminal window
scripts/pipeline-e2e.py --local # 3 replicas and a job node of this tree's merod
CALIMERO_API_KEY=... scripts/pipeline-e2e.py --api https://node.example --max-cost 5000000

Credentials are meroctl’s: CALIMERO_API_KEY in the environment, or the session saved under --home. An API key’s runs need --max-cost, and so a price table on the cluster. The cluster needs a job node, and --key must be a publisher key it trusts. --keep leaves the app and the work directory; --package-file installs a built package. Binaries come from RV2_BIN_DIR as for the other process tests; its meroctl builds and packs the fixture. CI runs the --local form in the compute-e2e job.

Every Calimero Cloud cluster on a release must be able to roll forward to every later core release without losing data. crates/node/tests/fault/upgrade_path.py proves it for the release pinned in .github/upgrade-from, the latest published one, against this tree:

  1. The old cluster. Three merod run --dev nodes and a job node start on the release’s own merod, downloaded from its GitHub release and checked against its SHA256SUMS (scripts/fetch-release.sh). The nodes attest a mero-tee release of their own (--tee-release), the operator decides releases (--release-approvals operator, --operator-key), and packages come from a registry on loopback.
  2. Seed. With the release’s own meroctl, over the public API: accounts with passkeys, sessions and API keys (a read-only one scoped to an app); an organization with members, a team, an invite not yet redeemed and an app team; the release’s signed kv package (kv-store-test-fixture.mpk) installed and an app of it with a history of writes, overwrites, removals and a note; plain blobs, one referenced from the app’s state; the compute fixture, built from the release’s tag and signed with its own tools (scripts/build-release-fixtures.sh), with a sealed file of three segments and a compute run finished on the job node. This tree’s merod and meroctl build in the background meanwhile (scripts/upgrade-path.sh), since the seed needs only the release; the roll waits for that build (and the pipeline case, which seeds from this tree’s package, in its own seed), and a failed build fails the job with its cargo output.
  3. Roll forward, as mdma’s rollout does it (rollout.py): the operator approves the new release (POST /ops/releases), three nodes on this tree’s merod join one at a time (POST /ops/nodes, each a system-group learner), every app moves onto them (POST /ops/apps/{app}/replicas, until GET /ops/placement shows it: the first alone, so the mixed checks run with nothing in flight, then eight at a time, ROLLOUT_MOVE_JOBS), and the old nodes are removed one at a time while the system group has a leader and its voters (DELETE /ops/nodes/{id}). Every decision is signed with the operator key. Once the first app has moved, apps sit on both releases and everything is read back (mixed).
  4. Verify, extend, restart. With this tree’s meroctl, every value is read back on the new nodes, the saved sessions included (issued by a node that is gone, refreshed by the client); then new data is written: an account, a key, the old invite redeemed, a team, the app upgraded to this tree’s kv (signed as kv 2.0.0, its history kept), a blob, a new sealed file, and compute runs on a new job node over the old sealed files and the new one. One new node is restarted from its data directory and everything is read again.

What is written and checked lives in cases, upgrade_cases/NN_*.py, each a Case with seed, mixed, verify and extend steps (the module’s docstring says when each runs); a new kind of stored data gets a case. Within a phase the cases run at once (eight at a time, three in the seed while this tree builds; UPGRADE_JOBS=1 or --jobs 1 runs them one by one with live output), each group’s log printed whole when it ends, so a case is independent of the others: an account name belongs to one case (a second case that claims it fails the run, naming both, and upgrade_runner_test.py checks the literal names before the build starts), a case that changes what every case sees (a quota, a pool, a stopped node) is exclusive and runs alone after the rest of its phase, and cases that build on one another share a group and run in file order. Run it locally, as CI does, with scripts/upgrade-path.sh (it builds this tree’s merod, meroctl and kv, fetches the release and builds its fixture), or with the binaries in hand:

Terminal window
scripts/fetch-release.sh 1.0.0-rc.20 target/upgrade-from
scripts/build-release-fixtures.sh 1.0.0-rc.20 target/upgrade-from
python3 -I crates/node/tests/fault/upgrade_path.py --from-dir target/upgrade-from \
--to-merod target/release/merod --to-meroctl target/release/meroctl \
--kv-next target/upgrade-path-fixtures/kv-next.mpk \
--pipelines-mpk target/upgrade-path-fixtures/pipelines.mpk --only kv-package,blobs

The rule. A change that turns the upgrade path red has broken every existing cluster. It merges only with one of:

  • a reader or migration, so the data the old release wrote keeps working (the usual answer: the new node reads both formats, as calimero-log reads the old log.redb);
  • a declared hard cutover: the PR replaces the version in .github/upgrade-from with hard-cutover: <PR> <why>, has ! in its title and says in its body what operators must do (“no interop with earlier nodes …; existing clusters are recreated”), and mdma adds it to mdma_common/release_compat.py’s CUTOVERS, whose epochs refuse to roll a cluster across it. The job reports the cutover instead of running until the next release puts a version back.

Never silently: #4884 (sealed files to segments) shipped “one-way” and forced a wipe of every cluster holding sealed files; run from 1.0.0-rc.14, this test fails on exactly that (no such file in this app for the old sealed files on the new nodes).

Keeping the pin current. .github/upgrade-from names the latest published release: once a release’s assets are up, the pin moves to it, at the latest in the next release PR (CONTRIBUTING.md, “Cutting a release”); the job warns when a newer version is tagged. A pinned tag that does not exist yet is reported and not run; a tag whose release lacks an artifact fails the job.

Governance is fixed at genesis, so the run above (a cluster deployed as Calimero Cloud deploys one) never meets a cluster whose owners hold release approvals or whose installs need a grant. A second run starts one: GOVERNANCE=granted scripts/upgrade-path.sh (upgrade_path.py --governance granted) deploys the nodes with --release-approvals owner --deployers owner. Its first case, in upgrade_cases/granted/, has the operator grant one account, name the cluster’s owner and switch deployments to granted (POST /ops/deployments/granted); every account signed up after that gets the owner’s deployer grant, and in the rollout each organization approves the new release itself in place of the operator. Every node, the new ones included, keeps --deployments open, as a switched cluster’s configuration does, so the run also shows the switch is not undone by configuration. The granted run runs the granted-only cases and every shared case; a case declares the runs it belongs to with governance (("open",) for one that asserts the operator’s governance). It runs nightly and on dispatch (.github/workflows/upgrade-path-granted.yml); a red run opens or updates the issue “Nightly granted upgrade path is failing”.

Beside the representative data set (upgrade_cases/10_representative.py), the cases upgrade_cases/20_*.py and on take each user-visible functionality in turn: accounts and passkeys, sessions, activity, the recovery code, API and upgrade keys; organizations (roles, capabilities, invites, ownership, deletion, the recovery key, guests); teams and app teams; packages, publisher bindings, app upgrades with a state migration and organization upgrade runs; app instances (history, access kinds, public links, xcall and batched xcalls, search, presence, transfer and move, usage); units and the apps an instance uses (created, attached, acting as a person, upgraded and deleted whole); declared secrets and a deployment’s; sealed files and upload sessions; governance and the operator’s state. Each is a DeepCase (crates/node/tests/fault/upgrade_deep.py), whose steps the harness runs:

Step Runs What it does
populate(w) once, on the old release seeds through the public API and answers a JSON-able record of what it expects
check(w, s) right after seeding, in the mixed cluster, on the new nodes, after the restart reads everything back and judges access both ways: what was allowed is allowed, what was refused (a removed member, a closed team, a revoked key) is refused with the same code
during_mix(w, s) in the mixed cluster check by default; xcall also relays between two apps that may sit on different releases
exercise(w, s) on the new nodes writes something new of the kind (and updates s for the checks after it)

check runs right after seeding as well, so a check that fails after the roll failed because of the upgrade, not because it was wrong. A read compares as a subset (a new release may add a field, never drop or change one), without the fields that move on their own (VOLATILE: sign-in counts, replicas, write times). A case that fails to seed is reported by each later step and the run goes on, so one run lists every breakage. The cases deploy the release’s own kv component and packages built from the release’s tag with its own tools (scripts/build-upgrade-deep-fixtures.sh, after build-release-fixtures.sh): the release’s units examples (apps/calendar, planner, booking) are packed from each crate’s [package.metadata.calimero] and calimero.lock by its meroctl, as their authors pack them, and its kv component as releases that declare a secret, admit guests or use another, and four releases of one package for a deployment’s offer to move between.

New functionality ships with a case. A PR that adds a user-visible functionality adds a DeepCase for it, with since set to the release it will ship in. Rolled from an older release, such a case is seeded on the rolled cluster instead (in extend) and checked from then on, so it runs from the PR that adds it, and becomes a full upgrade case once the pinned release has the functionality. To add one:

  1. Put a @case class deriving DeepCase in the upgrade_cases/ file of its area (or a new NN_area.py), with a unique name, its area, since, and one-line seeds and verifies for the matrix.

  2. populate signs its own people up (person(w, name), names no other case uses; the run fails when two cases claim one) and keeps every id and expected value in the record; check reads them back and records access decisions with decisions({...}), compared with same_decisions; exercise writes on the new release.

  3. Edit nothing else: the matrix below is generated from the cases when the docs site builds (npm run build or npm run dev in docs/ runs upgrade_deep.py --write-matrix; --matrix prints it).

  4. Run it: scripts/upgrade-path.sh, or with the fixtures in hand:

    Terminal window
    scripts/build-upgrade-deep-fixtures.sh target/upgrade-from # after build-release-fixtures.sh
    python3 -I crates/node/tests/fault/upgrade_path.py --from-dir target/upgrade-from \
    --to-merod target/release/merod --to-meroctl target/release/meroctl \
    --kv-next target/upgrade-path-fixtures/kv-next.mpk \
    --pipelines-mpk target/upgrade-path-fixtures/pipelines.mpk --only <name>

What cannot be tested this way yet is a not_covered(area, what, why) call in the upgrade_cases/ file of its area, with the reason, and appears in the matrix as not covered; a case is never skipped.

Area Case Seeded on the old release Checked in the mixed cluster, after the roll and after a restart Covered
Governance granted-governance a cluster deployed with --release-approvals owner --deployers owner: the operator grants an account while it still may (POST /ops/deployers), names the cluster’s owner (POST /ops/cluster-owner) and switches deployments to granted (POST /ops/deployments/granted); from then on the owner grants every new account (POST /deployers), and each organization approves the new release in the rollout GET /deployers on every node: deployments: granted though every node runs with the default --deployments open, deployers: owner, the owner and the operator’s grant; a second switch, the operator’s grant and its release approval are refused as on the old release yes (since 1.0.0-rc.15, granted run only)
Deployments granted-installs a granted account’s install (POST /packages/install) and app of it; an ungranted admin of its organization makes an instance of that release, which it sees: allowed without a grant before 1.0.0-rc.36, refused 403 DEPLOY_NOT_GRANTED from it (only a deployment’s offer) the apps read back; an ungranted account’s install, bundle upload and POST /apps of a registry release (and, seeded on a release that has offers only, the admin’s instance) refused 403 DEPLOY_NOT_GRANTED as on the old release; on the new release the granted account installs another package yes (since 1.0.0-rc.15, granted run only)
Deployments owner-deployers the cluster owner’s grants (POST /deployers, its passkey): an organization’s until a date, whose owner installs on it; an account’s, revoked again (DELETE /deployers/{key}) after it installed GET /deployers as the owner on every node; an account reads no grants; the revoked account’s release still installed and its next install refused DEPLOY_NOT_GRANTED; on the new release the owner grants another account, which installs, and revokes the organization’s grant yes (since 1.0.0-rc.15, granted run only)
Governance owner-release-approvals an organization’s own release approvals (POST /orgs/{org}/releases, passkey): an older release added to the one it was made through, and an app of it holding data GET /ops/orgs keeps every approval seeded, plus the new release its owner approved in the rollout; the app moved onto the new nodes on that approval and reads back; a member without APPROVE_RELEASES is refused as on the old release yes (since 1.0.0-rc.15, granted run only)
Governance release-deadlines the operator’s release deadlines (POST /ops/releases/{version}/deadline): a passed one on the old nodes’ release (so no node retires) and one announced far ahead; an organization that approves only an older release (2.3.999) is stalled; its owner, also a member of one on the old release, is served and installs, but makes no app in it GET /releases lists both deadlines; a new app in the stalled organization is refused 409 RELEASE_DEADLINE as on the old release, while the other’s app reads back; on the new release the stalled organization approves the new release and creates an app, and the far deadline is lifted yes (since 1.0.0-rc.15, granted run only)
Representative accounts-and-keys Accounts with passkeys, meroctl sessions and API keys. read back, extended, read again yes
Representative organization An organization with members, a team with a member, an open invite and app teams. read back, extended, read again yes
Representative kv-package The release’s signed kv package, an app instance of it in the org with history, an app team, a read-only key; upgraded on the new release to a build of this tree. read back, extended, read again yes
Representative blobs Plain blobs of the kv app, one referenced from its state. read back, extended, read again yes
Representative files-and-compute Sealed files (one of three segments) of a compute app from a signed package, and a compute run finished on the old release; on the new one a run reads the old files. read back, extended, read again yes
Accounts account-passkeys an account with three passkeys: one labelled, one removed the passkey list and labels; every kept passkey signs in on each node, the removed one is refused; a label set on the new release yes (since 1.0.0-rc.15)
Accounts account-sessions sessions opened on old nodes, one revoked; an account signed out everywhere a refresh token an old node issued refreshes on every node; its session token is accepted while that node is in the cluster and refused once it is removed; the revoked session’s and the signed-out account’s refresh tokens are refused; a session revoked on the new release ends yes (since 1.0.0-rc.15)
Accounts account-activity sign-ins and passkey approvals (an API key made, a confirm method called) every seeded activity entry is still listed; an approval and a sign-in on the new release add theirs yes (since 1.0.0-rc.15)
Accounts account-recovery-code an account recovery code made on the old release recoveryCode stays set; the code begins a recovery on every node and a wrong code is refused; removed on the new release, it is refused yes (since 1.0.0-rc.15)
Keys api-keys API keys: read-only for one app, one method of one app, with a TTL, revoked; an alias each key allowed and refused exactly as before (reads, writes, its method, its app, another app); the revoked key stays refused; the key list and the alias; a key made and one revoked on the new release yes (since 1.0.0-rc.15)
Keys upgrade-keys an upgrade key (an API key that may only move one app to releases of its package) the key still cannot call or read the app; on the new release it upgrades the app to the next release, and is refused another app yes (since 1.0.0-rc.15)
Organizations org-members-roles an organization with metadata, an admin, members (one granted CREATE_TEAM), a guest, member metadata, a removed member, a member who left, an organization app the organization as the owner, a member and a guest read it; the members’ security view; who reaches the app (members yes; removed, departed and outsider no; the guest as before) and who may read security and write metadata; CREATE_TEAM makes a team on the new release, a plain member is refused; metadata written there yes (since 1.0.0-rc.15)
Organizations org-invites invites: a multi-use one used once, an unused single-use one, a used-up one, a revoked one, a guest invite into one team (app-only access) the invite list; the revoked and used-up invites are refused; the guest reaches its team’s app only; the unused and multi-use invites made on the old release redeem on the new one yes (since 1.0.0-rc.15)
Organizations org-ownership an organization whose owner handed it to a member the roles after the hand-over; the former owner is refused owner-only actions; the new owner changes a role on the new release yes (since 1.0.0-rc.15)
Organizations org-deleted an organization with an app and a team, deleted the organization and its app stay gone; the owner makes a new one on the new release yes (since 1.0.0-rc.15)
Organizations org-recovery-key an organization with a recovery key, and a recovery a member started with it on the old release the recovery key and the pending recovery; finishing early and a recovery signed with another key are refused; the owner keeps the organization; the owner cancels it on the new release and the member starts it again yes (since 1.0.0-rc.15)
Organizations personal-org instances created without naming an organization, which go to the personal organization made at sign-up; one of them shared with a named account outside it (an account grant) both instances in the one personal organization, marked personal, with their data; the named account still reaches the shared one without being a member (organizations made ordinary in 1.0.0-rc.32 keep that); another instance made without one joins the same organization, now its owner’s only one yes (since 1.0.0-rc.20)
Organizations ordinary-orgs an account signed up once organizations are ordinary (no organization from sign-up), an instance it made naming none (in a new organization of its own), and its data the account is in that one organization, its owner, not personal; the instance there with its data; another instance naming none joins it; a transfer to someone outside it is refused yes (since 1.0.0-rc.32)
Organizations org-capabilities an organization created with member default capabilities (POST /orgs { capabilities }) and an invite carrying capabilities, redeemed by a new member; both fields wait for the cluster version that brings them, so they are made after the roll the organization’s default capabilities and the member’s own setting as the owner reads them; a member holding two capabilities may not mint an invite granting a third (403), and may mint one granting what they hold yes (since 1.0.0-rc.29)
Organizations instance-guests an organization’s instance of a release that admits guests (guests: allowed): an outsider named on it with an app-defined scope (an account grant), and an instance invite with a scope that another outsider redeemed who reads and writes it (the owner, a member, both guests, an outsider never named, no credential); the grants with their scopes as the owner reads them, a guest seeing only their own; each guest’s scope as the app reads it (env::grant_scope); a guest reaches nothing of the organization; the invite’s uses left; on the new release the organization turns guests off (allowGuests) and both are refused while its members are not yes (since 1.0.0-rc.33)
Organizations state-caps an organization with two teams and its own metadata, made while the operator held maxTeamsPerOrg at 2 and maxMetadataBytesPerOrg at 20 000 (a third team and team metadata past the bound refused 429 QUOTA_EXCEEDED), then put the quotas back the cluster’s quotas at their defaults; the organization’s two teams and metadata; its teams in pages of one (limit, nextTeamsAfter), then all of them; a third team on the defaults yes (since 1.0.0-rc.39)
Teams teams an open team; a closed team with a lead, a member, a read-only member and a removed member; a private child team; an app on each each team as before; who reads and writes each team’s app (the closed team excludes non-members, read-only reads only, the removed member is refused, the open team admits the organization, the child only its members); a member added on the new release writes yes (since 1.0.0-rc.15)
Teams app-teams two packages’ instances in an organization given app teams (ScopeApps): one closed keeping one member, one open the app-team list; the kept member and the open team’s members reach their apps, the member who lost the closed one is refused it; the closed one opened again on the new release admits them yes (since 1.0.0-rc.15)
Teams app-channels two packages’ app teams in an organization; a channel an unbound session made under one; a session bound to that package’s frontend makes a channel under its app team, renames it, adds a member, and makes and deletes another the channels and their members as before; the bound session is still bound to its package and still refused (403) a channel under the other package’s app team, an org-wide team, the app team’s mark and deleting it, and an organization role; on the new release it makes, renames, fills and deletes a channel again yes (since 1.0.0-rc.20)
Packages packages two signed releases installed from the registry and the second uninstalled again; an app on the first with data; an app from a dev bundle (raw component) the package and its versions; both apps answer from the new nodes; on the new release the uninstalled version installs again and the app upgrades to it keeping its data; the release’s capability card reads with its ABI yes (since 1.0.0-rc.15)
Packages release-visibility kv-b 1.0.0 installed from the registry by an account whose organization holds a second member, who never installed it (a release recorded before it was public or private) the release from before keeps exactly its rule: the member lists it on every node and, on the new release, creates an instance of it, and an account sharing no organization with its installer does not list it on any node; kv-c installed on the new release, which the registry serves to anyone, is public: an account in no organization lists it and creates an instance of it yes (since 1.0.0-rc.15)
Packages package-origins two web origins registered for a package by its manager: one plain and one the cluster serves (a custom domain) the manager’s list as they read it; the operator’s served-origins list naming the package’s host label; a stranger refused the list and the registration; on the new release one origin removed and two registered while the other seeded served origin stays, after a restart too; on every node a sign-in begun from a registered origin names that origin’s host as its rp-id and one begun from an unregistered or removed origin is refused ORIGIN_NOT_REGISTERED. The assertion itself is not signed yes (since 1.0.0-rc.16)
Packages publisher-binding a package signing key bound to an organization (its publisher) the binding and its generation as anyone reads them; a second key bound on the new release yes (since 1.0.0-rc.15)
Upgrades app-upgrade-migration notes 1.0.0 and 2.0.0 (state version 1 to 2) installed; an app upgraded to 2.0.0, one left on 1.0.0, two upgraded by an organization-wide upgrade run each app’s release and notes; the run’s status as a member reads it; the app left on 1.0.0 upgrades on the new release keeping its note and gains 2.0.0’s methods; a new run there yes (since 1.0.0-rc.15)
Upgrades update-classes-approvals notes 1.0.0 and 2.0.0 (red: its state version changes) in an organization whose update policy asks for a second approver; one app upgraded by an admin on the owner’s first approval, one with the owner’s first approval still waiting (instance approve-update) the upgraded app’s lastUpgrade (class red, its reasons, the first approver) and the waiting approval as the admin reads them on every node; the owner alone is refused SECOND_APPROVAL_REQUIRED; on the new release the admin applies the update the old release’s approval covers, recorded red with that approver, and the app keeps its note yes (since 1.0.0-rc.34)
Upgrades restore-points-undo two notes apps upgraded from 1.0.0 to 2.0.0, each taking a restore point, and written to after; one of them undone back to 1.0.0 and its note from before (instance undo) the kept app’s restore point and lastUpgrade as its owner reads them, its undo offered while the restore point’s node is in the cluster and refused RESTORE_POINT_UNAVAILABLE once the roll took that node; the undone app on 1.0.0 with its note from before and nothing left to undo; on the new release the undone app is upgraded again, written to and undone back to that note yes (since 1.0.0-rc.34)
Upgrades unclassified-updates kv-r 1.0.0 and 1.1.0 (one WASM) installed and 1.0.0 uninstalled under three apps that run it, so their update cannot be classified (red, an unclassified reason naming the release that is gone); in an organization whose policy asks for a second approver, one app upgraded by an admin on the owner’s first approval and one with that approval still waiting; one upgraded by its owner where no policy asks each app’s lastUpgrade (red, its unclassified reason, the first approver) and data; the waiting app’s update (red, unclassified) and approval on every node, the owner alone refused SECOND_APPROVAL_REQUIRED; on the new release the admin applies the waiting update, and 1.0.0 is installed again, an app made on it, uninstalled, and that app’s unclassified update approved and applied the same way yes (since 1.0.0-rc.35)
Deployments deployment-used-secrets a deployment offering a release that uses (uses) another package, whose release declares a secret, and the deployment’s value of that secret; the release’s uses and the value wait for the cluster version that brings them, so they are made after the roll the deployment’s secrets as its manager reads them: the value’s fingerprint, the release that declares it (declaredBy) and the offered app that uses it; an outsider is refused the list, and a name nothing it reaches declares is refused; a new value set on the new release yes (since 1.0.0-rc.32)
Deployments deployment-offer-upgrades a deployment offering release 1.0.0 of a package whose 1.1.0, 1.2.0 and 1.3.0 are installed too, and a customer’s two instances from it; the customer’s owner refused an upgrade outside the offer (409 OUTSIDE_DEPLOYMENT), then, the deployment offering 1.1.0, accepting it on one instance without naming a version the deployment’s offer; each instance’s release and data, on the deployment; GET /apps/{app}/update (available with source: deployment where the instance runs another release than the offer, none where it runs the offer; mayApprove and approvers for the owner); every installed release but the offer and the one it runs refused OUTSIDE_DEPLOYMENT to each instance; on the new release the other instance takes the offer naming its version, the deployment offers 1.2.0 and the first instance accepts it naming none yes (since 1.0.0-rc.33)
Deployments deployment-named-to-customers a deployment offering a release, and a customer’s instance from it GET /apps/{app}/update names the instance’s deployment with its id and its owner’s kind and name (names are not unique), as GET /deployments/{id} names the owner; on the new release a second instance from it is named the same way yes (since 1.0.0-rc.38)
Deployments deployment-needs-recovery an organization with a recovery key, and a deployment it owns the organization keeps its key; removing it is refused (409 RECOVERY_KEY_REQUIRED) while it owns the deployment, before the passkey; on the new release rotating it succeeds, and another organization without a key is refused a deployment yes (since 1.0.0-rc.38)
Deployments deployment-transfer an account’s deployment offering a release, with a customer’s instance from it, handed to an organization with a recovery key: offered by the account, accepted by the organization the organization owns it (GET /deployments/{id}), its offer and the customer’s instance stay, the previous owner changes nothing (403), and the customer’s GET /apps/{app}/update names the new owner and whom it came from; on the new release the organization offers it back and cancels the offer, and a second offer waits for none yes (since 1.0.0-rc.38)
Deployments deployer-grants the operator’s deployer grants on the open cluster (POST /ops/deployers, signed with the operator key): an account’s without an end, an organization’s until a date, and an account’s revoked again (DELETE /ops/deployers/{key}) GET /deployers as the operator on every node: deployments: open, deployers: operator, no owner, and each grant (key, deployer, end, operator); an account refused the list and the owner’s grant route, a grant without the operator’s signature answered 428; on the new release the organization’s grant revoked and another account’s granted yes (since 1.0.0-rc.15, open run only)
Apps app-state-history an app with 40 writes (sets, overwrites, removals) and app metadata every entry through each node, the length, the full event history from index 0 (the event stream’s replay), the app record, its storage figures and ABI; a write on the new release extends the history after the old events yes (since 1.0.0-rc.15)
Apps app-access-kinds an organization’s app with each kind of grant alone: none (the owner), the organization, a named account, anyone, a team who reads and writes each (the owner, a member, the named account, an outsider, no credential), allowed and refused as before (anyone admits the outsider, never a caller without an account); each instance’s grants as the owner reads them; a grant added on the new release yes (since 1.0.0-rc.33)
Apps app-access-grants an organization’s instance whose access is a list of grants: a team, a member outside it named with an app-defined scope, and an outsider named (a guest, whom the release does not allow); grants wait for the cluster version that brings them, so they are set after the roll who reads and writes it (the owner, the team’s member, the named member, the guest, a member neither in the team nor named, no credential) and the grants with their scope as the owner reads them; a guest sees nothing of it; on the new release the team’s grant goes and the organization’s takes its place yes (since 1.0.0-rc.33)
Teams team-deleted-keeping-apps an organization’s two instances only a team admits, one also naming a member outside the team; the team deleted with keepApps, which waits for the cluster version that brings it, so it is done after the roll both instances kept with their data: the one naming a member keeps that grant alone, the other an empty grant list; who reads each (the owner, the named member, the team’s former member, no credential); on the new release another team deleted without the flag takes its instance yes (since 1.0.0-rc.33)
Apps public-links an organization’s private instance with a public link (label, rate) and a revoked one; a visitor with a key of its own signed the guestbook (a #[app::public] method) through the link the instance’s links as its owner lists them (never the token); the visitor, named by link and key (Caller::Visitor), calls the public view through every node and is refused a method that is not public; the revoked link’s visitor is refused; what the visitor wrote, as the owner reads it; on the new release the visitor signs again and a link made there admits a visitor of its own yes (since 1.0.0-rc.33)
Apps xcall two apps of an organization; writes relayed from one to the other (xcall), one refused by the callee, one dead-lettered the relayed writes, what onXcallFailed recorded, the xcall list and its dead letters on every replica; a relay lands in the mixed cluster (across releases while the two apps sit on different ones) and on the new release yes (since 1.0.0-rc.15)
Apps xcall-batch three apps of an organization; a run that calls two of them together (app::join!, one xcall.batch) twice each target’s count and the answers of the joined calls; the batch runs again in the mixed cluster (its targets may sit on different releases) and on the new release, each target counting once per run yes (since 1.0.0-rc.31)
Apps full-text-search notes in an app’s full-text index (title and body), one dropped each search answers the same notes through every node (each rebuilds its index); a note added on the new release is found yes (since 1.0.0-rc.15)
Apps presence presence published in an app (ephemeral: it expires by design, so nothing is carried) presence publishes and reads back through every node, in the mixed cluster and after yes (since 1.0.0-rc.15)
Apps app-transfer-move an app handed to another member of its organization (transfer); an app moved to another organization with its members the owner and organization of each, their data; the moved app’s members reach it in its new organization; handed back on the new release yes (since 1.0.0-rc.15)
Metering usage-and-storage an organization’s app with writes; the account’s and the organization’s usage the app’s per-day usage history (earlier days unchanged, today’s figures only grow), the account’s usage counts and the organization’s usage yes (since 1.0.0-rc.15)
Apps app-origins a web origin registered for one instance by its owner the owner’s list as they read it; a stranger refused the list and the registration; on every node a sign-in begun from the origin names its host as its rp-id; on the new release the origin removed and another registered, after a restart too; a removed origin is refused ORIGIN_NOT_REGISTERED. The assertion itself is not signed yes (since 1.0.0-rc.39)
Apps units planner 0.1.0 and 0.2.0, whose releases use a calendar with mode = "create", and calendar 0.1.0 and 0.1.1: a planner instance created with its calendar (links) and events scheduled through it; a second unit upgraded to 0.2.0 in one consent (upgrade-unit, its calendar to the 0.1.1 the release pins); a third unit left to delete; a kv unit whose member reads the instance that created it each instance’s links and its member’s record (name, organization, owner, release); the agenda the planner reads from its calendar through every node; the upgraded unit’s run and both releases; a member deleted alone is refused UNIT_MEMBER; the release’s uses on its capability card, the unit’s destinations (egress) and its update’s verdict; the kv member’s unitOf and the instance’s linked through every node; on the new release the first unit schedules again and upgrades in one consent keeping its agenda, and the third is deleted whole with its calendar yes (since 1.0.0-rc.32)
Apps attached-app-delegation a booking page whose release uses a calendar with mode = "attach" and the methods it calls as the person; its owner attaches their calendar instance (PUT /apps/{app}/links/calendar); a member books a slot before granting it (the event is booking’s own), grants it with their passkey (PUT /apps/{app}/delegations/{target}) and books one that lands in their own calendar the attached app (attached, the link’s row with its release and inRange) and the member’s grant with its methods; booking reaches the attached calendar (env::linked) and acts as the member there (env::via): the member’s own events, each one’s free slots through every node, and a private booking through the app refused; on the new release a booking lands in the member’s calendar, the grant is taken back and the next booking is booking’s own again yes (since 1.0.0-rc.31)
Apps instance-secrets a release that binds a secret to a header of its outbound host (secrets), an instance of it whose owner set its own value, and one with none each instance’s secret as its owner reads it: the declared name, its binding in words, source (app with the value’s fingerprint, cluster without one) and never the value; an undeclared name and a member’s value are refused; on the new release the owner sets a new value (a new fingerprint) and clears the other yes (since 1.0.0-rc.31)
Deployments deployment-unit-secrets a deployment offering a release that declares a secret and one that creates (uses, mode = "create") an app of the first, the deployment’s value of that secret, and a customer’s instance of each from the deployment, the unit with its member the customer’s instances and the unit’s member all on the deployment (unit_offer), the member and the offered app’s instance reading the secret from the deployment (source: deployment) and the customer refused to see the deployment’s values; the deployment’s fingerprint and the offered apps that declare or use it; on the new release a new value, the member still on it, and another customer instance from the deployment gets its member there too yes (since 1.0.0-rc.32)
Blobs and files sealed-files-sessions files an app wrote itself, an upload session begun with one of its parts sent, a plain blob deleted (the representative set uploads files of several segments) each app-written file’s size and SHA-256 as the app reads it; the half-done session expects its next part while its leader (an old node) leads and answers UPLOAD_UNKNOWN once the app moved (documented: the client begins again); a session begun on the new release completes with the right digest; the deleted blob stays gone yes (since 1.0.0-rc.15)
Blobs and files published-blob-grants a compute output published as a plain blob; a download grant of it, the owner’s revoke, and a grant made after the revoke on every node the grant from before the revoke is refused 404 and the one after it serves the blob’s bytes; on the new release a new grant serves, a second revoke ends every earlier grant and a grant made after it serves yes (since 1.0.0-rc.31)
Blobs and files blob-usage two plain blobs uploaded to an app of a fresh organization, one of them uploaded twice, and one deleted by the owner the organization’s fileBytes in /auth/usage counts each held blob once and not the deleted one; on the new release another upload adds its size and a delete gives it back yes (since 1.0.0-rc.39)
Governance outbound-approvals an organization’s outbound approval for a package and an account’s own each approval as its holder reads it (or the same refusal, where governance gives it to the operator); every release the cluster approved stays approved after the roll yes (since 1.0.0-rc.15)
Governance upgrade-policies an organization’s update policy asking for a second approver, with a two-day hold (org upgrade-policy) the policy as the organization’s owner reads it on every node; dropped on the new release and read back as the defaults yes (since 1.0.0-rc.34)
Ops ops-state account quotas changed, a per-organization quota override, a compute pool quotas, overrides, pools, the cluster’s sign-up policy as before (its invites are sign-up-invites’); a quota changed and a backup written on each new node yes (since 1.0.0-rc.15)
Ops backup-keys an organization’s and an account’s backup key (what the recovery disk seals their apps’ files to) each key as its holder reads it, or the same refusal where governance gives app upgrades to the operator; how many apps each covers yes (since 1.0.0-rc.20)
Ops state-digests two apps with data written, replicated on the old nodes (each leader compares its replicas’ state digests) on every node no replica is reported diverged and none ever was (calimero_group_diverged, calimero_group_divergences_total), in the mixed cluster, after the roll and after a restart; once every node runs the new release each app’s leader has compared its replicas (calimero_group_digest_comparisons_total above zero for both groups) and compares again after new writes and after a restart, which tells a comparison that agreed from one that never ran yes (since 1.0.0-rc.31)
Accounts sign-up-invites two cluster sign-up invites issued by the operator (a token each), one of them revoked the invite list as the operator reads it; on every node, new ones included, a sign-up beginning with a live token is taken and one with a revoked or an unknown token is refused SIGN_UP_REFUSED, for the tokens the old release issued and revoked as for the new release’s; on the new release one more invite is issued and another issued and revoked, the old live one left live yes (since 1.0.0-rc.18)
Ops restore-backup an app with a key and a sealed file, backed up on every node (POST /ops/backup), then given another key and another file: the second ones are not in the backup the app answers with both keys as before; on the new release the operator restores the old release’s backup by name (ops restore --backup), not a newer one, and the restore names that backup: the app holds the first key and the first file (size and SHA-256) and neither of the second, and takes new writes yes (since 1.0.0-rc.18)
Ops job-node-attestation the job node the cluster registered (compute runs use it); nothing is stored beyond its registration the operator’s read of each registered job node’s attestation answers admitted: the old release’s nodes judging the old job node, then every new node judging that old job node once it serves again after the roll (and a compute run started then is placed on it and ends), then the new nodes judging the new one; while the cluster is mixed the old job node, which the pipelines case stopped, may be unreachable; a replica’s id is refused 404 yes (since 1.0.0-rc.25)
Pipelines pipeline-runs a compute-only package registering a fan-out (batch 2) and collect pipeline, installed as an app; three sealed input files; a run to completion and a re-run of the same inputs; the cluster’s job node stopped, then a run over three new files that waits unplaced across the roll the finished run’s state, step states, runs and outputs; its receipt verifies against its outputs on the old release, and on the new one still verifies when the old release logged job evidence (1.0.0-rc.26 on) and is otherwise refused for its jobs; its outputs download byte for byte; the re-run’s steps came from the step cache; a stranger is refused starting a run, the receipt, the events and the run’s export; on the new release a run recorded on the old one answers every output under one export; the run left in flight is still running mid-roll, then ends succeeded on the new release with each item run once, its outputs byte for byte and its receipt verifying; on the new release a run over a new file completes and a re-run is still answered from the cache; a retry of the run seeded on the old release, whose inputs the old release holds until its record is dropped, and of the run made on the new one, whose inputs it holds for 24 hours, both succeed; the app’s result retention reads 7 days, is set to 30 by its owner, refused for 91 days and for a stranger; the run made on the new release wraps its inputs and intermediates under its own key, so its retry reads them through that key, and the run seeded on the old release, whose files carry the app’s file key, still downloads after the roll yes (since 1.0.0-rc.19)
Pipelines app-pipeline-runs an app whose release uses the fan-out pipeline package with mode = "attach", attached to an instance of it, and a second instance of that app with nothing attached; three sealed files in the pipeline app; a run the attached app’s own method starts over them, with an idempotency key the run read through the pipeline app, its caller the app that started it, and read by that app; the start repeated with its key answers the same run; the app with nothing attached is refused starting and reading it; on the new release the app starts another run, which succeeds yes (since 1.0.0-rc.40)
Keys pipeline-keys an API key scoped to the fan-out pipeline of one instance (and its file uploads), a second instance of the package; a run the key starts over files it uploaded the key reads the run, whose caller it is; it is refused another instance, a start without a cost cap and the account; on the new release it starts another run, which succeeds yes (since 1.0.0-rc.40)
Keys An API key made with follow-ups (POST /auth/apikeys { then }): confirm calls approved by the key’s one passkey prompt - - no: it adds no stored shape: the key’s record is unchanged and each follow-up is an ordinary call entry of its app with the key’s consent; CreateApiKey::then is new in the log only behind cluster version 1.0.0-rc.38 (Feature::KeyFollowUps), and an entry without it replays as before. tests/it/key_follow_ups.rs and system::tests::credentials_need_the_accounts_own_passkey cover it on one build
Accounts A session bound to a browser’s holder key (login/begin { holderKey }, refresh { holderProof }, RefreshRecord::holder): refreshed only with the key’s proof, 7 days - - no: the proof is an ECDSA P-256 signature, which the suite’s standard-library Python cannot make, and meroctl binds no session to a holder key; CreateRefresh, UseRefresh and CreateAccount with a holder are new in the log only behind cluster version 1.0.0-rc.39 (Feature::SessionHolders), a record without one reads and replays as before (the account-sessions case), and tests/it/refresh.rs covers binding, proofs and exchange on one build
Accounts Account recovery started and finished with a new passkey - - no: the start takes a WebAuthn registration made outside a session, which neither meroctl nor the suite’s standard-library Python can make (P-256); the cluster tests cover it on one build. The recovery code (account-recovery-code) is covered
Accounts Finishing a sign-up with a cluster sign-up invite (register/finish { invite }, which spends a use) - - no: the finish carries a WebAuthn registration made by a new P-256 passkey, which the suite’s standard-library Python cannot make; meroctl’s login --dev-passkey registers a new file but takes no invite, and the release’s meroctl is the one that seeds. Issuing, listing and revoking an invite and the node’s refusal or acceptance of a token at register/begin are covered (sign-up-invites); tests/sign_up.rs covers the finish and the spent use on one build
Accounts Consent-page approvals (/consent/requests: release, upgrade and outbound approvals; the organization kinds createOrg, createInvite, acceptInvite, leaveOrg, removeMember, setMemberRole, setMemberTeams, removeMemberTeams, revokeInvite, renameOrg, deleteOrg, setCapabilities, setAllApps, setEgress) and the page’s verifier link - - no: a consent request is approved in a browser on the node’s consent page; the cluster test consent_page.rs covers every kind on one build. What an approval writes is the same log entry as the API’s route, which the organization and team cases cover; a createOrg asked from an app’s frontend also makes that app’s team in the same CreateOrg, the organization and team ScopeApps makes, which app-teams covers. The verifier link is a startup setting (--attestation-verifier-url) that stores nothing
Accounts A sign-up name past MAX_ACCOUNT_NAME_CHARS, or a passkey ceremony body past MAX_PASSKEY_CEREMONY_BYTES, refused at register/begin - - no: a refusal before any ceremony is held stores nothing, so an upgrade has nothing to carry; tests/it/sessions.rs covers it on one build
Accounts A node’s pace of sign-ups (SIGN_UPS_PER_MINUTE, --sign-ups-per-minute): past it register/begin and register/finish are refused 429 RATE_LIMITED with Retry-After - - no: the bucket is node-local memory, never stored or logged, so an upgrade has nothing to carry; tests/it/sign_up.rs covers it on one build
Packages A passkey sign-in completed from a registered origin (a session bound to the package and naming it) - - no: the harness’s passkeys are the dev passkey’s, which holds a credential under the cluster’s rp-id only, and an origin’s own rp-id needs a credential made for that site in a browser; package-origins covers the begin (the rp-id each registered origin gets and the refusal of any other), and the finish on a frontend the node serves is Bound‘s (the packages’ own frontends)
Packages Served frontends and served origins (custom domains) - - no: the suite’s packages carry no frontend, and the node routes a frontend by Host under the apps domain, which plain HTTP on 127.0.0.1 does not reach; the cluster test app_frontends_are_served_and_their_sessions_are_bound covers serving
Packages A release’s frontend digests (GET /packages/{package}/{version}/frontend) - - no: the suite’s packages carry no frontend, so the route answers 404 for every release they install; it reads the installed .mpk and stores nothing, and the cluster test a_releases_frontend_digests_match_the_files_it_serves checks each digest against the bytes served
Packages Origins a release’s page may connect to (frontend.connect, added to its connect-src) - - no: the suite’s packages carry no frontend, and the list is read from the installed .mpk at serve time and stored nowhere else; app_host’s a_page_connects_to_what_its_release_declares_and_nothing_else covers the header and calimero-bundle’s frontend tests the manifest rules
Packages One compile running or waiting per account at install and raw bundle upload (429 TOO_MANY_COMPILES) - - no: a node-local admission limit that stores nothing and logs nothing, so a roll carries no data of it to read back; tests/it/slow_compile.rs’s one_account_filling_the_compile_queue_leaves_room_for_another covers it
Deployments A deployment’s customer accepting its offer on the consent page - - no: the page is approved in a browser, and a consent request lives in one node’s memory for minutes; what it logs is the UpgradeApp that POST /apps/{app}/upgrade without a version logs, which deployment-offer-upgrades covers with GET /apps/{app}/update’s source: deployment. a_customer_accepts_its_deployments_offer_on_the_page (consent_page.rs) covers the page on one build
Deployments A customer’s instance outside every deployment on a granted cluster, refused at create and on an upgrade into a deployer’s package (403 DEPLOY_NOT_GRANTED; CreateApp { offers_only } and UpgradeApp at apply, Feature::OffersOnly) - - no: a refusal that stores nothing, on a granted cluster, which the open upgrade-path cluster is not and cannot become without turning every case that installs after the switch red; an entry without offers_only replays as it applied below cluster version 1.0.0-rc.36. on_a_granted_cluster_a_customer_creates_only_from_an_offer (deployments.rs) and system::tests::on_a_granted_cluster_an_instance_outside_every_deployment_is_a_deployers and ..._keeps_out_of_a_deployers_package (the replay) cover it on one build
Apps Watching an action’s live answer (GET /apps/{app}/actions/{id}/stream) - - no: it is held in memory on the node running the action and never logged, stored or replicated, so a roll has nothing to carry: the restart closes the streams and the subscriber opens them again. action_streams::tests and the it tests action_streams:: cover it on one build
Apps Only an owner or admin of an app’s organization approves its upgrades, runs and upgrade keys (SystemState::approves_upgrades, owner_approves on UpgradeApp, StartUpgradeRun and CreateApiKey) - - no: it changes who may, not a stored shape: an entry without owner_approves reads and replays as it applied below cluster version 1.0.0-rc.33 (Feature::OwnerApprovedUpgrades), and the owner’s upgrade after the roll is already the kv-package case’s (extend: the organization’s owner upgrades on the new release). system::tests::only_an_organizations_owner_and_admins_approve_its_upgrades covers the replay, and a_member_needs_the_capability_to_create_apps_or_invite, the_leader_checks_upgrade_authority_again and an_upgrade_key_is_an_owners_or_admins_of_the_apps_organization the refusals on one build
Apps A green update applying on its own after its hold (UpgradeApp::auto, lastUpgrade.auto) - - no: the hold is at least a day (MIN_HOLD_HOURS) of logged time from the release’s install, which a deep run cannot wait on either release (the tests move the update clock with a testing hook a release merod lacks), so no automatic update is seeded or made; the policy that asks for one is the upgrade-policies case’s, and the restore point every upgrade takes and its undo are restore-points-undo’s. An upgrade entry and a record without auto read and replay as before. system::tests (a_green_update_applies_on_its_own_after_its_hold_under_the_policy, a_deployment_instances_hold_runs_from_its_offer) and tests/auto_updates.rs cover it on one build
Apps An undo refused to a release no longer installed (UndoUpgrade::release_installed, UNDO_RELEASE_GONE) - - no: it adds a refusal, not a stored shape: an entry without the flag replays as it applied below cluster version 1.0.0-rc.36 (Feature::UndoToInstalledRelease), and the undo itself is restore-points-undo’s. The refusal needs a release uninstalled while another release’s WASM keeps the bundle, which the case’s single-WASM releases do not make. system::tests::an_undo_never_returns_to_a_release_that_is_no_longer_installed and tests/auto_updates.rs::an_undo_is_refused_to_a_release_that_was_uninstalled cover it on one build
Apps An instance’s outbound audit (GET /apps/{app}/outbound-log, meroctl instance outbound-log) - - no: it stores nothing: each node keeps its runs’ requests in memory (calimero_outbound::OutboundAudit), which a restart or a roll empties by design, so there is no data to carry across releases; the suite’s clusters also run with outbound off. an_instances_owner_reads_its_outbound_requests_without_values (component_cluster.rs) and calimero_outbound’s audit tests cover it on one build
Apps Host work charged to fuel, and at most MAX_SEARCHES_PER_RUN searches per request (calimero_app_host’s fuel table) - - no: it changes what a run may spend, not a stored shape: followers apply a call’s diff and never run it, so the log replays alike on either release, and a search cap answers a view, which is never logged. The deep cases’ calls and searches run far within the default fuel on both releases. tests/engine.rs (reading_megabytes_of_state_costs_fuel, a_view_makes_at_most_max_searches_per_run, a_guest_cannot_spend_fuel_its_host_calls_already_owe, refused_xcall_arguments_cost_fuel, stdout_costs_fuel_after_the_log_is_full) covers it on one build
Apps Timers (#[app::every]) firing across the roll - - no: the only timer the suite’s apps carry is the kv fixture’s beat, declared #[app::every("1h")] and run on the nodes’ wall clock: one tick needs an hour, and a roll takes minutes, so no tick falls in any phase and there is nothing to seed or read. The tests move the app clock with a test-only clock that a release merod lacks, and no flag or route moves it; ticks_run_once_per_slot, a_tick_runs_once_across_failover and missed_ticks_collapse_into_one (component_cluster.rs) cover ticks on one build
Apps The consent page’s install sheet (install), update sheets with their class, policy and approval step (“Approve (1 of 2)”, “Approve and update (2 of 2)”), an update policy changed on the page (updatePolicy), the node’s updates page (updates, /updates/{id}, POST /consent/{id}/open) and GET /apps/{app}/update’s summary - - no: pages and reads that store nothing of their own: a consent request lives in one node’s memory for minutes, and what the pages approve is logged by the routes they run (POST /apps, SetUpgradePolicy, ApproveUpgrade, UpgradeApp), whose stored shapes are the upgrade-policies and update-classes-approvals cases’. an_install_sheet_shows_what_gets_created_and_where_data_can_go and an_update_shows_its_class_and_takes_two_approvers_on_the_pages (consent_page.rs) cover them on one build
Apps A view’s arguments held to MAX_ARGS_BYTES (413 ARGS_TOO_LARGE before it runs, as a call’s) - - no: it adds a refusal of a request, not a stored shape: a view logs nothing, and the API refuses before any node runs it, so there is no data to carry across releases. oversized_view_args_are_refused_before_running (component_cluster.rs) covers it on one build
Apps An xcall chain ending at its budget (MAX_XCALL_CHAIN, Feature::XcallBudget): a message sent with none left is dead-lettered - - no: the chain needs hop or bounce, which the published kv fixture the old release seeds with does not have; what a chain stores is an outbox row and a dead letter, whose old shapes (no budget) the xcall case reads back. an_app_that_xcalls_itself_stops_at_the_chain_budget and xcalls_sent_from_on_xcall_failed_share_the_chain_budget (component_cluster.rs) cover it on one build
Apps A full outbox keeping its queue (MAX_OUTBOX, Feature::XcallKeepsQueue): an xcall past it is dead-lettered alone - - no: filling an outbox takes 10,000 undelivered messages, which the published kv fixture the old release seeds with cannot hold back from delivery; what it stores is an outbox row and a dead letter, whose shapes the xcall case reads back. a_full_outbox_keeps_its_queued_messages and a_full_outbox_entry_logged_before_replays_as_it_applied (component.rs) cover it on one build
Apps A pinned instance (lineage: pinned, AppRecord::lineage) held to its package, publisher and forward order - - no: no release before 1.0.0-rc.39 installs a pinning release (Feature::PinnedLineage), so the old build seeds none; tests/it/lineage.rs covers the refusals end to end and system/tests.rs the rule at apply
Apps An action’s declared wall clock (#[app::action(wall_secs = N)], the ABI’s action.wallSecs), its outbound requests’ timeout and the runner’s caps on running actions (MAX_RUNNING_PER_OWNER, MAX_RUNNING_LONG, MAX_ACTION_SECS_PER_OWNER_HOUR) - - no: the budget is read from the signed ABI at each run, the caps are the leader’s in-memory counts, and a pending action’s row keeps its shape, so nothing new is stored. The published kv fixture the old release seeds with has no such action, and a release merod has no echo host to run one against. actions_run_on_the_leader_and_reach_only_declared_approved_hosts (component_cluster.rs) covers it on one build
Apps An action started by a delivered xcall (env::start_action in XcallDeliver), run as the sending app - - no: the delivery’s entry and the pending action’s row are the shapes a call writes, so nothing new is stored; the published kv fixture the old release seeds with has no method that starts an action from a delivery. a_delivered_xcall_starts_an_action_whose_failure_its_target_hears (component_cluster.rs) covers it on one build
Governance The egress switch (POST /orgs/{org}/egress, POST /apps/{app}/egress; Org::egress_off, AppRecord::egress_off, SetEgress) - - no: it ships as a hard cutover: SetEgress is ungated and a node of an earlier release cannot decode it, so a cluster is recreated rather than rolled, and no release before it has the switch to seed. tests/it/egress.rs covers the switch, its refusals and the consent page on one build
Governance A release deadline that passes while a cluster rolls (SystemState::retired: the old nodes are placed no new app mid-roll) - - no: a deadline is judged at the command’s own time, so the granted run sets a passed one on the old nodes’ own release, which retires no node; one on the new release would stop placement on the old nodes before the roll and needs a deadline timed to the rollout. a_release_deadline_stops_new_work_but_not_running_apps (cluster.rs) covers retired nodes on one build
Operations Peers’ quotes queued apart from anonymous /attestation requests (attest::Lane::Peer, x-calimero-peer-attest) - - no: it stores nothing and changes no answer: a node of an earlier release sends no header and is queued with anyone, as before, so a roll has no data to carry. a_flood_of_attestations_does_not_keep_peers_from_attesting (cluster.rs) and a_peer_passes_a_full_anonymous_queue (attest.rs) cover it on one build
Operations Interval quotes (GET /attestation?form=interval, attest::IntervalQuotes, IntervalProof) - - no: it stores nothing: the interval key and its quote live in memory and are made again at every start, so a roll has no data to carry. While a cluster rolls, the new nodes ask the old ones for the form, which they ignore and answer with a quote over the nonce as before, and the old nodes ask the new ones for nothing new, so every roll in the upgrade path attests across both releases. new_clients_attest_and_sign_in_while_the_quote_queue_is_full (cluster.rs) and an_interval_answer_verifies_for_its_own_request_only (attest.rs) cover it on one build
Operations Peers attest each other with a quote over their own nonce (Policy::require_fresh_quote) - - no: it stores nothing and changes no answer a node gives: a node asks its peers without form and refuses an interval proof from them, and still answers form=interval to a node that asks for it, so a roll has no data to carry and attests across both releases. a_peer_is_attested_with_a_quote_over_its_own_nonce (attest.rs) and a_flood_of_attestations_does_not_keep_peers_from_attesting (cluster.rs) cover it on one build
Pipelines Live pipeline events (meroctl cloud compute pipeline watch) - - no: the stream is many lines and the suite’s meroctl runner reads one JSON answer; a stranger’s refusal is covered, the stream itself by the cluster tests

The rollout moves state between nodes; it does not show that this tree applies an old release’s log the same way. crates/node/tests/it/upgrade_replay.rs does, in process and in seconds (it runs with the other calimero-node tests): each crates/node/tests/fixtures/upgrade/<release>/ holds the data directory of a one-node cluster as that release’s merod run --dev left it (accounts with two passkeys and a recovery code, scoped API keys, an organization with a removed member, a team and an invite, apps of three access kinds with history, a note and a blob) and expected.json, every answer that release gave to a fixed list of reads (GET /auth/me, the organization, its team and invites, the apps, their storage and ABI, views as members, a read-only key and an outsider, /ops/quotas, /sign-up). The data set stays under the log’s snapshot interval, so the directory holds no system snapshot (the test asserts it) and this tree rebuilds the whole system state by applying every entry the old release logged. The test opens each directory, sends every read again (the same status, a body holding every field of the old one), then writes.

A release’s fixture is written once, with that release’s binaries, and kept: the PR that moves .github/upgrade-from to a release adds its fixture too. A hard cutover drops the fixtures of the releases before it, since the tree no longer reads their data, and the test passes with none until the first release after the cutover records one (fixtures/upgrade/README.md); 1.0.0-rc.20’s cutover dropped 1.0.0-rc.15’s, and 1.0.0-rc.33’s dropped every one before it. The fixtures held now are 1.0.0-rc.33’s (the cutover release, whose data this tree reads), 1.0.0-rc.34’s and 1.0.0-rc.35’s.

Terminal window
scripts/fetch-release.sh 1.0.0-rc.35 target/upgrade-from
python3 -I crates/node/tests/fault/upgrade_fixture.py --from-dir target/upgrade-from \
--out crates/node/tests/fixtures/upgrade/1.0.0-rc.35
cargo test -p calimero-node --test it upgrade_replay::
CI on a pull requestpull requestor merge queueci-checks.ymlScopeci-scope.pyRust lintRust tests (K/4)feature-gated testssupply chainCompatibilityprevious releaseUpgrade pathRustthe required checkcheck-like-ci.py runs thesee2e.yml (master, after merge; a PR with ci:e2e)scenarios (K/4)in-process clustersprocess suitemerod processescompute actionsreplicas + job nodesclientsmero-js · Pythonrelease.yml (when the PR builds the image)Release Merod containerthe image, loaded, not pushedE2E on the merod imagesuite.py --smokedocs-ci.ymlnpm run checkbuild + link check(docs/** only)nightlye2e.yml: 900 s soak, process suite and scenarios on the latest release image, flamegraphfuzz.yml: 30 min per target · platforms.yml: macOS build · benchmarks.yml on master

ci-checks.yml’s Scope job (scripts/ci-scope.py) decides which jobs a change needs; the required Rust check waits on every job after it, and ./scripts/check-like-ci.py runs the same steps locally.

The pull request and its merge-queue entry run the fast gate: ci-checks.yml with only the tests the change reaches (below), sdks.yml and the lints; in the queue, E2E result reports without running anything. A queue entry whose tree is exactly one its PR’s CI passed on (master did not move since, nothing queued ahead of it or batched with it) runs no Rust job again: the PR’s passing Rust uploads the tree it tested (artifact ci-passed-tree), and the entry’s Scope finds it and marks every Rust job as not needed. Any lookup that fails, or finds no match, runs the entry as usual. The push to master runs the rest after the merge: the tests the queue left out (not (test_filter) on the tree the queue tested; none when the queue ran every test, and every test for a push no pull request merged or whose files cannot be listed) and e2e.yml in full, one run per commit. A red push opens an issue titled master is red: <workflow> (.github/actions/report-master, the report-master job) naming the commit, and the next green push closes it. A red master is reverted, not fixed forward. Master is not deployed, only a release is, and a pull request that cuts one runs e2e.yml in full before it merges.

Every job runs on a standard GitHub-hosted runner (4 cores). The Rust jobs of ci-checks.yml and e2e.yml restore their rust-cache group: the dependencies and the workspace’s own crates as master last built them. setup-rust-ci then sets every tracked file’s mtime to an old date and touches the files that differ from the commit that build was made from ($RUNNER_TEMP/ci-cache-commit/commit, saved through rust-cache’s cache-directories: rust-cache deletes the files at target/‘s root before it saves, so a marker kept there was never cached), so cargo rebuilds only the crates a change reaches; with no such commit, every file counts as changed. rust-cache saves only when its key (the dependencies) changes, so the cached build is as old as the last dependency change on master. The test apps the tests build from source on first use (every guest and fixture in target/app-components, built once through calimero_app_build::build_in_repo_cache into one cargo target dir; app-build’s own test builds in target/tmp; the SDK’s compile-fail cases in target/tests/trybuild) are cached apart, saved from master, whose push runs Rust tests (1/4); that push runs every shard (shards 2-4 stop after the restore when nothing is left for master to run). That cache records its own commit (target/tests/trybuild/.ci-test-apps-commit) and the files changed since it are touched after the restore: it can be older than the rust-cache’s commit, and a crate changed in between would otherwise keep the old mtime, so cargo would reuse a stale build (trybuild once ran calimero-sdk-macros from before its messages changed). With no commit recorded, trybuild drops the workspace crates’ builds but keeps their dependencies’ (a cold build of those runs past refused_declarations’ time limit), and target/tmp starts fresh.

A pull request and its merge-queue entry run only the tests the change can reach: Scope’s test_filter (scripts/ci-scope.py) is a nextest rdeps(...) filterset over the workspace crates it changes, so Rust tests runs their tests and those of every crate depending on them, dev-dependencies included. A change reaching beyond that graph runs every test: a file outside a workspace crate (apps/, fixtures, scripts, docs/public/openapi.json, which tests read by path), an input of every job, or a crate the test guests compile from (the SDK, the app engine and their dependencies, which the guests build against outside cargo’s graph of the workspace). The queue’s diff is the entry against its base, so two changes that break each other within that graph still fail there. The push to master runs every test the filter left out, so a test the filter missed fails there. In .config/nextest.toml, the guest builder’s tests and the SDK’s compile-fail cases have a high priority, so they start first rather than leave one shard running minutes after the others, and they run alone: a build saturates the cores for minutes, and the cluster tests beside it ran past the 30 s kill. (sccache on the Actions cache was tried and dropped: with this many parallel jobs its writes hit the cache API’s rate limit.) CI builds carry no debuginfo (CARGO_PROFILE_DEV_DEBUG=0): the cache restores faster and the test binaries link faster, and a failing test still names its file and line. The workspace tests run eight at a time per 4-core shard, since most slow ones wait on timers and the network; the node’s integration tests, which start clusters and do load the CPU, take three slots each and job_runs four (.config/nextest.toml), so fewer of them share the cores and none misses its own deadline.

No test runs past 15 seconds. CI runs nextest’s ci profile (NEXTEST_PROFILE=ci): a test still running at 15 s is reported SLOW, and at 30 s it is killed and fails. Compiling a test app is not a test’s time: the Build the test apps step compiles every guest into the component cache first (cargo run -p calimero-app-build --example build-test-apps), so tests only read them. The tests over budget when the rule came in are listed in .config/nextest.toml with a limit each; that list only shrinks. To take a test off it, make the test fast without making it prove less: a test limit instead of the production one (ComputeLimits, whose poll sets how often a leader asks its job nodes, a node’s set_app_start_wait and set_upload_complete_wait, and calimero_node::testing::shared_http_timeout), polling for the state instead of a fixed sleep (eventually in crates/node/tests/harness/eventually.rs, mounted as harness::poll; a sleep stays only where it shows that something does not happen within a window), a smaller file where size is not the point, a matrix split into tests. A request a test expects to answer 503 is sent once through client.transport(): the client’s call and view send it again while the node answers 503 (D70), about seven times. A new slow test is made fast, not listed.

.github/workflows/e2e.yml runs on every push to master whose change reaches code (after the merge), and nightly on master with the long soak; a PR runs it first only when labelled ci:e2e or when it cuts a release (its workspace version has no GitHub Release yet, the test release.yml publishes on), and a merge-queue entry runs none of it, except that a change reaching the consent page or its browser tests runs the job below for it regardless. Its plan job decides from the change (scripts/ci-scope.py): the builds and the scenarios for any code change, and the process suite, compute and the clients only for a change that reaches merod’s closure, the compute fixtures or the fault tests. A push to master runs the clients (mero-swift’s on macOS) only when it changes them (sdks/clients/, the JS workspace); the nightly, a release cut and a ci:e2e PR run them whatever changed, so a client broken by the node shows at the latest the next morning. E2E result gathers the jobs, the latest release’s suites and the flamegraph included, into one check, required on PRs and in the queue, where it passes when plan skips everything. On master its report-master job opens or closes the red-master issue: master is red: E2E for a push, master is red: E2E nightly for the nightly. clients against merod (mero-swift) builds merod on macOS from the release cache group, which the nightly run saves: rust-cache keys by OS, so the Linux save never reaches it.

The jobs:

  • jobs build merod and the fixtures (build-release) and build the scenario runner (build-scenarios) compile once what the jobs below run: release merod and meroctl (which builds, packs and runs compute locally), the kv component and two signed releases of it; and the scenario runner, whose discovery they check against the script’s;
  • job scenarios (K/4) (scenarios): the runner (cargo test -p calimero-node --test scenarios) with SCENARIO_SHARD=K/4, every app-level and cluster scenario, each on its own in-process cluster; the runner builds each app’s component itself. A fuzzy_test runs 10 s, nightly 900 s;
  • job process suite (merod processes) (process-suite): build-release‘s merod and meroctl (on a PR without fat LTO, which only the nightly’s soak numbers need), the kv component and two signed releases of it, then suite.py (nightly --nightly, which also builds the Rooms component). The soak’s latency and throughput (below) go in the job summary; the artifact process-suite holds the results, the soak report and failed tests’ node logs;
  • job compute actions, real processes (compute-e2e): crates/node/tests/fault/compute_e2e.py starts three replicas and two merod run --job-node processes of a release build, installs a signed .mpk that carries the fixture’s app and compute components, and drives compute runs through a job node’s loss, a cancel, the caps and the collection of files no state references; it also checks that the job nodes were given only the compute component, and runs compute-redact end to end: an admin’s policy, a member’s 38 MB CSV of invented people, a job node killed mid-run, then the shared parts downloaded through a grant and compared with meroctl local compute run’s output (logs are the artifact compute-e2e-logs on failure);
  • jobs clients against merod (mero-js) and (calimero-client-py) (clients): mero-js’s test:cluster and calimero-client-py’s cluster tests against build-release’s merod. Both clients are this tree’s sdks/clients/, so a change that breaks a client carries the client’s fix in the same PR.
  • job consent page in a browser (consent-page): the suite above against build-release’s merod, meroctl and kv component. Unlike the jobs above it runs on every PR that reaches the page (crates/node/src/consent_page.rs, crates/node/src/consent_page/, crates/node/tests/consent-page/) or this workflow, labelled ci:e2e or not (plan’s consent_page output), and build-release runs for it alone. The sheets are the artifact consent-page-screens.

ci-checks.yml’s Upgrade path (from the pinned release) job (upgrade-path) runs the upgrade path through scripts/upgrade-path.sh on every PR that reaches merod’s, meroctl’s or the kv fixture’s dependency closure, the test or its scripts, and on master; the required Rust check waits on it. The job summary has the rollout’s steps and each case’s result; the artifact upgrade-path holds the results and, for a failed run, every node’s log and data.

ci-checks.yml runs its Rust checks as parallel jobs, every one behind Rust quick checks (format, naming, the scripts’ tests; no build), so a formatting error fails a PR in about a minute. Rust tests (K/4) compile the workspace’s tests and run a quarter of them each (a nextest archive built once was 8 GB, slower to download than to build); shard 1 also runs the doctests and shard 2 the previous release’s app (below); Compute end to end (meroctl) and Rust feature-gated tests run beside them. Rust standalone apps (K/3) runs each component app’s own cargo test (its tests/harness.rs and its app-level scenarios on TestApp), then clippy with -D warnings on the host and on wasm32-wasip2 and the app’s release wasm32-wasip2 build, every third app each. The apps are found by their calimero-sdk dependency. It runs only when the change reaches an app: apps/, or the SDK crates the apps build against and what those depend on (scripts/ci-scope.py, standalone_apps); each shard caches its apps’ target dir and the cargo registry, saved from master. App lockfiles keeps each app’s and Rust client’s own Cargo.lock (apps/, sdks/clients/) matching its manifests (cargo update --workspace --locked) and refuses a change to one the base’s copy did not need (scripts/check-app-lockfiles.py). Rust lint keeps a cache group of its own (ci-lint; clippy’s check-mode build is not the test build), saved by the push to master, which lints too. Rust docs runs cargo doc --workspace --no-deps with RUSTDOCFLAGS="-D warnings", so a broken intra-doc link (a renamed or removed item, a public doc linking a private one) fails the PR; it restores ci-lint and saves nothing. Release builds without fat LTO (the upgrade path, e2e’s process suite) share release, saved by the upgrade path; release.yml, which builds only on a release cut, restores and saves release-lto for its fat-LTO build.

Nothing has to list a scenario for it to run: the runner discovers every file on disk, and one it must not run yet is listed, with its reason, in crates/node/tests/scenarios-skip.txt and reported as ignored.

Those test a fresh build. Two jobs test the merod that ships, the binary inside the Docker image (the suite starts processes, so it is copied out with docker create and docker cp):

  • A release’s image, before it is published (.github/workflows/release.yml, job E2E on the merod image, on a release cut, the master push that changes the version, or a manual dispatch of the workflow). Merod image builds the amd64 image from the release binaries, loads it instead of pushing it, and hands it on as the artifact merod-image; Image E2E fixtures builds a release meroctl, kv-store’s WASM and two signed releases of it alongside the binaries. The job runs suite.py --smoke against the image’s merod: kv-failover, frozen-leader, orgs-and-keys, packages and a 30 s kv-soak. The release and its multi-arch image are published only once it passes. PRs and other master pushes build no image.
  • The latest release’s image, weekly and on a release cut (e2e.yml, jobs Latest release image (release-image) and process suite on release V (release-process-suite); on demand with the release_image input: latest, a tag of ghcr.io/<owner>/merod such as prerelease, or an image reference). It pulls ghcr.io/calimero-network/merod:<version> for the newest published release (a prerelease included) and runs the process suite of the commit the image was built from (its org.opencontainers.image.revision), with that commit’s meroctl and fixtures, so a test added after the release does not fail it: every test but the upgrade, with a 900 s soak. A release whose commit has no crates/node/tests/fault/suite.py is reported in the summary and not run. It runs in Sunday’s nightly (cron 23 3 * * 0; the other nights are 23 3 * * 1-6) and on the pull request that cuts a release, where E2E result waits for it. The same run covers every scenario at that commit, in four shards (jobs scenario fixtures (release V) (release-fixtures) and scenarios on release V (K/4) (release-scenarios)), with that commit’s runner and fixtures. The runner is in process, so what it tests is the release’s node source, the source its merod was built from; the binary itself is the process suite’s. A release whose commit has no crates/node/tests/scenarios.rs is reported in the summary and not run.

To run the smoke set against a binary taken out of an image locally (with the fixtures built as in Process suite):

Terminal window
docker create --name m ghcr.io/calimero-network/merod:prerelease && docker cp m:/usr/local/bin/merod /tmp/merod && docker rm m
python3 -I crates/node/tests/fault/suite.py --smoke --merod /tmp/merod

A pull request’s Rust supply chain job runs cargo deny check advisories bans licenses sources, but only on that pull request. Advisories are published on their own schedule, so .github/workflows/advisories.yml checks master itself: daily, on a push to master that changes Cargo.lock, deny.toml or sdks/pnpm-lock.yaml, and by hand (workflow_dispatch). It runs cargo deny check advisories over the workspace and pnpm audit --prod --audit-level high over the SDKs’ runtime dependencies (what mero-js and mero-react put in a user’s page). A red run opens, or comments on, one issue titled Advisories on master, and the next green run closes it.

Fix one by moving the lockfile past the affected range (cargo update -p <crate>, a pnpm override). When there is no fixed version, or nothing we run reaches the vulnerable code, add the id to deny.toml’s [advisories] ignore with what pulls the crate in and why it does not reach us; remove the entry as soon as it stops matching. A release cut while the issue is open ships the advisory, so the release pull request says why it is safe or waits.

Weekly, in Sunday’s nightly (or with the flamegraph input), job merod flamegraph (kv-store soak) builds merod with the profiling profile (optimized, with symbols) and -C force-frame-pointers=yes, runs the process suite’s kv-soak for five minutes, and records node 1 with perf record -g for most of it (scripts/soak-flamegraph.sh; the runner sets kernel.perf_event_paranoid=-1). inferno renders the samples; the artifact merod-flamegraph holds merod-flamegraph.svg, the folded stacks merod.folded (compare two nights with inferno-diff-folded old.folded new.folded | inferno-flamegraph > diff.svg) and the profiled run’s soak report. Locally, on Linux:

Terminal window
cargo install inferno --version 0.12.8 --locked
RUSTFLAGS="-C force-frame-pointers=yes" cargo build -p merod -p meroctl --profile profiling
sudo sysctl -w kernel.perf_event_paranoid=-1
MEROD_BINARY=target/profiling/merod MEROCTL_BINARY=target/profiling/meroctl SOAK_SECONDS=120 \
scripts/soak-flamegraph.sh /tmp/flame

PERF=/usr/lib/linux-tools/<version>/perf points it at a perf whose wrapper does not match the running kernel; PROFILE_DELAY, PROFILE_SECONDS and PROFILE_HZ set when and how it samples, and a second argument names another node.

Every node in a scenario run is the same build on fresh state, and so is every node in the process suite (its rolling upgrade moves to a copy of the same binary unless --upgrade-merod names another), so neither tests data written by an older version. The upgrade path does, for the data its cases write, from the last release only. A change to an on-disk or wire format also needs its own test that reads the old shape (or refuses it, as calimero-log‘s format::tests do for a store of another format), and a case in the upgrade path when it stores a kind of data none of its cases writes. What else tests across releases, and what a change that breaks one declares, is in Compatibility: ci-checks’ Compatibility job (no route, field, WIT or ABI version dropped) and Rust tests (2/4)’s previous-release step (the last release’s kv bundle on this tree’s node).

Nor do they run two releases in one cluster, so they cannot catch an entry an older node skips. A new command or field ships with a feature gate (The cluster version): add a Feature with the release it ships in, name it in SystemCmd::features, and give it a case in uses in crates/node/src/system/cluster_version.rs’s tests. There, a_feature_is_never_proposed_while_an_older_node_holds_the_log replays every feature through the proposal gate on a cluster holding an older node (modelled as a release that skips what it cannot decode, as earlier releases did; this one stops the group instead) and checks that nothing is proposed and every replica keeps the same state, then that each feature works once the older node leaves and the leader raises the cluster version.

A test earns its place by catching a break no other test catches. Name that break before writing the test: the line you could change that only this test would notice. Then prove it: make that change, watch the new test go red, and put the code back.

Do not add:

  • a harness test that repeats an app’s scenario file step for step (the scenario already runs on every PR, in the app’s harness);
  • a test that asserts what it set up, a constant, a dependency’s behaviour (Url::join, a missing Option reading as None), or a bound so loose it cannot fail (fuel > 0); a measurement is an #[ignore]d benchmark;
  • a second test of the same path with another input that no branch depends on (test_hash_43 and test_hash_44);
  • a weaker copy of a check a known-answer vector or an exact-bytes assertion already makes;
  • a second CI run of a test another required job runs;
  • a test under scripts/tests/ that no workflow runs (ci-scope-test.py fails on one).

Keep a test that looks redundant when it is the only one of a branch or error path, a trust boundary (kicked, revoked or other-org actors, limit constants, a key bound to its cluster, salt or node), wire or format compatibility, or the only multi-node coverage. A property test beside a known-answer vector stays: whoever changes the derivation regenerates the vector, and only the property still says what the bytes must be bound to.

  1. Reproduce first, at the layer a user hits it. A cluster test for API behaviour, a unit test for a rule, a scenario file for an app’s or a flow’s steps across accounts, a process-suite test for a multi-process flow (a crash, a freeze, an upgrade). Watch it fail for the reason the bug describes.

  2. Fix it and rerun the same test. Keep it as the regression test; the before and after output goes in the PR description.

  3. Reason about old data. For anything touching the store, snapshots, the sealed wire format or signed formats, work through existing data and mixed-version clusters explicitly.

Scaling guards and criterion benches are described in docs/benchmarking.md; none of them fails a PR (the storage cost gate went with SDK 0.12’s storage crate). .github/workflows/benchmarks.yml runs them nightly on master and on a PR labelled run-benchmarks: the criterion benches per crate (calimero-log’s append and commit, calimero-sealed’s request round trip), compared with critcmp against the base commit’s run on the PR’s base branch, or else that branch’s newest one, plus two reports that are not criterion: crates/search/bench (the search engine) and the cluster throughput bench, whose JSON the comparison also diffs.

crates/node/benches/cluster_throughput.rs drives a 3-node cluster in one process (the harness of tests/it/cluster.rs, in tests/harness/cluster.rs, with merod’s Raft timing) through the sealed client, calling the kv fixture’s set on the app’s leader:

Terminal window
cargo bench -p calimero-node --bench cluster_throughput -- --secs 15 --out cluster.json

Two runs on a 4-vCPU Linux container (bench profile with LTO off; the machine was shared with other work, so treat rows as ±25%):

Scenario Calls/s Per app p50 p99
(a) 1 app, 1 in flight 148 / 185 6.3 / 5.2 ms 15 / 8 ms
(b) 1 app, 64 in flight 205 / 250 285 / 253 ms 519 / 317 ms
(c) 2 apps, 64 each, one leader node 322 / 349 160 + 162 / 176 + 173 348 / 340 ms 780 / 495 ms
(c’) 2 apps, 64 each, two leader nodes 264 / 298 119 + 146 / 139 + 159 436 / 423 ms 2963 / 3671 ms

One synced RocksDB write (rocksdb_write/synced in calimero-log’s bench, and timed again by this bench) took 0.16 to 0.19 ms on this disk; unsynced, 2 µs.

Appends without a leadership round. Group::propose used to confirm leadership with a majority (ensure_linearizable) before every build; it now does so only for a proposal that answers without appending, and concurrent sys_fresh callers share one read-index round. Before and after on the same machine, two runs each, --secs 10 (other work shared the machine, so ±25% still holds):

Scenario Calls/s before → after p50 before → after p99 before → after
(a) 1 app, 1 in flight 219 / 191 → 205 / 233 4.5 / 5.1 → 4.8 / 4.2 ms 6.6 / 7.2 → 7.9 / 6.3 ms
(b) 1 app, 64 in flight 238 / 233 → 293 / 298 270 / 273 → 216 / 212 ms 337 / 301 → 259 / 247 ms
(c) 2 apps, 64 each, one leader node 368 / 415 → 497 / 465 343 / 305 → 252 / 277 ms 453 / 382 → 327 / 365 ms
(c’) 2 apps, 64 each, two leader nodes 452 / 460 → 481 / 471 286 / 274 → 259 / 259 ms 2273 / 2322 → 368 / 362 ms

calimero-log‘s bench on a 3-node group: one proposal in flight 689 / 633 → 573 / 528 µs, 64 in flight 36.8 / 38.1 → 33.4 / 31.8 ms (1 node: unchanged, it had no round to save). A single caller (a) gains nothing measurable; the queue behind the propose lock (b, c) moves about a fifth faster, and the seconds-long p99 with two leader nodes (c’) is gone.

  • The limit is per app, not per node. A group proposes one call at a time (propose_lock in Group::propose is held while the leader runs the WASM and until the entry commits), so 64 calls in flight on one app only queue: (b) is 1.35x (a), and its p50 is about 50 times (a)’s. A second app on the same leader node adds its own stream: (c) is 1.4 to 1.6x (b) (2x in an earlier run), and the two apps share it evenly; a per-node limit would hold (c) at about 1x. Two leader nodes did no better than one here, and their p99 was seconds: 4 cores ran all three nodes and 128 callers.
  • The disk is not the limit. A call needs the leader’s synced append and a follower’s (in parallel), so about 2 syncs: 1 ÷ (2 × 0.17 ms) is about 3,000 calls/s per app, against the 150 to 300 measured. A call’s 4 to 7 ms is the sealed HTTP round trip, the fresh system read, the WASM run and the Raft round trip of its append, the last two inside the propose lock. On a disk whose sync takes 10 to 25 ms (macOS, where Rust’s sync_data is F_FULLFSYNC, which redb ran on every commit), the same formula gives 20 to 50 writes/s per app, the range of the ~38/s a macOS build on redb reported.

Access-check read-index lease. Every credentialed request reads the system state through a read-index round so access is judged fresh; --sys-read-lease-ms (Config::sys_read_lease, zero by default) lets a node reuse a recent confirmed index within a window instead (Access is judged fresh). The bench takes the flag, and its session-refresh rows (64 sessions refreshing back to back) show the round it saves. Two runs on a 4-vCPU container, --secs 12 --peer-rtt-ms 4, at lease 0 and lease 50 ms (the machine was shared, so ±25%):

Scenario (session refreshes, 64 sessions) Calls/s 0 → 50 ms p50 0 → 50 ms p99 0 → 50 ms
young tokens kept (the common path: no log write) 8010 → 21483 6.55 → 2.59 ms 15.8 → 12.5 ms
every refresh exchanged (a log write each) 1212 → 1268 47.0 → 43.3 ms 120 → 129 ms

On the read-bound path (a young token just re-presented, no rotation) the lease drops the per-refresh system round and lifts throughput about 2.7x, p50 by about 60%. The write-bound path (every refresh rotates its token in the log) is paced by the append, not the round, so the lease barely moves its rate — and there it makes the governance trade visible: at 50 ms the aggressive run returned about 10% UNAUTHENTICATED as a just-rotated token was judged against the pre-write view and refused until it replicated (fail-closed, the two-sided bound the docs describe). At the default zero every row is error-free; set a lease only to a freshness bound the deployment accepts, below a client’s own refresh spacing.

Read-index requests per leader. With the control plane sharded, an access check takes two read-index rounds, root’s and its session group’s (or tenant group’s). Three changes make those rounds cheaper (Rounds of several groups):

  • api::credential runs root’s round and the session group’s at once (it ran them one after the other).
  • A group’s leader shares one confirmation among the peers asking it (led_read_index).
  • A follower asks a leader about every group it leads in one internal/read-index (Node::leader_index).

Two runs before and two after on a 4-vCPU container, --secs 10, lease 0. The two runs on each side agreed within 10%:

Scenario Calls/s before → after p50 before → after p99 before → after
session refreshes, young tokens kept 5653 / 6106 → 7783 / 7612 11.7 / 10.8 → 5.8 / 6.7 ms 18.6 / 17.7 → 22.9 / 23.3 ms
authenticated reads (GET /auth/me) 4736 / 5054 → 7811 / 7834 13.2 / 12.3 → 6.3 / 6.4 ms 24.7 / 23.2 → 22.6 / 23.0 ms
session refreshes, every refresh exchanged 1145 / 1182 → 1611 / 1601 54.4 / 52.7 → 37.8 / 38.5 ms 103.6 / 104.2 → 86.8 / 83.7 ms
(a) 1 app, 1 in flight 209 / 206 → 269 / 269 4.1 / 4.4 → 3.4 / 3.4 ms 16.0 / 11.1 → 9.7 / 9.4 ms
(b) 1 app, 64 in flight 958 / 920 → 1214 / 1230 63.0 / 66.9 → 49.1 / 48.9 ms 139.4 / 140.0 → 118.6 / 106.9 ms

Each change was also measured alone, one run each:

  • Running the two rounds at once took authenticated reads to 6,638/s. Kept refreshes did not move, since a refresh already ran its two rounds at once.
  • Leader-side sharing then took kept refreshes to 6,707/s.
  • Requests per leader then took kept refreshes to 7,003/s and authenticated reads to 6,870/s.

An app’s calls gain because each call makes the same access check first. p99 of kept refreshes rose about 5 ms. A round’s request can now wait for the request to its leader that is already in flight. All three nodes share the machine’s cores, so separate machines still need scale_load --urls.

Size-aware snapshot cadence. A full snapshot re-seals the whole state, so building one every snapshot_every (1000) applied entries whatever the size is write amplification for a large app — it competes with the write path and is a root cause of the single-app throughput drop and p99 spikes as state grows. Config::snapshot_scale_bytes (--snapshot-scale-bytes, off by default) widens the interval in proportion to the state’s size, so the whole-state re-seal stays a bounded fraction of the bytes written (calimero-log, AGENTS.md). snapshot_amplification measures it directly — every build calls Machine::snapshot, so the count is exactly the whole-state re-seals — over 400 entries at a ~1 MiB state (snapshot_every 20, scale 128 KiB):

Cadence Whole-state re-seals Final snapshot covers
fixed (LogsSinceLast(20)) 20 index 399
size-aware (scale 128 KiB) 1 index 401

The fixed cadence re-sealed the ~1 MiB state 20 times for 400 small entries (~20 MiB of re-seal work); the size-aware one re-sealed it once and still purged the log (its single snapshot covers every entry). The precise interval math is unit-tested in snapshot_cadence; the engine-driven path (openraft’s policy is Never when the cadence is size-aware) in the_engine_drives_snapshots_when_the_cadence_is_size_aware. End-to-end large-state throughput and leader RSS as a single app grows into the hundreds of MB are validated separately with the store-growth harness, not here.