AGA Evidence Bundle (sample)
============================
A signed SEP evidence bundle. It is a fixture, signed with the published
sample-bundle key printed below, which no gateway holds. Its gateway_id label
"aga-demo-001" is shared with the live demo gateway, which signs with a
different key, so pin the key below, not the live gateway's.

VERIFY OFFLINE (no network, no dependencies; Node 18+):
  node verify.mjs --pubkey b900a315c50d9516c4efcb7a2300c25c602855eac8aa3b5a9d0939234d738ebe evidence-bundle.json

A PASS proves: every PRESENT receipt's Ed25519 signature is valid, the receipt
chain is unbroken, the Merkle proofs reproduce the root, the signed checkpoint
binds that root + the receipt count + the chain head (so nothing present was
added, reordered, or truncated), the unsigned envelope copies (gateway_id,
generated_at, merkle_root) agree with the signed checkpoint and the recomputed
root, and the bundle's key matches the key you pinned with --pubkey.

A PASS does NOT prove non-omission: it cannot establish that the signer recorded
every action it took. Completeness is bounded by the tamper-evidence of the
interception point, which is outside the bundle. Nor does a PASS prove
freshness: an earlier genuine export, presented as the current one, still
verifies, because the verifier has no input for when the record should end.

A field name repeated anywhere in the file (in a receipt, in the checkpoint or
in the envelope) still verifies: the verifier reads the last copy. Read the
values from the verifier's parsed output, not from the raw file (known issue 5
on https://attestedintelligence.com/security).

Omit --pubkey to check integrity only; the verifier will tell you provenance
was not checked. The key above is the sample-bundle signing key. This README
ships in the same zip as the bundle, so pin the copy printed on
https://attestedintelligence.com/verify instead. Pinning it shows the bundle
matches the key the company publishes, which is the same party that issued it:
it rules out swapping the bundle alone, not a substituted download.

TAMPER TEST: edit any SIGNED field in evidence-bundle.json (a tool_name, a
decision, a hash, a timestamp), reorder receipts, or delete one, and re-run.
The verdict flips to FAIL on the affected check. The envelope copies of
gateway_id, generated_at, and merkle_root are unsigned but cross-checked
against the signed checkpoint and the recomputed root, so editing them also
fails (Envelope consistency). These are unchecked metadata and verify
unchanged: bundle_id, schema_version, the envelope copy of policy_reference,
offline_capable, any field the format does not define, and JSON whitespace,
and so does a repeated field name. Nothing should be read from them. With the key pinned, a changed signed value
fails unless the holder of the gateway key re-signs the bundle; without a pin
the check is integrity only, and a bundle re-signed under a new key verifies.
The signed policy_reference inside each receipt is bound, and editing it fails
verification. Here it is a policy hash, as aga-proxy writes it; aga-mcp-server
3.6.0 through 3.6.2 sign it as an empty string. Arguments are committed by
hash, but the DENIED write_file receipt names the offending path in its signed
reason, as path-constraint denials in 3.6.0 through 3.6.2 do.

The same verification runs in your browser at
https://attestedintelligence.com/verify
