Faultline

Failure testing for duplicate execution in at-least-once workers

A Jepsen-inspired harness that drives real Celery and BullMQ workers on Redis, injects SIGSTOP or SIGKILL before or after commit, records history in a PostgreSQL effect ledger and checks invariants like at-most-one-effect for unsafe, fenced and idempotent workers.

Trade-offs

  • Fencing locks the job's ownership row with SELECT … FOR UPDATE and compares tokens, so a stale commit is refused without the worker ever learning it lost ownership.
  • Claims stay narrow on purpose: no exactly-once, linearizability or exhaustive fault coverage, only invariants proven by real runs against real Redis and PostgreSQL.
  • The kill fault supports only the post-commit window so far, and the CLI selects only the at-most-one-effect invariant; the other checkers are computed into each Celery report.

Q&A2

When a worker is killed after a remote charge lands but before it learns the result, the redelivered job carries a newer token, and both calls were current when they arrived. Fencing protects local ownership; only an idempotency key on the remote effect stops it applying twice: 2 effects under fencing, 1 with idempotency.

Reviews

Loading reviews

    More in Job queues

    See all 7 →
    • jobdGPU-aware job broker for a few personal machines, with an MCP server
    • arbiterPostgreSQL job queue for Haskell, with no broker and no leader
    • Job Scheduler PlatformDurable one-off and cron jobs posted to webhooks, with retries and a DLQ
    • QueueScopeNative macOS dashboard for BullMQ queues on Redis
    • TsumugiJob system for Cloudflare Workers on Durable Objects and Queues
    • RoundhouseOps UI for Sidekiq and Solid Queue, mounted as a Rails engine

    More in Testing

    See all 19 →
    • MockNest ServerlessWireMock-compatible API mocking in an AWS account
    • VayuAn API client and native load tester in one local desktop app
    • KatesPerformance, chaos and security testing for Kafka on Kubernetes
    • AgentLeakPrivacy-leakage testing for AI agents across every execution channel
    • KiiraType-checks the TypeScript code fences in Markdown against the real project
    • KhaosKafka traffic generator that reproduces failures on demand

    More in Idempotency

    See all 8 →
    • blitcpFile copier that reads in disk order, dedupes and streams over raw SSH
    • RRQClosed-loop payment ledger on sharded Postgres with a Kafka outbox
    • clinkC++ stream processing engine that stays correct when processes die
    • Paperless NGX DedupeNear-duplicate finder for Paperless-NGX on MinHash and LSH
    • File HunterSelf-hosted catalogue of archive drives that stays searchable offline
    • FinCore EngineSelf-hosted JVM core for a double-entry ledger, payments and compliance