fix(package): books.start runs the real integrity check (U0b)
books.start passed Integrity::default() to the attention engine, so it asserted "database matches, no file failures". On a book whose database differs from the journal, or whose stored file is missing or corrupt, the viewer showed the database/stored-files items and the server did not: the two lists diverged exactly where they matter most. Call find, which computes the check: every distinct stored blob is read and hash-checked once (a damaged blob is still reported per attachment filed from it), and Store::disk_check now makes the viewer's comparison through a snapshot of its data directory instead of reporting a match. The parity test now damages its own fixture (removes the receipt's blob, then changes a projected account row) and asserts both lists still agree item for item and both name the damage. On the demo books (138 attachments, 138 distinct blobs, debug build) books.start takes about 0.26 s warm, 0.29 s cold, so the real check costs no decision.
This commit is contained in:
1 parent
0cf2f8f5c5
commit
26d3a9941b
6 files changed
+146
-27
No files matched your search
@@ -834,12 +834,7 @@ impl BooksServer {
|
||||
financing_accounts: &cfg.roles.financing,
|
||||
investing_accounts: &cfg.roles.investing,
|
||||
};
|
||||
let attention = ledger_package::find_with(
|
||||
store,
|
||||
today,
|
||||
&attention_settings,
|
||||
&ledger_package::Integrity::default(),
|
||||
);
|
||||
let attention = ledger_package::find(store, today, &attention_settings);
|
||||
for a in attention.iter().filter(|a| a.tool.is_some()).take(12) {
|
||||
let Some((tool, args)) = &a.tool else {
|
||||
continue;
|
||||
|
||||
Reference in new issue
Block a user