From 2a6bac02d52d72848cec66e852dbe3222166c327 Mon Sep 17 00:00:00 2001 From: Stephen Waits Date: Thu, 29 Oct 2026 17:21:43 -0600 Subject: [PATCH] test(cli): the IIF warning count ignores P8's audit notice; the harness asks the platform where the root is GitHub's check on 880278ea: `cpa_package_holds_the_year_and_its_evidence` counts the IIF transliteration warnings, and P8's "No counted audit stands behind this package" notice (a warning while the books hold no audit run) made four into five; the count now excludes it. The portable macOS job, now that the harness prints the server's log: "there is no books' private folder yet: run `wanderbooks setup` first". `Home::root()` spelled out `.local/share/wanderbooks`, the Linux data folder; `setup --home` on macOS makes the root under `Library/Application Support`. The harness asks `default_root` now, the same answer on every OS. Co-Authored-By: Claude Fable 5.1 Claude-Session: https://claude.ai/code/session_01HS8WZziDnyxunC23MUxrLp --- crates/ledger-cli/tests/common/mod.rs | 6 +++++- crates/ledger-cli/tests/oracle_mcp.rs | 3 +++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/crates/ledger-cli/tests/common/mod.rs b/crates/ledger-cli/tests/common/mod.rs index 027eb9d..05659c1 100644 --- a/crates/ledger-cli/tests/common/mod.rs +++ b/crates/ledger-cli/tests/common/mod.rs @@ -78,8 +78,12 @@ impl Home { } } + /// The root `setup --home` made: the platform's data folder under the + /// home (`.local/share` on Linux, `Library/Application Support` on + /// macOS), never a Linux path spelled out (the portable macOS job + /// found the server refusing a root that was never set up). pub fn root(&self) -> PathBuf { - self.dir.path().join(".local/share/wanderbooks") + ledger_store::root::default_root(self.dir.path()) } pub fn run(&self) -> PathBuf { diff --git a/crates/ledger-cli/tests/oracle_mcp.rs b/crates/ledger-cli/tests/oracle_mcp.rs index 564d5fa..061c7bc 100644 --- a/crates/ledger-cli/tests/oracle_mcp.rs +++ b/crates/ledger-cli/tests/oracle_mcp.rs @@ -3497,11 +3497,14 @@ fn cpa_package_holds_the_year_and_its_evidence() { // and the em dashes of the depreciation memos: written differently, so // said, the memos grouped (four lines for one name and four memos), in // warnings and the README alike. + // (The audit notice P8 adds while no counted audit stands behind the + // package is a warning too; it is not about the IIF.) let warnings: Vec = out["warnings"] .as_array() .unwrap() .iter() .map(|w| w.as_str().unwrap().to_string()) + .filter(|w| !w.starts_with("No counted audit")) .collect(); assert_eq!(warnings.len(), 4, "{out}"); let readme = std::str::from_utf8(&files["README.txt"]).unwrap();