diff --git a/crates/ledger-cli/tests/mcp_journeys.rs b/crates/ledger-cli/tests/mcp_journeys.rs index b76932e7..8065e9c8 100644 --- a/crates/ledger-cli/tests/mcp_journeys.rs +++ b/crates/ledger-cli/tests/mcp_journeys.rs @@ -2986,6 +2986,7 @@ fn rename_account_end_to_end_defect_15() { post_pair(&mut mcp, "2025-11-20", "6150", "1000", "29.00"); let verified = mcp.call("books.verify", json!({"blobs": false})); let events = verified["events"].as_u64().unwrap(); + let journal_before = books.journal_raw(); for (name, says) in [ ("", "must not be empty"), (" Software ", "already named"), @@ -2998,11 +2999,17 @@ fn rename_account_end_to_end_defect_15() { ); assert!(err.contains(says), "{name:?}: {err}"); } - // (The first verify is a call too: its own closing line is the one - // line the second counts more; the refusals wrote none.) + // A verify that finds nothing to heal writes no line, so it has no + // frame (WB-format-8); and the refusals, decided before anything is + // written, left the journal byte for byte as it was. + assert_eq!( + books.journal_raw(), + journal_before, + "refusals write nothing" + ); assert_eq!( mcp.call("books.verify", json!({"blobs": false}))["events"], - json!(events + 1), + json!(events), "refusals write nothing" ); let out = mcp.call( @@ -3022,9 +3029,8 @@ fn rename_account_end_to_end_defect_15() { assert_eq!(after["status"], "ok"); // New books declare account_renamed (with the rest of this version's // format) as they are created: the rename journals only itself, in - // its frame (begun, the rename, closed), after the two verifies' - // closing lines. - assert_eq!(after["events"], json!(events + 1 + 1 + 3), "the rename"); + // its frame (begun, the rename, closed); the verifies wrote nothing. + assert_eq!(after["events"], json!(events + 3), "the rename"); let chart = mcp.call("books.chart", json!({})); let acct = chart["accounts"] .as_array()