# Review your agent's credit evidence

This complete Rust application evaluates the receipt store from the Chio metered
service example. Extract `credit-review` beside `metered-service`. Cargo fetches its pinned public dependencies.
Use public Chio revision `5b8bec41d32f3838b880576fe6123c983ecebf8d`:
https://github.com/backbay-labs/chio/tree/5b8bec41d32f3838b880576fe6123c983ecebf8d

From `credit-review`, pass the directory printed by your metered-service run:

```bash
cargo run --release --locked -- ../metered-service/runs/YOUR_RUN
```

The application reads your capability to select the subject and operation. It
loads the public key chosen by that run's host before receipt creation, then
builds a receipt-based underwriting review and a separate facility review.
For another deployment, obtain the expected kernel key through your trusted
operator channel. This local application assumes an operator-controlled store;
it is not an importer for arbitrary third-party SQLite databases.

The command writes `credit-review.json`, `credit-facility-review.json`, and an
editable `underwriting-policy.json`. It preserves an existing policy file.
The complete reports expose their evidence selection and missing prerequisites.
The captured three-call example requests stronger evidence under the default
underwriting policy. Its separate facility review denies allocation: active
certification and the required runtime assurance are absent.

To compare stricter policy against the same evidence, change
`minimumApproveReputationScore` to `0.85` and `denyReputationScoreBelow` to `0.75`
in `underwriting-policy.json`, then run:

```bash
cargo run --release --locked -- ../metered-service/runs/YOUR_RUN underwriting-policy.json
```

The comparison writes `credit-comparison.json`; it does not install policy or
issue a credit decision. A different receipt history can produce a different
result. Neither command issues a facility, locks collateral, moves funds or
interrupts running work.

The review supplies no certification registry or budget store. Receipt financial
metadata remains part of the evidence, but there is no claim of budget-store
reconciliation. The companion avoids loading private signing seeds. It selects
up to 100 receipt references for underwriting; inspect returned and matching
counts before treating a larger review as complete.

The package contains only source, configuration, lockfile and this README.
It contains no receipt database, generated policy, signing key or credentials.
Rust 1.94.1 is selected by `rust-toolchain.toml`. The application was executed on
macOS against the supplied public revision.
