Needs attention was computed by the viewer alone, while books.start hand-picked a handful of next steps. The human's list and the agent's could disagree, and a new item had to be written twice (or, as books.start showed, not at all). Move the engine to ledger-package over PackageBooks: one function, find/find_with(books, today, settings, integrity), reads the ledger, the journal's event types (an entry's origin), the attachments and their links, the statements, the reconciliations, and the database check. The viewer's attention module now only maps Target to Route; books.start turns the same items into its next steps (why = the item's title, top 12), so the list the human sees and the steps the agent gets cannot drift. PackageBooks gains settings, journal, statements, reconciliations and disk_check, implemented for Store and Snapshot, so both views answer alike. The W-9, reconciliation and 1099 predicates move beside the items to keep one copy. ledger-package gains ledger-config and serde_json (the receipt policy and the tool arguments the items carry). Tests: view_model.rs and spec_kept.rs pass unchanged; the new attention_parity.rs compares the viewer and books.start item for item on the demo books and on a book written entry by entry. just check green.
27 lines
688 B
TOML
27 lines
688 B
TOML
[package]
|
|
name = "ledger-package"
|
|
version = "0.1.0"
|
|
edition.workspace = true
|
|
license.workspace = true
|
|
repository.workspace = true
|
|
description = "wanderbooks' CPA handoff package and the reports and worksheets it shares with the server: built from the books read-only, by the server or the viewer."
|
|
|
|
[dependencies]
|
|
ledger-core = { path = "../ledger-core" }
|
|
ledger-store = { path = "../ledger-store" }
|
|
ledger-config = { path = "../ledger-config" }
|
|
ledger-import = { path = "../ledger-import" }
|
|
ledger-vault = { path = "../ledger-vault" }
|
|
chrono = "0.4"
|
|
rust_decimal = "1"
|
|
serde_json = "1"
|
|
zip = "9.0.1"
|
|
|
|
[lints]
|
|
workspace = true
|
|
|
|
[dev-dependencies]
|
|
proptest = "1"
|
|
tempfile = "3"
|
|
toml = "1"
|