fix(store,gui,package): every reader that derives facts reads the committed journal (P15 T1 review)

A failed call's ids are handed out again (nothing it wrote counted), so a
reader of the raw journal pins dead lines on whatever takes the id next: a
failed books.create_bill for entry 42 then a manual entry 42 showed as a
Bill. One accessor, calls::committed (lines outside a call and of calls
that closed ok, the frame left out), now feeds the viewer's books (entry
events and origin, asset trails, party events), the package feed attention
reads, and the adopt preview's settings check. The journal page and
journal_history keep every line and say in words of each line of a call
that failed, never finished or is still running that it did not count.

A call's closing line is now bounded (ANSWER_CAP 4 KiB: above it, the
answer's SHA-256 and length), a call that wrote no line leaves no line (its
key and answer live in a bounded in-memory table), and the journaled
argument digest is an HMAC under the books' own call key, so two requests
that differ only in a tax id are two requests and nothing journaled lets a
guess of one be tested.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
swaitsandClaude Fable 5.2 committed 2026-11-21 10:09:17 -07:00
1 parent e542319e63
commit d4c0036599
11 files changed
+950 -120

No files matched your search

+6
View File
@@ -111,6 +111,12 @@ pub enum StoreError {
#[error("{0}")]
CallRefused(String),
/// A call's closing line is on disk, so the call committed and counts,
/// but the store could not bring its working copy up to it: the store
/// takes nothing more until the books are opened again, which does.
#[error("{0}")]
CallCommitted(String),
/// Replay produced different ids than the journal recorded.
#[error("replay mismatch: {0}")]
ReplayMismatch(String),