EffectFence
Crash/retry side-effect safety verifier for event-driven handlers.
At-least-once queues, consumer retries, and transactional outbox patterns still leave application developers with an important question:
If the process crashes at every durable boundary and the message is redelivered later, can the external effect be lost, duplicated, or accepted by a stale retry?
EffectFence explores those schedules deterministically and verifies the observable sink effects.
Quick start
Python 3.10+, no runtime dependencies. The repository includes a dependency-free PEP 517 build backend, so installation works offline from a clean virtual environment.
python -m pip install https://github.com/virajsabhaya23/effectfence/releases/download/v0.1.0/effectfence-0.1.0-py3-none-any.whl
effectfence verify examples/safe_fenced_recovery.json
effectfence verify examples/crash_after_effect.json --out out/report.json --junit out/report.xml
effectfence explore examples/crash_after_effect.json --out out/exploration.json
effectfence benchmark benchmark/corpus.json --out benchmark/results.json
Strategies included for comparison
naive_retryidempotency_keytransactional_outboxeffectfence— sink-side acceptance evidence + stable effect identity + monotonic fences
These are executable reference strategies, not claims that a particular Kafka/SQS/Debezium production deployment behaves identically.
Implemented failure schedules
- crash before/after external effect;
- crash before/after durable checkpoint;
- crash before/after acknowledgement;
- lost acknowledgement + redelivery;
- concurrent recovery workers;
- stale in-flight retry;
- dedupe/evidence expiry;
- outbox relay crash after sink acceptance but before outbox progress update.
Adapters
- persistent SQLite effect ledger;
- in-process ledger sink;
- local/remote HTTP sink using idempotency headers;
- DB-API 2.0 sink usable with sqlite3 and PostgreSQL DB-API drivers;
- SQS/Kafka-like delivery semantics are represented by the deterministic schedule engine rather than by a broker emulator.
Reports
JSON and JUnit include the entire trace, violations, accepted-effect count, and deterministic SHA-256 certificate.
Benchmark
The 30-case corpus contains 20 unsafe schedules grounded in documented Kafka/SQS/outbox/fencing failure classes and 10 safe controls. Run it with:
python -m effectfence benchmark benchmark/corpus.json --out benchmark/results.json
Security
EffectFence's default verification path runs only local deterministic fixtures. HTTP adapter destinations are explicit and no credentials are required. The project never mutates production brokers or databases automatically.
Limitations
The local benchmark validates the protocol and reference strategies; it is not a live Kafka, SQS, or Debezium deployment benchmark. Real integrations should record broker/sink versions and replay the same Effect Safety Protocol against staging infrastructure.
Metadata
Release files for effectfence 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| effectfence-0.1.1.tar.gz | 14.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| effectfence-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 31.1 kB
Release files / effectfence-0.1.1.tar.gz
| Download URL | effectfence-0.1.1.tar.gz |
|---|---|
| Size | 14.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
765edff61f5b93a986d12c9479adbcd28a54ae3b742c43b862d549554c4efd8b
|
|
BLAKE2b-256 checksum How to use checksums |
9d844dca2afb9b56b7517d51daf31c8f3beff4fee3d0c4ddb148202e0ef92748
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 16, 2026.
Transparency logRelease files / effectfence-0.1.1-py3-none-any.whl
| Download URL | effectfence-0.1.1-py3-none-any.whl |
|---|---|
| Size | 16.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ac2873d69dba2e9e6e35ada56088d55477b77784a441eb4fcc0f3ab5abf4aebe
|
|
BLAKE2b-256 checksum How to use checksums |
8875b3281edb40e080acc8a43f6cf2c22d58762706bbd5fbc1ee52932eb313a5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 16, 2026.
Transparency log