docs,test: claims WB-format-8 to 10, the interface, the handbook and the tests follow the review
WB-format-8 now says every reader applies the frame rule because ids are reused after a failed call, and names the committed accessor and the labels; WB-format-9 the keyed argument digest, the bounded answer, the in-memory table for calls that wrote nothing and what a repeat of a long answer is told; WB-format-10 the vault staged inside the transaction and the honest words when the closing line is on disk. docs/mcp-interface.md, the receipt store's frame paragraph and the handbook (contract, tracing figures) say the same. Tests follow the new shapes: a call that wrote nothing leaves no line, the head a write answers is where its own lines end and its closing line follows, the idempotency table compares events, and the checks that a refusal or a preview wrote nothing compare the raw journal. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
1 parent
4c23fade7a
commit
b592aaf416
13 files changed
+175
-68
No files matched your search
@@ -634,6 +634,41 @@ count. Every write call is one transaction: its lines commit together with
|
||||
its closing line or not at all, and after a crash a call without its closing
|
||||
line is not treated as done (WB-format-8 to WB-format-10).
|
||||
|
||||
What the books keep of a call, and what a repeat is told:
|
||||
|
||||
- A call that wrote journal lines is framed by `call.begun` and
|
||||
`call.closed`; its closing line keeps the answer (at most 4096 bytes). A
|
||||
repeat of it returns that answer byte for byte. If the answer was longer,
|
||||
the closing line keeps its SHA-256 and length instead, and a repeat is
|
||||
told in words that the call was done, with the journal lines it wrote
|
||||
(`books.journal_history` with `after_seq` lists them), and nothing is
|
||||
done again.
|
||||
- A call that wrote no journal line leaves no line at all. Its key and
|
||||
answer are kept in memory for the life of the server: a repeat within the
|
||||
session gets the same answer, and after a restart a repeat simply runs
|
||||
again, which is harmless because it wrote nothing (`books.back_up_now`,
|
||||
`books.begin_upload`).
|
||||
- "The same arguments" is a keyed digest of them, tax ids included, under a
|
||||
secret of the books' own that is never journaled: two requests that differ
|
||||
only in a tax id are two requests, and the same key with the other tax id
|
||||
is refused.
|
||||
- A write that fails after it wrote lines is on the record
|
||||
(`books.journal_history` lists its lines and says of each that it did not
|
||||
count); ids it took are handed out again to the next call, so a reader
|
||||
that takes the journal raw would pin its dead lines on whatever takes the
|
||||
id next: every reader applies the frame rule, and the journal in words
|
||||
(`books.journal_history`) and the viewer's journal page show every line and
|
||||
say of the ones that did not count that they did not.
|
||||
- A write to the tax-id vault is part of the call: it is final only when the
|
||||
call commits, so a failed or cut call never replaces or destroys a tax id.
|
||||
- A request that arrives while a call that has written a line is still
|
||||
open waits for its closing line: no read shows what a call did before the
|
||||
call committed.
|
||||
- If a call's closing line is saved but the books' working copy cannot be
|
||||
brought up to it, the call is told so in words: it was completed and
|
||||
counts, the books server stopped to protect the books, and sending the call
|
||||
again with the same key answers what it answered and changes nothing.
|
||||
|
||||
Books an older version wrote take no write at all until the owner gives the
|
||||
format upgrade its go-ahead (D-89, WB-format-11): every write is refused,
|
||||
before it runs, with `format_upgrade_pending` and the words "nothing can be
|
||||
|
||||
Reference in new issue
Block a user