From bc55a101019bbc82ab22a0fb9f912e5772243ec4 Mon Sep 17 00:00:00 2001 From: Stephen Waits Date: Sat, 21 Nov 2026 11:42:22 -0700 Subject: [PATCH] test(cli): the TIN-file refusals compare the raw journal on both sides The journal taken before the refusals was raw (frame lines in) and the one taken after still dropped frame lines, so the two could never match after T1. Both are raw now, with no filter for closing lines: a refused call leaves no begun line, no line, and no closing line with an error text. Co-Authored-By: Claude Fable 5.2 --- crates/ledger-cli/tests/mcp_journeys.rs | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/crates/ledger-cli/tests/mcp_journeys.rs b/crates/ledger-cli/tests/mcp_journeys.rs index 8065e9c8..ab46b7aa 100644 --- a/crates/ledger-cli/tests/mcp_journeys.rs +++ b/crates/ledger-cli/tests/mcp_journeys.rs @@ -805,18 +805,12 @@ fn tin_bearing_files_are_refused_when_given_back_to_be_filed() { ); } } - // (Each upload begun is a call, with its closing line: those only.) - let calls_only = |j: Vec| -> Vec { - String::from_utf8(j) - .unwrap() - .lines() - .filter(|l| !l.contains(r#""type":"call.closed""#)) - .map(str::to_string) - .collect() - }; + // Raw bytes, frame lines included: an upload slot writes no line, and a + // refusal is decided before anything is written, so no frame (begun or + // closed, with its error text) stands for any of these calls. assert_eq!( - calls_only(books.journal()), - calls_only(journal), + books.journal_raw(), + journal, "a refusal stored something" ); // Without TINs, the 1099 worksheet is an ordinary file: it may be