aboutsummaryrefslogtreecommitdiff
path: root/docs/PROTOCOL.md
diff options
context:
space:
mode:
authorAnders Betts <anders.betts@gmail.com>2026-09-20 09:20:39 +0200
committerAnders Betts <anders.betts@gmail.com>2026-09-20 09:20:39 +0200
commit5b27bb0950fd03d29c223b5960faff89baf37970 (patch)
tree5cc99420a4fc1365fdb8bf4bbec8237fa306fd4b /docs/PROTOCOL.md
parenta61cfeefb0599e74fc9189b189b16dd0b6d36f0f (diff)
downloadbokf-5b27bb0950fd03d29c223b5960faff89baf37970.tar.gz
bokf-5b27bb0950fd03d29c223b5960faff89baf37970.zip
audit: verify voucher chains and attachment hashes
Diffstat (limited to 'docs/PROTOCOL.md')
-rw-r--r--docs/PROTOCOL.md5
1 files changed, 3 insertions, 2 deletions
diff --git a/docs/PROTOCOL.md b/docs/PROTOCOL.md
index 7052b83..47f6f26 100644
--- a/docs/PROTOCOL.md
+++ b/docs/PROTOCOL.md
@@ -443,10 +443,11 @@ be created.
|---|---|---|
| `backup.snapshot` | `dest?` | `path`, `sha256`, `size`, `at` — uses SQLite `VACUUM INTO`, no downtime |
| `audit.list` | `from?`, `to?`, `action?`, `actor?`, `limit`, `cursor` | behandlingshistorik |
-| `audit.verify` | `full?` | recomputes voucher and audit hash chains; `ok`, `checked`, first/last mismatch if any |
+| `audit.verify` | `full?` | recomputes the voucher and audit hash chains, flags unbalanced vouchers, and with `full:true` re-hashes attachments; `ok`, `checked` (audit entries), `vouchers_checked`, `attachments_checked`, `unbalanced_vouchers` and the first bad `first_bad_voucher_id` / `first_bad_seq` / `first_bad_attachment_id` / `first_unbalanced_voucher_id` on failure |
`audit.verify` is cheap enough to run after every import and before every
-backup; `full:true` includes attachment hashes.
+backup; `full:true` includes attachment hashes. The voucher chain is verified
+per org in posting order (SCHEMA.md §7.1); the audit chain globally.
## 8. The TUI is just a client