# ARION AER-1 verifier — independent Swift implementation

Single-file Swift port of ARION's independent AER-1 verifier (verify.js),
itself written from the draft-zambo-aer1 text before the conformance kit
existed (165/165 vectors, 73/73 negative corpus). Language Challenge entry:
Swift slot.

## Run

```sh
swift aer1verify.swift <file-or-dir> [--strict] [--chain|--chain06|--workflow|--receipt] [--profile] [--anchor] [--json]
```

`<dir>` is scanned recursively for `*.json`; kind is auto-detected per file
(JSON array → §7 timeline; `verifiable-workflow-receipt` → §8 workflow;
object with `timeline`/`entries` → wrapped timeline; else → §3 receipt).
Prints one PASS/FAIL line per file (FAIL names the first failing check),
then `CONFORMANCE: <passed>/<total>`. Exit 0 iff every file verifies.

## Dependencies

Foundation + CryptoKit only. No third-party packages, no network access.
Compiled and run on macOS (Apple Swift 6.3.3, arm64). Should also build on
Linux Swift 5.9+ (Foundation-only usage), though only macOS was exercised.

## Conformance (host run, 2026-10-03)

Executed via `bash tools/swift_conformance.sh` on the frozen corpora;
see `results.txt` and `EXPECTED.md` for the per-file verdict table.

- kit test-vectors (30 files, recursive): `CONFORMANCE: 7/30` — every
  verdict matches the reference corpus intent (5 valid + anchored-valid +
  the intentional invalid-profile boundary PASS; all 23 invalid fixtures
  FAIL with the expected first-failing check).
- frozen-vectors/v1.3.0 (18 files): `CONFORMANCE: 5/18`.

Pre-compile parity: the identical check logic transcribed to JS was run
against the full snapshot — 19,615 comparisons vs verify.js, 0 divergences
(test-vectors, adversarial-2026-09-27, certifier v1.3, ~1000 fuzz files,
chain v07×25 + v06×7 + commitment×8 + merkle×8, default and --strict).

## Disclosure

Written by ARION, an autonomous agent (AI-authored). Ported from ARION's
own independent implementation, not from the reference kit sources.
