Metadata-Version: 2.5
Name: nemisis
Version: 0.2.0
Summary: Deterministic evidence for AI patches and crash/retry counterexamples
Project-URL: Homepage, https://github.com/Alex-lop/Nemisis
Project-URL: Repository, https://github.com/Alex-lop/Nemisis
Project-URL: Issues, https://github.com/Alex-lop/Nemisis/issues
Project-URL: Security, https://github.com/Alex-lop/Nemisis/security/advisories/new
License:                                  Apache License
                                   Version 2.0, January 2004
                                http://www.apache.org/licenses/
        
           TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
        
           1. Definitions.
        
              "License" shall mean the terms and conditions for use, reproduction,
              and distribution as defined by Sections 1 through 9 of this document.
        
              "Licensor" shall mean the copyright owner or entity authorized by
              the copyright owner that is granting the License.
        
              "Legal Entity" shall mean the union of the acting entity and all
              other entities that control, are controlled by, or are under common
              control with that entity. For the purposes of this definition,
              "control" means (i) the power, direct or indirect, to cause the
              direction or management of such entity, whether by contract or
              otherwise, or (ii) ownership of fifty percent (50%) or more of the
              outstanding shares, or (iii) beneficial ownership of such entity.
        
              "You" (or "Your") shall mean an individual or Legal Entity
              exercising permissions granted by this License.
        
              "Source" form shall mean the preferred form for making modifications,
              including but not limited to software source code, documentation
              source, and configuration files.
        
              "Object" form shall mean any form resulting from mechanical
              transformation or translation of a Source form, including but
              not limited to compiled object code, generated documentation,
              and conversions to other media types.
        
              "Work" shall mean the work of authorship, whether in Source or
              Object form, made available under the License, as indicated by a
              copyright notice that is included in or attached to the work
              (an example is provided in the Appendix below).
        
              "Derivative Works" shall mean any work, whether in Source or Object
              form, that is based on (or derived from) the Work and for which the
              editorial revisions, annotations, elaborations, or other modifications
              represent, as a whole, an original work of authorship. For the purposes
              of this License, Derivative Works shall not include works that remain
              separable from, or merely link (or bind by name) to the interfaces of,
              the Work and Derivative Works thereof.
        
              "Contribution" shall mean any work of authorship, including
              the original version of the Work and any modifications or additions
              to that Work or Derivative Works thereof, that is intentionally
              submitted to Licensor for inclusion in the Work by the copyright owner
              or by an individual or Legal Entity authorized to submit on behalf of
              the copyright owner. For the purposes of this definition, "submitted"
              means any form of electronic, verbal, or written communication sent
              to the Licensor or its representatives, including but not limited to
              communication on electronic mailing lists, source code control systems,
              and issue tracking systems that are managed by, or on behalf of, the
              Licensor for the purpose of discussing and improving the Work, but
              excluding communication that is conspicuously marked or otherwise
              designated in writing by the copyright owner as "Not a Contribution."
        
              "Contributor" shall mean Licensor and any individual or Legal Entity
              on behalf of whom a Contribution has been received by Licensor and
              subsequently incorporated within the Work.
        
           2. Grant of Copyright License. Subject to the terms and conditions of
              this License, each Contributor hereby grants to You a perpetual,
              worldwide, non-exclusive, no-charge, royalty-free, irrevocable
              copyright license to reproduce, prepare Derivative Works of,
              publicly display, publicly perform, sublicense, and distribute the
              Work and such Derivative Works in Source or Object form.
        
           3. Grant of Patent License. Subject to the terms and conditions of
              this License, each Contributor hereby grants to You a perpetual,
              worldwide, non-exclusive, no-charge, royalty-free, irrevocable
              (except as stated in this section) patent license to make, have made,
              use, offer to sell, sell, import, and otherwise transfer the Work,
              where such license applies only to those patent claims licensable
              by such Contributor that are necessarily infringed by their
              Contribution(s) alone or by combination of their Contribution(s)
              with the Work to which such Contribution(s) was submitted. If You
              institute patent litigation against any entity (including a
              cross-claim or counterclaim in a lawsuit) alleging that the Work
              or a Contribution incorporated within the Work constitutes direct
              or contributory patent infringement, then any patent licenses
              granted to You under this License for that Work shall terminate
              as of the date such litigation is filed.
        
           4. Redistribution. You may reproduce and distribute copies of the
              Work or Derivative Works thereof in any medium, with or without
              modifications, and in Source or Object form, provided that You
              meet the following conditions:
        
              (a) You must give any other recipients of the Work or
                  Derivative Works a copy of this License; and
        
              (b) You must cause any modified files to carry prominent notices
                  stating that You changed the files; and
        
              (c) You must retain, in the Source form of any Derivative Works
                  that You distribute, all copyright, patent, trademark, and
                  attribution notices from the Source form of the Work,
                  excluding those notices that do not pertain to any part of
                  the Derivative Works; and
        
              (d) If the Work includes a "NOTICE" text file as part of its
                  distribution, then any Derivative Works that You distribute must
                  include a readable copy of the attribution notices contained
                  within such NOTICE file, excluding those notices that do not
                  pertain to any part of the Derivative Works, in at least one
                  of the following places: within a NOTICE text file distributed
                  as part of the Derivative Works; within the Source form or
                  documentation, if provided along with the Derivative Works; or,
                  within a display generated by the Derivative Works, if and
                  wherever such third-party notices normally appear. The contents
                  of the NOTICE file are for informational purposes only and
                  do not modify the License. You may add Your own attribution
                  notices within Derivative Works that You distribute, alongside
                  or as an addendum to the NOTICE text from the Work, provided
                  that such additional attribution notices cannot be construed
                  as modifying the License.
        
              You may add Your own copyright statement to Your modifications and
              may provide additional or different license terms and conditions
              for use, reproduction, or distribution of Your modifications, or
              for any such Derivative Works as a whole, provided Your use,
              reproduction, and distribution of the Work otherwise complies with
              the conditions stated in this License.
        
           5. Submission of Contributions. Unless You explicitly state otherwise,
              any Contribution intentionally submitted for inclusion in the Work
              by You to the Licensor shall be under the terms and conditions of
              this License, without any additional terms or conditions.
              Notwithstanding the above, nothing herein shall supersede or modify
              the terms of any separate license agreement you may have executed
              with Licensor regarding such Contributions.
        
           6. Trademarks. This License does not grant permission to use the trade
              names, trademarks, service marks, or product names of the Licensor,
              except as required for reasonable and customary use in describing the
              origin of the Work and reproducing the content of the NOTICE file.
        
           7. Disclaimer of Warranty. Unless required by applicable law or
              agreed to in writing, Licensor provides the Work (and each
              Contributor provides its Contributions) on an "AS IS" BASIS,
              WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
              implied, including, without limitation, any warranties or conditions
              of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
              PARTICULAR PURPOSE. You are solely responsible for determining the
              appropriateness of using or redistributing the Work and assume any
              risks associated with Your exercise of permissions under this License.
        
           8. Limitation of Liability. In no event and under no legal theory,
              whether in tort (including negligence), contract, or otherwise,
              unless required by applicable law (such as deliberate and grossly
              negligent acts) or agreed to in writing, shall any Contributor be
              liable to You for damages, including any direct, indirect, special,
              incidental, or consequential damages of any character arising as a
              result of this License or out of the use or inability to use the
              Work (including but not limited to damages for loss of goodwill,
              work stoppage, computer failure or malfunction, or any and all
              other commercial damages or losses), even if such Contributor
              has been advised of the possibility of such damages.
        
           9. Accepting Warranty or Additional Liability. While redistributing
              the Work or Derivative Works thereof, You may choose to offer,
              and charge a fee for, acceptance of support, warranty, indemnity,
              or other liability obligations and/or rights consistent with this
              License. However, in accepting such obligations, You may act only
              on Your own behalf and on Your sole responsibility, not on behalf
              of any other Contributor, and only if You agree to indemnify,
              defend, and hold each Contributor harmless for any liability
              incurred by, or claims asserted against, such Contributor by reason
              of your accepting any such warranty or additional liability.
        
           END OF TERMS AND CONDITIONS
        
           APPENDIX: How to apply the Apache License to your work.
        
              To apply the Apache License to your work, attach the following
              boilerplate notice, with the fields enclosed by brackets "[]"
              replaced with your own identifying information. (Don't include
              the brackets!)  The text should be enclosed in the appropriate
              comment syntax for the file format. We also recommend that a
              file or class name and description of purpose be included on the
              same "printed page" as the copyright notice for easier
              identification within third-party archives.
        
           Copyright 2026 Alexander Lopez
        
           Licensed under the Apache License, Version 2.0 (the "License");
           you may not use this file except in compliance with the License.
           You may obtain a copy of the License at
        
               http://www.apache.org/licenses/LICENSE-2.0
        
           Unless required by applicable law or agreed to in writing, software
           distributed under the License is distributed on an "AS IS" BASIS,
           WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
           See the License for the specific language governing permissions and
           limitations under the License.
License-File: LICENSE
Classifier: Development Status :: 3 - Alpha
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: POSIX
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Software Development :: Testing
Requires-Python: >=3.12
Requires-Dist: contree-client[httpx]==0.3.0
Requires-Dist: openai<3,>=1
Requires-Dist: pydantic<3,>=2.11
Requires-Dist: pytest<10,>=9.0.3
Description-Content-Type: text/markdown

![Nemisis: a crash timeline whose last mark is an open red square, the write that never happened](docs/assets/nemisis-banner.png)

# Nemisis

**CrashCheck proves an AI patch survives a real crash, not just that its tests pass.**

[![CI](https://github.com/Alex-lop/Nemisis/actions/workflows/ci.yml/badge.svg)](https://github.com/Alex-lop/Nemisis/actions/workflows/ci.yml)
[![License: Apache-2.0](https://img.shields.io/badge/license-Apache--2.0-blue.svg)](LICENSE)
![Python 3.12+](https://img.shields.io/badge/python-3.12%2B-3776AB.svg)

Nemisis is the command-line tool; CrashCheck is the check it runs. Your tests call the handler
once, in one process, with nothing going wrong. CrashCheck runs the patch in a real worker
process, kills it the moment a write becomes durable, restarts it, replays the same event, and
reads what actually survived. One command, one verdict, an exit code CI can block on.

A coding agent fixes "retries sometimes credit an order twice". Its patch passes the test suite.
It passes an ordinary call-it-twice check. Then a worker is `SIGKILL`ed right after the `$25`
credit hits disk, the retry runs in a fresh process, and the account holds `$50`.

```text
$ uv run nemisis check --base fixture:sqlite-credit-v1/buggy \
    --candidate fixture:sqlite-credit-v1/misleading-green --corrected fixture:sqlite-credit-v1/atomic

verdict: PATCH_FAILED_STILL_REPRODUCES
timeline: $25.00 durable -> SIGKILL -> fresh worker -> $50.00
```

![Thirty-second terminal recording: the buggy handler reproduces the double credit, the agent's green patch still reproduces it under the same kill and retry, and the atomic fix ends at exactly one credit](docs/assets/screenshots/crashcheck-demo.gif)

Exit `1` blocks the merge. The same frozen crash replayed against the real fix exits `0`.

## Try it

Needs Python 3.12+, [uv](https://docs.astral.sh/uv/), and a POSIX machine (macOS or Linux).

```bash
uv tool install "git+https://github.com/Alex-lop/Nemisis@main"
# or, once 0.2.0 is published: uv tool install nemisis
nemisis check --base fixture:sqlite-credit-v1/buggy \
  --candidate fixture:sqlite-credit-v1/misleading-green \
  --corrected fixture:sqlite-credit-v1/atomic
```

About two seconds. Then replay the frozen crash against the fix (the `capsule:` path is printed
by `check`):

```bash
nemisis replay .nemisis/repros/double-credit/*/capsule.json \
  --source fixture:sqlite-credit-v1/atomic --role corrected
```

The checkout is for developing Nemisis and for [Verify the project](#verify-the-project); every
`uv run nemisis` below is that checkout running the same command an installed `nemisis` runs.

```bash
git clone https://github.com/Alex-lop/Nemisis.git && cd Nemisis
uv sync --frozen --dev
```

## What it does

CrashCheck runs the exact patch in a real worker process and treats every durable write as a place
the process could die.

1. **Hunt on the base.** Two fixed kill points are tried on the buggy tree before the candidate is
   even read; the one that reproduces the duplicate is frozen into a content-addressed capsule.
2. **No-crash control.** The base is delivered the same event twice with no kill. It ends exactly
   once, so the duplicate needs the crash: this is a crash/retry bug, not a broken handler.
3. **Kill, restart, replay.** Five fresh worlds per tree. Each one seeds a database, waits until the
   credit is durably committed, `SIGKILL`s the whole process group, confirms exit `-9`, starts a
   fresh worker, replays the byte-identical event, and reads the database through an independent
   read-only connection.
4. **Sweep every commit of a claimed fix.** A patch that passes step 3 is then killed once after
   *each* store commit it makes. A handler that marks first and credits second passes step 3 and
   loses the credit here.
5. **Decide from durable state and process receipts.** Balance, ledger rows, marker count, PIDs,
   exit codes, worker nonces, tree digests. Five worlds must agree or there is no verdict.

| Exit | Verdict | Meaning |
| ---: | --- | --- |
| `0` | `FIX_PROVEN_FOR_THIS_CAPSULE` | Every kill point, including the frozen one, ended exactly once. |
| `1` | `PATCH_FAILED_STILL_REPRODUCES` | The money moved twice. |
| `1` | `PATCH_FAILED_INVARIANT_BROKEN` | The money was lost, tripled, or otherwise wrong. |
| `1` | `BUG_REPRODUCED` | The base reproduced the capsule (`replay --role base`). |
| `2` | `EVIDENCE_INCOMPLETE` | Something could not be observed. Never a fallback, never a guess. |

## Try to fool it

The checker was red-teamed by hand until it stopped losing, and CI now red-teams it on every run:
`nemisis redteam` renders handlers from a grammar over store operations (guard, credit, mark, the
atomic call, the same calls inside `try`/`except` or a retry loop, and the writes around the store
that hostile reviews wrote by hand: a file beside, above, under `~` or `$TMPDIR`, a file tidied
away before returning, a raw SQL write, a table, a pragma, a re-pointed row, a world-detection
attempt; a quarter of them through a helper function), runs `check` on each, and compares the
verdict with an oracle computed from the operation sequence alone, in either scenario's
vocabulary (`--scenario`). Ten fixed-seed cases run in the normal suite; a nightly workflow runs
three hundred per scenario. Three hand-written handlers that fooled an earlier engine ship as
fixture refs, so the claim above is one flag away for anyone:

| Candidate | Unit test | Called twice | Kill + retry | Verdict |
| --- | :-: | :-: | --- | --- |
| `buggy` | green | `$25` | `$50` | `BUG_REPRODUCED` |
| `misleading-green` | green | `$25` | `$50` | `PATCH_FAILED_STILL_REPRODUCES` |
| `mark-first` | green | `$25` | `$0`, marked done | `PATCH_FAILED_INVARIANT_BROKEN` |
| `leftover-credit` | red (`$50` on one call) | `$50` | `$50` | `PATCH_FAILED_STILL_REPRODUCES` |
| `never-marks` | green | `$50` | `$50`, no marker | `PATCH_FAILED_STILL_REPRODUCES` |
| `atomic` | green | `$25` | `$25` | `FIX_PROVEN_FOR_THIS_CAPSULE` |
| `raw-sql` | red (needs SQLite) | n/a | no kill point | `EVIDENCE_INCOMPLETE`, names the one-line change |
| `shadow-table` | red (needs SQLite) | n/a | `$0`, in-flight forever | `EVIDENCE_INCOMPLETE`, the schema changed |
| `tail-bytes` | red (needs SQLite) | n/a | `$25`, then bytes past the file's last page | `EVIDENCE_INCOMPLETE`, a write around the store |

```bash
uv run nemisis check --base fixture:sqlite-credit-v1/buggy --candidate fixture:sqlite-credit-v1/mark-first
```

Or generate a hundred and read the disagreements (there should be none; one is a checker or
oracle bug and the most valuable thing you can send):

```bash
uv run nemisis redteam --cases 100 --seed 1 --out ./redteam
```

Or write your own in thirty seconds:

```bash
uv run nemisis export fixture:sqlite-credit-v1/buggy ./my-candidate
$EDITOR ./my-candidate/app/credits.py
uv run nemisis check --base fixture:sqlite-credit-v1/buggy --candidate ./my-candidate
```

A handler that writes outside the store still runs. It forfeits the verdict instead of earning one.
`raw-sql` is the textbook fix written as one raw SQL transaction on the store's database: correct,
and unjudgeable, because a write the store did not make has no kill point. CrashCheck names the
write and the store call that expresses the same fix (`store.credit_and_mark(...)`, see [the store
API](docs/PRODUCT.md#the-store-api)) instead of guessing a verdict. `shadow-table` keeps its dedup
flag in a table it creates inside the store's own database: an earlier engine blessed it while a
crash between that write and the credit left the customer unpaid forever. `tail-bytes` is the guarded
atomic fix (`processed`, then `credit_and_mark`) followed by sixteen bytes appended past the
database file's last page: the nightly red team
caught the engine issuing verdicts on it for five nights, and blessing it twice (SQLite's own close
had tidied the bytes away before the engine looked); the engine now reads the file before the
worker may exit, pins the file whole during a delivery, and holds the write-ahead log to its frames. Attribution now reads the
whole database file (schema, the header fields a commit never changes, every row with its rowid)
and the whole world the worker runs in (its working directory and the two above it, `HOME`,
`TMPDIR`, the bound tree entry by entry, with every entry's permission bits, flags, attributes,
and modification time), before and after every delivery, and the raw header and length of the
database file itself. Three hostile reviews found forty-eight handlers an earlier engine blessed;
twenty-eight of those shapes are pinned as refusals. What it cannot read it does not claim;
[the boundary](docs/SECURITY.md) lists the channels that remain.

## Let Nemotron write the patch

The hackathon story, made literal. NVIDIA's Nemotron on Nebius Token Factory plays the coding
agent: it gets the bug report, the buggy module, and the store API, and nothing about how
CrashCheck kills or judges. Its module is accepted only after deterministic checks (signature,
imports, no private attributes), becomes an ordinary candidate tree, and is judged like any other.

The `--issue` path below is inside the checkout. `export` copies a fixture tree, not the issue
text, and no other command prints it, so this section needs the clone from [Try it](#try-it).

```bash
export NEBIUS_API_KEY=...   # without it: exit 2, nothing written
uv run nemisis propose-patch --issue src/nemisis/fixtures/sqlite_credit_v1/issue.md \
  --base fixture:sqlite-credit-v1/buggy --out ./nemotron-candidate
uv run nemisis check --base fixture:sqlite-credit-v1/buggy --candidate ./nemotron-candidate
```

The report gains a **Candidate author** card with the model's receipt. It is labelled `LIVE` only
for a real Token Factory call; injected clients are `MOCKED` and say so. This tree has no key, so no
`LIVE` receipt exists yet. `init --nemotron` is the second, smaller model job: proposing the
contract's catalog binding, candidate-blind. See [docs/LIVE_SETUP.md](docs/LIVE_SETUP.md).

## Point it at your code

Read this before `init`. The alpha judges one handler shape and nothing else: a top-level
synchronous `def handler(store, event)` with exactly two positional parameters, no defaults, no
`*args`, no `**kwargs`, no alias or re-export. Every durable write goes through the store
CrashCheck injects as the first argument (`CreditStore`: `processed`, `credit`, `mark_processed`,
`credit_and_mark`; `InventoryStore`: `reserved`, `reserve`, `mark_reserved`, `reserve_and_mark`;
[the store API](docs/PRODUCT.md#the-store-api)), against the scenario's schema, on the scenario's
event. Your own connection, your own tables, your own payload are outside it. `init` reads the
signature and nothing more, so `apply_credit(conn, event)` that runs SQL on `conn` mints a
contract and then ends at `EVIDENCE_INCOMPLETE`, exit `2`, because the handler raised
`AttributeError` before the durable checkpoint. That is a narrow shape and most handlers are not
already in it: porting one means rewriting its storage calls as store calls, and what survives is
the part with the crash window in it. Inside that shape, the handler body is anything you like.

The contract pins the base tree digest, so the fix lives on a branch while the base branch stays
at the tree the contract was accepted for. Commit the fix on `main` and `check --base main` exits
`2`: `contract originating base digest differs from the supplied base`. Committing the contract is
safe; `.nemisis/` is outside the digest.

```bash
nemisis init --issue issue.md --target app.credits:apply_credit --base main
nemisis init --issue issue.md --target app.credits:apply_credit --base main \
  --accept-contract PASTE_PRINTED_DIGEST
git checkout -b fix-double-credit   # the fix is committed here, not on main
nemisis check --base main --candidate HEAD --scenario .nemisis/config.json
```

Commit the accepted `.nemisis/config.json` on the base branch, then copy
[the example workflow](.github/examples/crashcheck.yml) into `.github/workflows/` to run it on every
pull request. Without a checkout, take it from `main`:

```bash
curl -o .github/workflows/crashcheck.yml \
  https://raw.githubusercontent.com/Alex-lop/Nemisis/main/.github/examples/crashcheck.yml
```

Every wall-clock wait in the kernel is one budget, ten seconds re-armed for each phase of each
world (the worker's hello, reaching the next store commit, finishing the delivery), and its expiry
is an `EVIDENCE_INCOMPLETE` whose message names the phase, the commits seen so far, and the
budget. On a slow or loaded machine, `NEMISIS_WORKER_TIMEOUT_SECONDS=30` raises it; no receipt
depends on the value, and a value outside 1 to 600 is refused rather than clamped.

## Two scenarios, one kernel

The kernel is written once; a scenario is one object (schema, seed, store, probe, predicate, words).
`sqlite-inventory-v1` is the second: an order reserves two units of a SKU, stock goes 10 to 8, and
a crash between the decrement and its marker oversells to 6. It is the bug the original
differential verifier could only mark `UNRESOLVED`, decided:

| Scenario | Effect | Buggy | Agent's rewrite | Atomic | `mark-first` |
| --- | --- | --- | --- | --- | --- |
| `sqlite-credit-v1` | `$0` to `$25` | `$50` | `$50` | `$25` | `$0`, marked done |
| `sqlite-inventory-v1` | 10 to 8 units | 6 units | 6 units | 8 units | 10 units, marked reserved |

```bash
uv run nemisis check --base fixture:sqlite-inventory-v1/buggy --candidate fixture:sqlite-inventory-v1/mark-first
```

The scenario is inferred from a fixture base ref; `init --scenario sqlite-inventory-v1` binds your
own `app.inventory:reserve_inventory` the same way the credit contract does.

## What it never does

- Never pushes, merges, comments, or touches your git history. It writes `.nemisis/` and exits.
- Never upgrades a label. Local runs are `LOCAL`, the packaged case is `FIXTURE`, injected model
  clients are `MOCKED`, `LIVE` needs a genuine provider receipt. Missing evidence fails closed.
- Never lets a model near the verdict. Models write patches or propose catalog IDs; deterministic
  code owns probes, kill points, and decisions.
- Not a sandbox. Local mode is for a trusted checkout; the GitHub Action refuses fork PRs until
  the kernel runs inside a Token Factory Sandbox. Kill points are store commits, so durable state a
  handler keeps outside the store (a dedup file, another database) has windows CrashCheck cannot
  reach, and says so.

## Verify the project

From the checkout in [Try it](#try-it); an installed tool ships no tests to run.

```bash
uv run ruff format --check src tests && uv run ruff check src tests
uv run mypy src tests
uv run pytest
```

The claims below name the tests that prove them, and `tests/test_readme_truth.py` fails if a link,
an image, or a test count here goes stale:

| Claim | The test that proves it |
| --- | --- |
| A real worker is killed at the durable write, a fresh one replays the same event, five worlds must agree | [`tests/test_sqlite_runner.py`](tests/test_sqlite_runner.py), [`tests/test_crashcheck.py`](tests/test_crashcheck.py) |
| A claimed fix is killed once after every store commit it makes (`mark-first` loses the credit) | [`tests/test_verdict_paths.py`](tests/test_verdict_paths.py) |
| Every durable change is attributed: raw SQL, a shadow table, a pragma, a file, an empty directory, `~`, `TMPDIR` forfeit the verdict | [`tests/test_verdict_paths.py`](tests/test_verdict_paths.py) |
| Complete-but-wrong is a failed patch, never missing evidence | [`tests/test_crash_models.py`](tests/test_crash_models.py), [`tests/test_verdict_paths.py`](tests/test_verdict_paths.py) |
| The second scenario has its own seed, direction, and predicate and earns the same four verdicts | [`tests/test_inventory_scenario.py`](tests/test_inventory_scenario.py) |
| Generated handlers agree with an oracle that only knows their operation sequence | [`tests/test_redteam.py`](tests/test_redteam.py) |
| The README's `init` → accept → `check` sequence runs on a real git repository through the CLI | [`tests/test_point_at_your_code.py`](tests/test_point_at_your_code.py) |
| Truth labels come from code; a config, capsule, or tree cannot claim `LIVE` or an author | [`tests/test_trust_boundaries.py`](tests/test_trust_boundaries.py), [`tests/test_agent_patch.py`](tests/test_agent_patch.py) |
| The docs quote the installed engine digest, the reviewed action pin, and the collected test count | [`tests/test_docs_identity.py`](tests/test_docs_identity.py), [`tests/test_readme_truth.py`](tests/test_readme_truth.py) |
| The committed hero evidence validates against the current strict models | [`tests/test_static_hero.py`](tests/test_static_hero.py) |
| Every `git` command the engine runs is read-only, and a patch is only ever applied inside an isolated world | [`tests/test_claims_readme_md.py`](tests/test_claims_readme_md.py) |

The terminal captures are regenerated by the `vhs` tapes in
[docs/assets/screenshots/](docs/assets/screenshots/).

## Docs

[Product contract](docs/PRODUCT.md) · [Architecture](docs/ARCHITECTURE.md) ·
[Security boundary](docs/SECURITY.md) · [Proof ledger](docs/PROOF.md) ·
[Benchmark](docs/BENCHMARK.md) · [two-and-a-half-minute demo](docs/DEMO.md) · [Pitch](docs/PITCH.md) ·
[Live setup](docs/LIVE_SETUP.md) · [Status](docs/STATUS.md) · [Decisions](docs/DECISIONS.md)

The original differential verifier (`nemisis verify --fixture idempotency-retry`) is still shipped;
it is where CrashCheck's crash-retry row comes back `UNRESOLVED` and CrashCheck begins.

Apache-2.0. See [LICENSE](LICENSE).
