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
@@ -471,11 +471,18 @@ fn a_mutating_call_answers_with_the_head_and_a_refusal_names_its_remedy() {
|
||||
.unwrap();
|
||||
let head = added["head"]["seq"].as_u64().unwrap();
|
||||
let start = answer_of(&w.call("books.start", json!({}))).unwrap();
|
||||
// The head a write call answers is where its own lines end; its closing
|
||||
// line (which holds this very answer) follows at once, and is the
|
||||
// journal's head from then on (WB-format-8).
|
||||
assert_eq!(
|
||||
start["head"]["seq"],
|
||||
json!(head),
|
||||
"the head the call answered is the journal's"
|
||||
json!(head + 1),
|
||||
"the journal ends one line past the head the call answered: its closing line"
|
||||
);
|
||||
let journal = String::from_utf8(books.journal_raw()).unwrap();
|
||||
let last: serde_json::Value = serde_json::from_str(journal.lines().last().unwrap()).unwrap();
|
||||
assert_eq!(last["type"], "call.closed");
|
||||
assert_eq!(last["payload"]["last_seq"], json!(head));
|
||||
assert!(!added["next_steps"].as_array().unwrap().is_empty());
|
||||
// A confirm with no preview is refused as stale_preview, naming the
|
||||
// tool that previews.
|
||||
|
||||
Reference in new issue
Block a user