# Compliance Envelope v1 — Public implementation note

The canonical, source-controlled specification is maintained with this release at
`docs/SPEC-compliance-envelope-v1.md`. This public companion describes the deployed API.

## Contract

`POST /api/v1/evaluate` authenticates a tenant API key, requires an idempotency key, evaluates a
published immutable ruleset, seals a privacy-safe evidence record in the WORM vault, writes an
audit-chain receipt, and returns a public verification and offline-bundle URL.

Ruleset versions are immutable. Re-screening is `POST /api/v1/evaluate/{evidence_id}/rescreen`;
the caller supplies fresh canonical input and the new evidence record references the prior record.
Neither endpoint executes, settles, issues, custody-holds, freezes, or reverses funds.

`POST /api/v1/demo/compliance-envelope-proofs` is a bounded, no-input production demonstration:
it seals only server-generated synthetic evidence for a live versioned-source sanctions deny, a
deliberate missing-credential unavailable-source review, and an immutable ruleset revision. The
unavailable-source check proves fail-closed behavior; it does not claim the upstream source is down.

## Fail-safe behavior

Missing or unavailable required sources result in `review`, never `allow`. A sanctions exact match
results in `deny`. Evidence is returned only after vault, audit receipt, and index operations all
succeed. A customer credit is consumed only after those integrity operations complete.

## Verification

`GET /api/v1/evaluate/verify?evidence_id=ce_…` returns the public record and inclusion state.
`GET /api/v1/evaluate/{evidence_id}/bundle` returns a signed factset that can be checked with
`node scripts/verify-evidence-bundle.mjs bundle.json` without network access.

This is technical evidence infrastructure, not legal advice or a claim of regulatory approval.
