# Zero Data Retention (ZDR) Policy Audit

Audit provider Zero Data Retention (ZDR) claims against published Terms of Service, abuse monitoring windows, logging exceptions, and training opt-out guarantees.

## Workflow

1. Ingest provider data retention policy metadata:
   - Provider identifier
   - Enterprise vs standard API tier
   - Default retention period (days)
   - Zero Data Retention eligibility (is ZDR available, requires explicit agreement or enterprise plan?)
   - Abuse monitoring retention window (e.g. 0 days vs 30 days)
   - Third-party model provider pass-through terms (e.g. models hosted on AWS/Azure vs proprietary clusters)
   - Model training consent: are customer inputs or outputs used for model training?
2. Audit compliance against enterprise regulatory baselines:
   - Zero training guarantee (`training_consent: false` mandatory).
   - Maximum retention days $\le \text{Threshold}$ (e.g. 0 days for strict ZDR, or $\le 30$ days for abuse monitoring).
3. Output structured ZDR compliance verification receipt.

## Synthetic Input Format

JSON object with:
- `schemaVersion`: 1
- `provider`: string
- `tier`: string
- `policy`:
  - `defaultRetentionDays`: non-negative integer
  - `zdrAvailable`: boolean
  - `zdrRequiresAgreement`: boolean
  - `abuseMonitoringRetentionDays`: non-negative integer
  - `trainingOptOutGuaranteed`: boolean
  - `thirdPartyHostingExceptions`: list of strings
- `assertions`:
  - `requireZeroTraining`: boolean (default: true)
  - `maxAllowedRetentionDays`: integer

## Exit Codes

- `0`: Valid policy meeting all ZDR assertions.
- `1`: Policy fails ZDR assertions (e.g. training permitted or retention window exceeded).
- `2`: Malformed input or safety violation.

## Verification

```sh
python3 scripts/check.py examples/synthetic.json
```
