verify_peer_ledger
Verify an external ledger's integrity by recomputing its hash chain from JSONL text, identifying the first tampered line and whether all rows check out.
Instructions
Another agent handed you its exported ledger as JSONL text — decide whether to trust it. Recomputes the hash chain over the text alone (no access to their machine, no writes on yours) and returns {ok, rows, first_break, declared_breaks}. first_break is the INTEGER LINE NUMBER of the first bad row (or null if none), so you can point at exactly where their history stops adding up. ok is three-valued: true = every row verified; null = nothing undeclared broke but the scan was bounded (unchained rows, an empty export, or breaks the peer DECLARED) — read verified_scope, and do not treat null as a pass; false = tampered. declared_breaks counts breaks the peer named and pinned itself, which is a mark of honesty, not of integrity: they are still breaks.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| strict | No | Treat ANY unchained row as a break, and ignore the peer's own declarations. Use when the peer claims a log chained from genesis. | |
| jsonl_text | Yes | The peer's whole exported ledger, one JSON object per line, verbatim. Do not reformat it — re-serializing changes the bytes the chain covers. |