Reproduce Sentry crashes as failing pytest tests — sandbox execution, verified evidence
Project description
logomesh
Paste a Sentry URL. Get a failing pytest back.
pip install logomesh
logomesh repro https://sentry.io/organizations/your-org/issues/12345678/
What it does
Takes the innermost in-app frame from a Sentry crash, grabs whatever locals Sentry captured at crash time, builds a pytest that calls that function with those exact values, runs it in a Docker sandbox, and tells you if it still reproduces on your current branch.
If it does, you get a failing test you can paste into your repo. If it doesn't, you get a structured explanation of why it gave up.
Requirements
- Python 3.11+
- Docker running locally
- A Sentry auth token (
Settings → API Keys) - An OpenAI API key (used for test synthesis fallback)
Set env vars:
export SENTRY_AUTH_TOKEN=sntryu_...
export OPENAI_API_KEY=sk-...
Or drop them in a .env file in your project root.
Usage
# reproduce a crash
logomesh repro https://sentry.io/organizations/your-org/issues/12345678/
# reproduce + write a sealed audit artifact (SOC2 CC7.3 / PCI DSS 12.10.5)
logomesh repro https://sentry.io/organizations/your-org/issues/12345678/ --artifact
# reproduce + open a GitHub draft PR with the failing test attached
logomesh repro https://sentry.io/organizations/your-org/issues/12345678/ --draft-pr
Example output
## logomesh found 1 issue
### Negative quantity bypasses checkout validation
Property: Order total should always be ≥ 0
I called: checkout(item_id=1, qty=-5)
Got: Order created with total -$49.95
Location: checkout.py, line 42
Silence means nothing reproduced cleanly. No false positives.
What reproduces well
- Input validation bugs
NoneTypemismatches- Decimal / type coercion errors
- Off-by-one, ordering, idempotency issues
- Anything where the inputs that crashed the call are in the Sentry frame
What doesn't
- Race conditions (frame locals don't capture thread interleaving)
- Bugs that depend on live DB rows or Redis state not in the frame
- C extension crashes
- Distributed failures spanning services
When it can't reproduce cleanly, it says so with a reason instead of guessing.
Sentry setup
Frame locals need to be enabled in your Sentry project for this to work:
Project Settings → SDK Setup → Enable "Send default PII" (or set send_default_pii=True in your SDK config)
License
MIT
Project details
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 logomesh-0.1.1.tar.gz.
File metadata
- Download URL: logomesh-0.1.1.tar.gz
- Upload date:
- Size: 528.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
84c9cc032ad068dc6aa842bc5cfd4de614c1261eb7340803fa8c62dff56c8d8f
|
|
| MD5 |
b42625ce4e508a4a1b60b6e98597a96f
|
|
| BLAKE2b-256 |
44476dfc89aaf21b9e6db9a3edad548aed58847a18ecc6170b15a16fc3353fef
|
File details
Details for the file logomesh-0.1.1-py3-none-any.whl.
File metadata
- Download URL: logomesh-0.1.1-py3-none-any.whl
- Upload date:
- Size: 155.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8c7b0541c3d87c0d06a7323b5f1858189161debd52d9ecb68b9618edddd53fba
|
|
| MD5 |
3a153ae6cfb0ea4c842ecd53f14e3f12
|
|
| BLAKE2b-256 |
19cc14785b4f66a4be53e87b5ce40fa3dd3ab031a4294317b8facdb342913675
|