Auditing

Export a plane's ledger and check it yourself with tools/verify-ledger.mjs: chain, checkpoints and signatures.

A plane's ledger is meant to be checked by someone who doesn't trust the plane: you, an auditor, or a script in CI. The export is plain JSON Lines in a documented format, and tools/verify-ledger.mjs checks it using only Node's standard library. It shares no code with Floodwall: if it agrees, the export alone is enough to audit the ledger.

1. Export the ledger and its keys#

In the console, Ledger → Export downloads ledger.jsonl: every record and checkpoint, whatever your plan's retention. With an operator key:

sh
curl -s https://api.floodwall.ai/v1/planes/$FLOODWALL_PLANE/export \
  -H "Authorization: Bearer $FLOODWALL_KEY" -o ledger.jsonl
curl -s https://api.floodwall.ai/v1/planes/$FLOODWALL_PLANE/keys \
  -H "Authorization: Bearer $FLOODWALL_KEY" -o keys.json

keys.json holds the public keys the ledger is checked with: { "plane": "<hex>", "agents": { "<name>": "<hex>" }, "retired": { "<name>": ["<hex>"] } }. The plane's key signs its checkpoints; the agents' keys (with a keyring) signed their intents.

2. Run the verifier#

sh
git clone https://github.com/erphq/floodwall && cd floodwall
node tools/verify-ledger.mjs --allow-uncovered-tail ledger.jsonl keys.json
output
ok: 2989 records from genesis; 12 checkpoints; head d68d4329…
ok: 2989 agent signatures and every checkpoint signature verified
ok: every record is covered by a checkpoint signed by the plane

It exits 0 and prints a summary if everything checks out, including each policy bundle the records name; otherwise it prints the first problem with its line number and exits 1. A keys file that is given but isn't valid is a failure, never a fallback to checking hashes only.

What it checks#

  • Every line has exactly the documented fields and types, written exactly as Floodwall writes them, so no two JSON parsers can read it differently.
  • Every record is at the next position, links to the digest of the one before it, is at a tick no earlier than it, has the digest its fields give, and shows the intent it holds.
  • Every policy bundle a record names is well formed and covered by the record's digest.
  • Every checkpoint matches the records so far: chain head, RFC 6962 Merkle root and frontier.
  • With keys.json: every checkpoint is signed by the plane, and every intent by its agent's current or a retired key.
  • With the plane's key: every record is covered by a checkpoint the plane signed. Record digests are plain SHA-256 anyone can recompute, so only the signed checkpoints vouch for the verdicts.

Checkpoints and a live plane#

A plane cuts a checkpoint every 64 records. A ledger still being written usually has records after its last checkpoint; --allow-uncovered-tail accepts them and says how many no signed checkpoint covers yet. Without the flag the verifier refuses them, which is what you want for an export taken after the plane stopped.

An auditor who already trusts a checkpoint can check only what came after it: a suffix export starts from that checkpoint and is checked from it alone. See the ledger and checkpoints.

Matching the rules that decided#

A rules file that declares a bundle is named, with its SHA-256, in every decision it made. The verifier lists each bundle and how many records name it; check it against the file you hold:

sh
sha256sum policies/production.rules
# e3c40d20…  policies/production.rules
# the verifier: ok: bundle "production" revision "2026.10.28-1" (sha256 e3c40d20…) on 13 records

Daily verification and your own bucket#

FeatureFreeTeamBusiness
Ledger in the console7 days90 days1 year
Export (ledger.jsonl)wholewholewhole
Daily verification by the plane——yes, owner emailed on a failure
Daily copy to your S3-compatible bucket——yes

On Business, each plane checks its own stored ledger every day the way an auditor would: the hash chain, every checkpoint against the records and the plane's signature, and that the archive's chunks chain one to the next. The latest result is on GET /v1/planes/{plane}/verification; when a check fails, the owner is emailed once. The daily check doesn't replace running the verifier on an export, which checks every record and checkpoint.

Business accounts can also have each day's archive chunks copied to their own bucket (AWS S3, R2, GCS, MinIO), so a copy of the ledger lives outside Floodwall. See the export target route.

Self-hosted planes#

A plane you run yourself exports the same format: Ledger::export_jsonl writes it, and a ledger file on disk (Ledger::create) is already the same bytes. The crate's demo shows it end to end:

sh
cargo run --release -- --export audit/      # writes ledger.jsonl, ledger-suffix.jsonl and keys.json
node tools/verify-ledger.mjs audit/ledger.jsonl audit/keys.json