ZERO GRAVITY SOLUTIONS — OUTBOX AND REPLAY EXPERIMENT

Run: python3 outbox_replay.py
Requires: Python 3.9 or later with sqlite3; no additional packages or network.
Expected: 8 tests followed by OK. Temporary databases are cleaned up after tests.

The sender commits an account credit and an outbox record together. A separate
receiver database records the requested effect with a tenant-scoped operation ID.
One fixture loses the acknowledgment after the receiver commits. A retry checks
the existing receipt instead of repeating the effect. Reopening the connections
tests persistence independently of in-memory state.

Try moving the simulated timeout before accept(), or changing the amount of an
existing operation. Inspect how the resulting assertions differ. The fixtures
are deliberately small enough to follow both databases through a failure.

This is a local sequential model. It does not run PostgreSQL, a queue, a CRM,
real network traffic, process termination, or concurrent workers. The receiver
implements idempotency; an external provider that does not offer it needs its own
reconciliation design. The example does not promise exactly-once delivery.

These are synthetic fixtures you can reproduce, not production benchmarks.
