Protocol specifications as Python code
Project description
Wunderspec
Wunderspec is a Python DSL for writing and checking executable specifications.
Distributed systems often fail due to unforeseen issues: message reordering, race condition, stale observations, retry behavior, crashes and restarts, network outages, vibe code. Adding more example tests is often not enough to find these bugs before they make it to production. Specifications written in Wunderspec surface these issues early, so that teams find design flaws before they become production incidents.
This is the open-core distribution.
:clipboard: Wunderspec in 5 minutes: the Wunderspec in Five Minutes gives you a quick overview of the core concepts.
:clipboard: Cheatsheet: the Wunderspec cheatsheet summarizes the DSL and CLI in a few pages — keep it open while you work.
:bulb: Using Quint? Try this command:
uv tool install wunderspec wunderspec convert --from=spec.qnt --to=spec.py --main=main
1. Wunderspec in Action
Follow Bob in his Wunderspec adventure. There, Bob writes a specification of a write-ahead log, finds a bug, replays the counterexample and fixes the specification.
2. Installation
Using uv:
uv tool install wunderspec
After installation, the CLI is available:
wunderspec --help
If you want to add Wunderspec as a dependency, just type:
uv add wunderspec
uv sync
3. Features
This open-core package includes the features marked ✅ in the Open Core column. Premium-only command names stay visible for discoverability, but those commands are not included in this package.
| Feature | Open Core | Premium |
|---|---|---|
| Symbolic expression evaluator | ✅ | ✅ |
wunderspec lint |
✅ | ✅ |
wunderspec run |
✅ | ✅ |
wunderspec replay |
✅ | ✅ |
wunderspec convert |
✅ | ✅ |
wunderspec check |
✅ | ✅ |
wunderspec with-tlc |
✅ | ✅ |
wunderspec with-apalache |
✅ | ✅ |
wunderspec fuzz |
❌ | ✅ |
wunderspec rust |
❌ | ✅ |
wunderspec lean |
❌ | ✅ |
4. Release Provenance
- Release tag:
v0.134.1 - Source commit:
c9ee963d884f34db1ae946b8dec869d9c7a80c76
See tests/README.md for the development test log captured at release time.
5. Latest Release Notes
Changes since public release v0.132.2.
- When an
@exampleproperty is checked but no witness state is found,run,check,fuzz,replay,with-tlc, andwith-apalachenow report the outcome aswarning: No examples found …(previously the misleadingsuccess: …) and exit with the dedicated code3. The exit-code scheme is now0= clean / no predicate,1= invariant violation,2= example found,3= example not found. Invariant checks are unaffected: holding an invariant is stillsuccess/ exit0. - Add per-action profiling to
wunderspec runandcheck. By default they now print a compactfired/tried (pct%)table, sorted by action name, counting how many times each non-inline (@action(inline=False)) action was entered (tried) and completed without violating an assumption (fired). Actions whose fire rate is at or near 0% are highlighted in red when color is enabled. Pass--no-action-profilingto disable the accumulation and the table. - Improve
wunderspec runtrace coverage on specifications whose actions depend on hard-to-hit guards. Add--max-retries-per-step(default 30): the per-trace retry budget is--max-retries-per-step × --max-steps, and a trace is cut only when it reaches--max-stepsor exhausts that budget. The earlier consecutive-failure cutoff, which abandoned still-progressing traces too early, has been removed.runnow also printsTrace length statistics: max=…, min=…, average=…at the end.
6. License
Wunderspec is distributed under the Functional Source License, Version 1.1, with an Apache 2.0 future license (FSL-1.1-ALv2). See LICENSE.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file wunderspec-0.134.1.tar.gz.
File metadata
- Download URL: wunderspec-0.134.1.tar.gz
- Upload date:
- Size: 4.2 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ba1d25ee85e898567c888b4c5bdf30b1bca9f3323b755d192fd28f3fd21107b8
|
|
| MD5 |
6e887d6186ba181412dafe9ab56559f0
|
|
| BLAKE2b-256 |
1322afd3f55788c6d0d3a69e28b299a382b42e66c66352dbc3259983c43c2eb9
|
Provenance
The following attestation bundles were made for wunderspec-0.134.1.tar.gz:
Publisher:
publish.yml on wunderspec/wunderspec
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
wunderspec-0.134.1.tar.gz -
Subject digest:
ba1d25ee85e898567c888b4c5bdf30b1bca9f3323b755d192fd28f3fd21107b8 - Sigstore transparency entry: 1970714296
- Sigstore integration time:
-
Permalink:
wunderspec/wunderspec@f6dfb0eccdd9ebf6f66b0307d1ceb8c26f8abb15 -
Branch / Tag:
refs/tags/v0.134.1 - Owner: https://github.com/wunderspec
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@f6dfb0eccdd9ebf6f66b0307d1ceb8c26f8abb15 -
Trigger Event:
push
-
Statement type:
File details
Details for the file wunderspec-0.134.1-py3-none-any.whl.
File metadata
- Download URL: wunderspec-0.134.1-py3-none-any.whl
- Upload date:
- Size: 263.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ab9ffe72d6d8e33321a267d46e19cd972db77c2af204c90e306aa61e53559a2d
|
|
| MD5 |
4c1b837759527aba4b22c3272442361a
|
|
| BLAKE2b-256 |
a1478f30b3e539d330404c994f1c12fa64e6ecd53bbc81c2f0f3333260a900ab
|
Provenance
The following attestation bundles were made for wunderspec-0.134.1-py3-none-any.whl:
Publisher:
publish.yml on wunderspec/wunderspec
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
wunderspec-0.134.1-py3-none-any.whl -
Subject digest:
ab9ffe72d6d8e33321a267d46e19cd972db77c2af204c90e306aa61e53559a2d - Sigstore transparency entry: 1970714356
- Sigstore integration time:
-
Permalink:
wunderspec/wunderspec@f6dfb0eccdd9ebf6f66b0307d1ceb8c26f8abb15 -
Branch / Tag:
refs/tags/v0.134.1 - Owner: https://github.com/wunderspec
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@f6dfb0eccdd9ebf6f66b0307d1ceb8c26f8abb15 -
Trigger Event:
push
-
Statement type: