sysknife_audit_verify
Verify the integrity of the audit log's Ed25519-signed hash chain, returning status and first broken row if any.
Instructions
Verify the tamper-evident Ed25519-signed hash chain over the audit log. Returns status (intact/broken/cannot_verify), rows_checked, and, on broken, the first offending row. Read-only and safe to call without prior sysknife_plan.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| actual | No | The hex Ed25519 signature actually stored for the first broken row. | |
| reason | No | Human-readable explanation. Only set when `status == "cannot_verify"`. | |
| status | Yes | One of `"intact"`, `"broken"`, `"cannot_verify"`. | |
| backend | Yes | Backend label: a filesystem path for SQLite, the literal `"postgres"` for Postgres deployments. | |
| expected | No | What verification expected for the first broken row (the literal `"valid ed25519 signature"`). | |
| rows_checked | Yes | Number of audit rows the verifier successfully checked. `0` for `cannot_verify` outcomes that fail before the first row is read. | |
| binding_status | Yes | `"consistent"` or `"missing_event"`: whether every event tip committed by a transaction row is still present in the event chain. | |
| events_checked | Yes | Number of approval events (grant / consume / revoke) checked in the second chain. | |
| first_broken_seq | No | Sequence number of the first row that broke the chain. Only set when `status == "broken"`. | |
| approval_events_status | Yes | Result of the approval-event chain walk: `"intact"`, `"broken"`, or `"cannot_verify"`. Reported separately from `status` so a clean authorisation trail can never paper over a tampered approval trail. | |
| first_broken_transaction_id | No | Transaction ID of the first broken row. Only set when `status == "broken"`. |