Reproducible walkthrough

A real update, end to end

Run the durable local Service, acknowledge a real deletion and insertion, query committed versions, and reopen the store.

No browser simulation. This trace is produced by the installed Python package and verified by the site’s example checks. The graph is an eight-vertex degree-four ring; it is not a throughput benchmark.

BASIC / EIGHT VERTICESVerified small trace
Recovered matching at committed version threeAn eight-vertex degree-four ring, with sixteen edges and matching pairs zero-one, two-three, four-five, six-seven. Delete and reinsert edge zero-one, then reopen the SQLite store: the matching is recovered exactly.01234567
16 edges4 matching pairsMaximal ✓
  1. 01delete(0, 1)v2 · partner ∅
  2. 02insert(0, 1)v3 · partner 1
  3. ↳close → reopenv3 · partner 1
Small deterministic example; not scale qualification.Reproduce →

Run the same path

Install from source with a C++17 compiler on a supported local POSIX environment. The temporary directory below deliberately isolates this disposable example; use a persistent private directory in your application.

from pathlib import Path
from tempfile import TemporaryDirectory
from axiom.durable import Request
from axiom.service import Service

with TemporaryDirectory() as directory:
    path = Path(directory) / "graph.db"
    with Service(path, n=8) as graph:
        initial_version, partner = graph.partner(0).result(5)
        assert partner is not None
        initial_edges = {
            (u, v): graph.has_edge(u, v).result(5)[1]
            for u in range(8)
            for v in range(u + 1, 8)
        }
        deleted = graph.submit(Request(1, "delete", 0, partner)).result(5)
        assert deleted.changed and deleted.version == initial_version + 1
        assert graph.partner(0).result(5)[0] == deleted.version
        assert graph.check().result(5)
        inserted = graph.submit(Request(2, "insert", 0, partner)).result(5)
        assert inserted.changed and inserted.version == deleted.version + 1
        expected_partners = [graph.partner(v).result(5) for v in range(8)]
        assert all(version == inserted.version for version, _ in expected_partners)
        assert graph.check().result(5)
    with Service(path) as recovered:
        assert [recovered.partner(v).result(5) for v in range(8)] == expected_partners
        assert recovered.submit(Request(2, "insert", 0, partner)).result(5) == inserted
        try:
            recovered.submit(Request(2, "delete", 0, partner)).result(5)
        except ValueError:
            pass  # Same ID with a different payload must reject.
        else:
            raise AssertionError("incompatible retry accepted")
        assert [recovered.partner(v).result(5) for v in range(8)] == expected_partners
        for u in range(8):
            for v in range(u + 1, 8):
                assert recovered.has_edge(u, v).result(5) == (
                    inserted.version,
                    initial_edges[(u, v)],
                )
        assert recovered.check().result(5)

What is actually checked?

  1. Read vertex zero’s current partner, delete that matched edge, and wait for durable acknowledgment. The version advances once and the matching audit passes.
  2. Reinsert the edge. The version advances again; the matching audit passes, without assuming which valid maximal matching is selected.
  3. Close and reopen the SQLite store. All eight versioned partner results and every possible edge match the committed pre-close snapshot. Retrying request two returns its original outcome without another mutation; changing its payload rejects.

SQLite commit precedes successful receipt completion. A receipt timeout does not cancel accepted work. For several queries at one committed version, use the bounded read_snapshot() API. This local example does not imply an arbitrary network service.

NextProduction contracts