# Framework recovery tests

The standalone `ai-sdk/` and `langgraph/` projects are the application entry points.
This archive retains the complete streaming and interruption tests used by the
model-call recovery chapter. Its local provider deliberately selects repeatable
actions so the tests can count effects and compare receipts.

Use Linux, Node 22+, Python 3.11+, uv, and Chio. From `frameworks/`:

```sh
uv sync
npm ci
npm run build
uv run python exercise.py --typescript --output recovery-exercise
```

`exercise.py` starts `model_server.py` on a local port, provisions the report tool,
and runs three cases. Complete text and complete streaming each leave one
publication, two provider calls, and the same original tool receipt after restart.
A truncated stream leaves one unresolved provider request and no publication.
The test never calls an external model. Omit `--typescript` to check the
JavaScript implementation; use a fresh output directory for each run.

`configure.py` is a test helper for building absolute v1 plans and selecting the
failure-injection worker. Application setup uses the static host and process
files in the focused projects. `server.py` includes qualification-only behavior;
`report_server.py` and `publication.py` contain the normal publication service.

The source files shared with the two application projects are generated copies.
Contributors run `scripts/process-examples/sync-projects.py` from the docs repository
to refresh them. Each downloadable project includes its own complete source and
dependency manifest.
