ishvacerto
Prove your AI-written code — or get the exact input that breaks it. Never a guess.
AI coding assistants are fast, but they ship confident bugs and hallucinated behavior. ishvacerto is the gate that sits
on top of them: give it a function and a way to check it (its own doctests, your tests, or a reference
implementation), and it returns one of three answers — never a plausible-sounding maybe:
- ✅ VERIFIED — it passed the spec (with a witness).
- ❌ REFUTED — it fails, and here is the exact input that breaks it.
- 🤷 ABSTAIN — no checkable spec could be captured, so it says so honestly instead of rubber-stamping.
It runs entirely on your machine. Your code never leaves it. No account, no cloud, no telemetry. Pure standard library — zero dependencies.
Why
A code suggestion you can't verify is a liability. ishvacerto does the one thing an LLM structurally cannot: it
proves or refutes by execution, and when it can't, it abstains rather than bluff. It doesn't compete with your
AI coder — it makes its output safe to ship.
Honest scope:
ishvacertoverifies what it can check (functions with doctests, tests, or a reference), and abstains on the rest — it never false-alarms on correct code. "Never wrong, sometimes silent." Coverage grows as you give it more to check against.
Install
pip install ishvacerto
Use
Verify against the code's own doctests:
ishvacerto my_function.py
In Python:
from ishvacerto import verify, verify_against_reference
verify(open("f.py").read()) # uses doctests if present
verify(code, tests=[("f(3)", "9"), "assert f(0) == 0"]) # against your tests
verify_against_reference(ai_code, known_good_code, "f") # where does the AI code diverge?
Differential — the high-leverage mode (no tests needed, just a reference):
ishvacerto --ref reference.py --entry my_func ai_generated.py
ishvacerto generates inputs, runs both, and shows the first input where they disagree.
In CI (exit code 1 on REFUTED):
# .github/workflows/verify.yml
- run: pip install ishvacerto
- run: ishvacerto changed_function.py
Example
$ ishvacerto buggy.py
REFUTED [doctest] fn=square counterexample: square(3) (got 6, expected 9)
There's the bug — square(3) returned 6, not 9. Not "looks suspicious." The exact failing input.
How it decides
- VERIFIED only if the captured spec passed on every input it could exercise.
- REFUTED only on a clean mismatch — and it tells you the input.
- ABSTAIN if it couldn't capture a usable spec (the discipline that keeps it from false-alarming on good code).
Differential runs are sandboxed in a separate process with a timeout. The timeout guards against hangs; it is not a security sandbox for hostile code — verify code whose source you trust (e.g. your own assistant's output), or run it in a container.
License
MIT — see LICENSE.
Status
v0.1 — the verify-or-abstain core. On the way: richer spec capture (a reference proposer so it covers code that
ships with no tests), more language targets, and an editor extension. Contributions welcome.
Metadata
Release files for ishvacerto 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 | |
|---|---|---|---|
| ishvacerto-0.1.1.tar.gz | 10.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ishvacerto-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 21.1 kB
Release files / ishvacerto-0.1.1.tar.gz
| Download URL | ishvacerto-0.1.1.tar.gz |
|---|---|
| Size | 10.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
30a2686cb1e443852986f049a4f32b1f4292adc8c5b7599e8ac6124e6295221a
|
|
BLAKE2b-256 checksum How to use checksums |
c6fd33ae30affede75f20d50e459ac4508c0a57730769bef8bd49a676134a7e2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.9
|
Release files / ishvacerto-0.1.1-py3-none-any.whl
| Download URL | ishvacerto-0.1.1-py3-none-any.whl |
|---|---|
| Size | 10.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
33f845815974aac6485b264603e43059b6694c954826df43808499579d38936c
|
|
BLAKE2b-256 checksum How to use checksums |
9d09f57c40a7cfa76cbcdda10c0dd7388012c21c663f696f6d031da7d731b5d6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.9
|