The owner (2026-10-23): "We should probably just delete the stdio path altogether. THere's no point in that. And it sitting there unused will just lead to bitrot. Nuke it?" Books are served only by the books server (`wanderbooks server`), reached by agents through the bridge (`wanderbooks mcp --book ID`), which stays. Removed: `wanderbooks dev-stdio`, the `ledger-mcp` binary, and `ledger_mcp::run` (stdio and `--http` over a bare data dir), with all that only that mode had: - files the books make coming back inline: `HandedFile.content_base64` is gone, and `download` and `expires_at` are always there; - books with no access log or backups: `books.access_log`, `books.backup` and `books.back_up_now` are always offered, by scope; - the settings file read and reloaded (`legacy_files`), the vault key named by a file or `--vault-key-file`, and the books dir's key-inside-the-books and git checks (with `paths.rs`); - `wire.rs` (the bridge frames an agent's lines itself); - `books.settings`' file fields and `books.start`'s `settings_source`. `BooksServer` is built one way, from `Served` (a book as the books server serves it), in production and in the unit tests. An unknown tool is now a protocol error (mcp-tools.md). Inline file input is unchanged. Then the owner's three decisions (2026-10-23, the question tool): (a) `books.import_settings` is removed entirely (118 tools): old books come in whole by `wanderbooks books adopt`, which reads their settings file once; ledger-config keeps its settings-file parsing only as far as adoption uses it (`load` and the path-reading `effective_receipt_policy` are gone), and `books.chart_template` gives its settings as `books.set_setting` changes. (b) The viewer's loose-books-folder mode is removed (`--data-dir`, `--books-toml`, `--vault-key-file`, the settings file and config.json followed): it opens only books of the data root, reading settings from the journal and the vault from the book's own `vault/` and `keys/`. (c) `wanderbooks dev-stdio` has no stub: it is an unknown command like any other word. Also: an upload's expiry past the calendar is an error, never an empty string. Tests: every suite that drove the stdio server moved to crates/ledger-cli/tests/ and drives a real `wanderbooks server` on a data root of its own (tests/common), handed files by their download; mcp_stdio.rs is mcp_journeys.rs. Tests of what is gone are deleted and listed in docs/testing.md. Docs: plan D-44 (D-18 superseded), STATUS, testing, rules, mcp-interface, the handbook, README; justfile recipes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01T3gXMVt7XJPi6ens1or9Dj
150 lines
4.7 KiB
TOML
150 lines
4.7 KiB
TOML
# Renaming an account changes its label, never an amount.
|
|
#
|
|
# wanderbooks: P3 defect 15 (an account could not be renamed); rules.md
|
|
# B-8, B-31; regression tests `rename_account_changes_only_the_name_defect_15`
|
|
# and `prop_rename_changes_no_figure` (ledger-store tests/store.rs),
|
|
# `rename_account_end_to_end_defect_15` (ledger-cli tests/mcp_journeys.rs).
|
|
# The journal's record of the old name beside the new (`account.renamed`)
|
|
# is the store's, checked there.
|
|
#
|
|
# Expected values (bookspec/README.md): the same trial balance before the
|
|
# rename (`after = 2`) and after it; `account_names` gives each account's
|
|
# name as every report prints it, past periods included; each
|
|
# `rename_account` is tried on a copy of the books, after the rename.
|
|
|
|
id = "rename-changes-no-amount"
|
|
title = "Renaming an account changes its label, never an amount"
|
|
rule = "Entries name accounts by identity, not by name, so renaming an account MUST change no posted entry, line, balance or statement amount, and every report, past periods included, MUST print the new name. A new name MUST be refused when it is blank, the name the account has, one another account under the same parent has (ignoring capitals and surrounding space), one that holds a run of nine digits, or not one line of at most 200 characters."
|
|
status = "CHOICE"
|
|
sources = [
|
|
"Pacioli, Summa de arithmetica (1494), ch. 36: \"You should not write backward, but always forward\" (posted is forever: AUTHORITY; docs/spec/sources/pacioli-1494.md)",
|
|
"Rev. Proc. 98-25 §5.01: \"the relationship (i.e., audit trail): (a) between the total of the amounts in the taxpayer's machine-sensible records by account and the account totals in the taxpayer's books\" (an amount never moves with a name: AUTHORITY; docs/spec/sources/irs-records.md)",
|
|
"Intuit IIF Import Kit, !ACCNT: accounts are identified by NAME, so two siblings of one name would be one account in QuickBooks (CONVENTION; docs/spec/sources/intuit-iif.md)",
|
|
"DECISION, the owner, 2026-10-20 (wanderbooks plan/served.md P3, \"Settled in design\"): the name rules (wanderbooks docs/spec/rules.md B-31)",
|
|
]
|
|
tags = ["chart", "rename", "audit-trail", "posted-is-forever"]
|
|
|
|
[setup]
|
|
currency = "USD"
|
|
fiscal_year_start = "01-01"
|
|
basis = "accrual"
|
|
rounding = "half-even"
|
|
|
|
[[setup.accounts]]
|
|
code = "1000"
|
|
name = "Cash"
|
|
type = "asset"
|
|
|
|
[[setup.accounts]]
|
|
code = "3000"
|
|
name = "Capital"
|
|
type = "equity"
|
|
|
|
[[setup.accounts]]
|
|
code = "6000"
|
|
name = "Operating"
|
|
type = "expense"
|
|
header = true
|
|
|
|
[[setup.accounts]]
|
|
code = "6150"
|
|
name = "Software"
|
|
type = "expense"
|
|
parent = "6000"
|
|
|
|
[[setup.accounts]]
|
|
code = "6160"
|
|
name = "Hosting"
|
|
type = "expense"
|
|
parent = "6000"
|
|
|
|
# Entry 1.
|
|
[[events]]
|
|
date = "2025-11-04"
|
|
description = "Capital contributed"
|
|
lines = [
|
|
{ account = "1000", side = "debit", amount = "800.00" },
|
|
{ account = "3000", side = "credit", amount = "800.00" },
|
|
]
|
|
|
|
# Entry 2: posted to 6150 under its old name.
|
|
[[events]]
|
|
date = "2025-11-20"
|
|
description = "Software"
|
|
lines = [
|
|
{ account = "6150", side = "debit", amount = "29.00" },
|
|
{ account = "1000", side = "credit", amount = "29.00" },
|
|
]
|
|
|
|
# After entry 2, the owner renames 6150.
|
|
[[changes]]
|
|
after = 2
|
|
rename = { code = "6150", name = "Software subscriptions" }
|
|
|
|
# Before the rename.
|
|
[[expect]]
|
|
query = "account_names"
|
|
after = 2
|
|
values = { "1000" = "Cash", "3000" = "Capital", "6000" = "Operating", "6150" = "Software", "6160" = "Hosting" }
|
|
|
|
[[expect]]
|
|
query = "trial_balance"
|
|
as_of = "2025-11-30"
|
|
after = 2
|
|
values = { "1000" = "771.00", "3000" = "-800.00", "6000" = "0.00", "6150" = "29.00", "6160" = "0.00" }
|
|
|
|
# After it: every amount as before; the new name, past periods included.
|
|
[[expect]]
|
|
query = "account_names"
|
|
values = { "1000" = "Cash", "3000" = "Capital", "6000" = "Operating", "6150" = "Software subscriptions", "6160" = "Hosting" }
|
|
|
|
[[expect]]
|
|
query = "trial_balance"
|
|
as_of = "2025-11-30"
|
|
values = { "1000" = "771.00", "3000" = "-800.00", "6000" = "0.00", "6150" = "29.00", "6160" = "0.00" }
|
|
|
|
[[expect]]
|
|
query = "profit_and_loss"
|
|
from = "2025-11-01"
|
|
to = "2025-11-30"
|
|
values = { "6000" = "0.00", "6150" = "29.00", "6160" = "0.00", net_income = "-29.00" }
|
|
|
|
# Refused, changing nothing.
|
|
[[expect]]
|
|
query = "rename_account"
|
|
code = "6150"
|
|
name = " "
|
|
refused = "blank"
|
|
|
|
[[expect]]
|
|
query = "rename_account"
|
|
code = "6150"
|
|
name = " Software subscriptions "
|
|
refused = "unchanged"
|
|
|
|
[[expect]]
|
|
query = "rename_account"
|
|
code = "6150"
|
|
name = "HOSTING"
|
|
refused = "sibling_has_it"
|
|
|
|
[[expect]]
|
|
query = "rename_account"
|
|
code = "6150"
|
|
name = "Card 123456789"
|
|
refused = "holds_a_tin"
|
|
|
|
[[expect]]
|
|
query = "rename_account"
|
|
code = "6150"
|
|
name = "Software\nsubscriptions"
|
|
refused = "not_one_line"
|
|
|
|
# A name an account under another parent has is no sibling's: accepted,
|
|
# moving no amount.
|
|
[[expect]]
|
|
query = "rename_account"
|
|
code = "6150"
|
|
name = "Cash"
|
|
accepted = true
|