# Gate 1 Acceptance Evidence

This document tracks objective evidence for Gate 1 completion.

## Commands

- Verification harness:
  - `npm run gate1:verify`

## Latest Harness Result

Run timestamp: `2026-04-28T23:31:24.2754608+02:00`

Observed output:

```json
{
  "ok": true,
  "elapsedMs": 65,
  "checks": {
    "hashChainUntampered": true,
    "hashChainTamperDetection": true,
    "idempotencyDedup": true,
    "lifecycleNetZeroOnReverse": true,
    "projectionLagNormalLE5s": true,
    "projectionLagBurstLE30s": true
  },
  "metrics": {
    "normalLagMaxMs": 0,
    "burstLagMaxMs": 0
  }
}
```

Expected pass checks:

- hash-chain passes on untampered stream
- hash-chain fails on tampered stream
- idempotency dedup collapses at-least-once duplicates
- failed lifecycle net debit is zero after reversal
- projection lag max <= 5s under sustained 1000/s simulation
- projection lag max <= 30s under burst recovery simulation

## Manual API Checks (Stage)

1. `POST /api/credits-authorize` with same idempotency key twice:
   - first: `duplicate=false`
   - second: `duplicate=true`
2. `POST /api/credits-commit` without authorize:
   - `409 authorize_required`
3. `POST /api/credits-reverse` after commit:
   - balance restored by cost amount
4. `GET /api/credits-verify-chain`:
   - `ok=true`
   - lag flags populated

## Notes

- Gate 1 harness is synthetic and capacity-planning oriented.
- Real production load verification will use environment traffic replay and staged stress tests before enforcement rollout.
- Environment note: `npm` command is unavailable in this shell; harness validated with `node scripts/gate1-verify.js`.

