INTRODUCING ZEROSPEC

Ship distributed systems
without the bugs.

Ship distributed systems
without the bugs.

Ship distributed systems
without the bugs.

Write down what must always be true. We check it against every crash, retry, lost message and concurrent request your system can hit, and show you exactly where it breaks.

THE PROBLEM

Bugs that only show up in production

Bugs between servers, workers, queues and clients pass review and pass CI. Then they come back as a ticket that says “can’t reproduce”.

Charged twice

Two clicks, two tabs or one retry, and a customer pays twice.

Charged twice

Two clicks, two tabs or one retry, and a customer pays twice.

Paid, never shipped

A crash between two writes leaves an order paid but never shipped.

Paid, never shipped

A crash between two writes leaves an order paid but never shipped.

Duplicate notifications

A message is retried or replayed. Users get it twice, or never.

Duplicate notifications

A message is retried or replayed. Users get it twice, or never.

Lost edits

A reconnect or a second tab silently overwrites saved work.

Lost edits

A reconnect or a second tab silently overwrites saved work.

Split brain

Two servers both believe they own the same document.

Split brain

Two servers both believe they own the same document.

Stale job reset

A running job is marked stale and its queued messages get deleted.

Stale job reset

A running job is marked stale and its queued messages get deleted.

Works with any stack, including Python and Node.js backends, React clients, RabbitMQ, Kafka and Redis. Multiple servers, multiple clients.

ZEROSPEC

Meet ZeroSpec

Meet ZeroSpec

The first plain-English spec format for distributed systems. Write down what must hold and what you assume: for the whole system, each program, and any critical module. ZeroOps gives every line a verdict.

system.zero

2 hold · 2 violated · 2 given

Notifications, the whole system: API, queue workers, WebSocket service (several instances), browser inbox, Redis, MongoDB.

WHAT MUST HOLD

1.

Every triggered workflow creates exactly one notification per subscriber, even if a worker crashes and the job runs again.

Every triggered workflow creates exactly one notification per subscriber, even if a worker crashes and the job runs again.

✗ Violated

2.

A subscriber with the inbox open sees every new notification, even if their connection dropped and came back.

A subscriber with the inbox open sees every new notification, even if their connection dropped and came back.

✗ Violated

3.

The unread count in an open inbox eventually equals the real number of unread notifications.

The unread count in an open inbox eventually equals the real number of unread notifications.

✓ Holds

4.

A notification the subscriber has read stays read unless it is delivered again.

A notification the subscriber has read stays read unless it is delivered again.

✓ Holds

WHAT WE ASSUME

5.

A queue job runs at least once. A worker can crash at any point.

A queue job runs at least once. A worker can crash at any point.

Given

6.

Events sent while a client is disconnected are lost.

Events sent while a client is disconnected are lost.

Given

Item 1 violated · 4-step scenario

1. Worker A creates the notification for subscriber S.

2. Worker A crashes before marking the job done.

3. The queue runs the job again on worker B.

4. Worker B creates a second notification. S sees it twice.

→ worker/send-message.ts · no unique key on (job, subscriber) · fix suggested

Three levels, one format

system.zero at the repo root, one .zero per program, and one in the folder of any critical module. Reviewed in pull requests like the code it describes.

Assumptions are explicit

What each part relies on is written down. Program and module assumptions are checked against the code around them and come back discharged or undischarged.

Every line gets a verdict

Holds, or violated with the exact sequence of events that breaks it. No vague warnings, no flaky reruns.

COMPARISON

Tests vs. invariants

Tests vs. invariants

A test checks one input on one schedule. An invariant is checked on all of them.

A test checks one input on one schedule. An invariant is checked on all of them.

Checked for every input value

Every interleaving, crash and retry

Specs in plain English

Minimal failing trace when it breaks

Re-run on every pull request

Unit tests

Hand-picked inputs

One schedule, usually the happy path

Test code to write and maintain

Flaky failures you can’t reproduce

Passes if the bug isn’t in the test

HOW IT WORKS

How it works

How it works

No new language. No code changes. Read-only access.

STEP 1

STEP 2

STEP 3

01

Write the invariants

Write a system.zero, one .zero per program, and one for any critical module: what must hold, and what you assume. We help you write the first set.

STEP 1

STEP 2

STEP 3

01

Write the invariants

Write a system.zero, one .zero per program, and one for any critical module: what must hold, and what you assume. We help you write the first set.

STEP 1

STEP 2

STEP 3

01

Write the invariants

Write a system.zero, one .zero per program, and one for any critical module: what must hold, and what you assume. We help you write the first set.

FAQ'S

Frequently Asked Questions

The usual questions.

Still Have Questions?

Send us a message and we’ll answer.

Do you need access to our code?

Yes, read-only access, scoped to the flows you choose.

Do we have to learn anything new?

No. Invariants are plain English in .zero files. Results read like a good bug report: what happened, in what order, and where in the code.

What does “holds” actually mean?

The invariant holds for every input and every ordering of events within the model we agree on with you: which services can crash, and which messages can be dropped, duplicated or retried. Outside those assumptions, we make no claims.

Which stacks do you support?

Any stack, including Python and Node.js backends, React clients, and RabbitMQ, Kafka and Redis queues, across multiple servers and clients.

Can we run it on every pull request?

Yes. Once your .zero files are in place, every pull request that touches a checked flow is re-checked, and new code is covered as it’s written.

FAQ'S

Frequently Asked Questions

The usual questions.

Still Have Questions?

Send us a message and we’ll answer.

Do you need access to our code?

Yes, read-only access, scoped to the flows you choose.

Do we have to learn anything new?

No. Invariants are plain English in .zero files. Results read like a good bug report: what happened, in what order, and where in the code.

What does “holds” actually mean?

The invariant holds for every input and every ordering of events within the model we agree on with you: which services can crash, and which messages can be dropped, duplicated or retried. Outside those assumptions, we make no claims.

Which stacks do you support?

Any stack, including Python and Node.js backends, React clients, and RabbitMQ, Kafka and Redis queues, across multiple servers and clients.

Can we run it on every pull request?

Yes. Once your .zero files are in place, every pull request that touches a checked flow is re-checked, and new code is covered as it’s written.

FAQ'S

Frequently Asked Questions

The usual questions.

Still Have Questions?

Send us a message and we’ll answer.

Do you need access to our code?

Do we have to learn anything new?

What does “holds” actually mean?

Which stacks do you support?

Can we run it on every pull request?

Get in touch

Want us to check your system?

Send us a repo. We’ll tell you what breaks.

Get in touch

Want us to check your system?

Send us a repo. We’ll tell you what breaks.

Get in touch

Want us to check your system?

Send us a repo. We’ll tell you what breaks.

Create a free website with Framer, the website builder loved by startups, designers and agencies.