check / check (push) Canceled after 0s
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
164 lines
5.3 KiB
TOML
164 lines
5.3 KiB
TOML
# A report asked for without dates covers this fiscal year so far.
|
|
#
|
|
# wanderbooks: P3 defect 16 (the report tools, books.show and the viewer
|
|
# each read omitted dates their own way); rules.md B-30; regression tests
|
|
# `prop_period_defaults_resolve` (ledger-core tests/properties.rs),
|
|
# `one_default_period_everywhere_defect_16` (ledger-cli
|
|
# tests/mcp_journeys.rs), `show_sends_the_dates_it_names_defect_16` and
|
|
# `show_refuses_start_after_end_defect_15` (ledger-cli tests/oracle_mcp.rs).
|
|
#
|
|
# Expected values (bookspec/README.md): `period` gives the dates a period
|
|
# report asked with these dates covers, `day` the day a report as of a day
|
|
# is made as of, `calendar_year` the year a calendar-year count counts,
|
|
# each by the one rule on `today`; a query that omits a date resolves it
|
|
# by the same rule. The amounts fall one to a fiscal year (July to June),
|
|
# so each period's figures show which period it was.
|
|
|
|
id = "default-period-fiscal-year-to-date"
|
|
title = "A report asked for without dates covers this fiscal year so far"
|
|
rule = "A period report whose end is omitted MUST end today, in the company's time zone, and one whose start is omitted MUST start on the first day of the fiscal year that holds its end; a start after the end, given or derived, MUST be refused, never swapped. A report as of a day whose day is omitted MUST be as of today, and a count by calendar year whose year is omitted MUST count this calendar year."
|
|
status = "CHOICE"
|
|
sources = [
|
|
"IRS Publication 538 (Rev. January 2022), Tax year: \"A tax year is an annual accounting period for keeping records and reporting income and expenses.\" (the period: AUTHORITY; docs/spec/sources/irs-periods-and-methods.md)",
|
|
"26 U.S.C. §6041(a), \"in any calendar year\"; §6041A(a)(2), \"during such calendar year\" (the calendar-year counts: AUTHORITY; docs/spec/sources/irs-1099-thresholds.md)",
|
|
"DECISION, the owner, 2026-10-20 (wanderbooks plan/served.md P3, \"Settled in design\"): the fiscal year to date as the default, everywhere; no authority says what omitted dates mean (wanderbooks docs/spec/rules.md B-30)",
|
|
]
|
|
tags = ["periods", "reports", "defaults", "fiscal-year"]
|
|
|
|
[setup]
|
|
currency = "USD"
|
|
fiscal_year_start = "07-01"
|
|
basis = "accrual"
|
|
rounding = "half-even"
|
|
today = "2026-10-20"
|
|
|
|
[[setup.accounts]]
|
|
code = "1000"
|
|
name = "Cash"
|
|
type = "asset"
|
|
|
|
[[setup.accounts]]
|
|
code = "3000"
|
|
name = "Capital"
|
|
type = "equity"
|
|
|
|
[[setup.accounts]]
|
|
code = "4000"
|
|
name = "Sales"
|
|
type = "revenue"
|
|
|
|
[[setup.accounts]]
|
|
code = "6000"
|
|
name = "Software"
|
|
type = "expense"
|
|
|
|
# Entry 1: in the fiscal year July 2024 to June 2025.
|
|
[[events]]
|
|
date = "2025-03-15"
|
|
description = "Capital contributed"
|
|
lines = [
|
|
{ account = "1000", side = "debit", amount = "500.00" },
|
|
{ account = "3000", side = "credit", amount = "500.00" },
|
|
]
|
|
|
|
# Entries 2 and 3: in the fiscal year July 2025 to June 2026.
|
|
[[events]]
|
|
date = "2025-09-10"
|
|
description = "Sale"
|
|
lines = [
|
|
{ account = "1000", side = "debit", amount = "120.00" },
|
|
{ account = "4000", side = "credit", amount = "120.00" },
|
|
]
|
|
|
|
[[events]]
|
|
date = "2026-02-01"
|
|
description = "Software"
|
|
lines = [
|
|
{ account = "6000", side = "debit", amount = "20.00" },
|
|
{ account = "1000", side = "credit", amount = "20.00" },
|
|
]
|
|
|
|
# Entry 4: in the fiscal year that holds today, July 2026 to June 2027.
|
|
[[events]]
|
|
date = "2026-08-03"
|
|
description = "Sale"
|
|
lines = [
|
|
{ account = "1000", side = "debit", amount = "7.00" },
|
|
{ account = "4000", side = "credit", amount = "7.00" },
|
|
]
|
|
|
|
# Both dates omitted: the fiscal year that holds today, through today.
|
|
[[expect]]
|
|
query = "period"
|
|
values = { from = "2026-07-01", to = "2026-10-20" }
|
|
|
|
[[expect]]
|
|
query = "profit_and_loss"
|
|
values = { "4000" = "7.00", "6000" = "0.00", net_income = "7.00" }
|
|
|
|
# Only an end: the fiscal year that holds the end, through it (never the
|
|
# first entry's day, never the fiscal year of today).
|
|
[[expect]]
|
|
query = "period"
|
|
to = "2026-03-31"
|
|
values = { from = "2025-07-01", to = "2026-03-31" }
|
|
|
|
[[expect]]
|
|
query = "profit_and_loss"
|
|
to = "2026-03-31"
|
|
values = { "4000" = "120.00", "6000" = "20.00", net_income = "100.00" }
|
|
|
|
# Only a start: through today.
|
|
[[expect]]
|
|
query = "period"
|
|
from = "2025-01-01"
|
|
values = { from = "2025-01-01", to = "2026-10-20" }
|
|
|
|
[[expect]]
|
|
query = "profit_and_loss"
|
|
from = "2025-01-01"
|
|
values = { "4000" = "127.00", "6000" = "20.00", net_income = "107.00" }
|
|
|
|
# A one-day period is a period.
|
|
[[expect]]
|
|
query = "period"
|
|
from = "2025-09-10"
|
|
to = "2025-09-10"
|
|
values = { from = "2025-09-10", to = "2025-09-10" }
|
|
|
|
# A start after the end is refused, never swapped.
|
|
[[expect]]
|
|
query = "period"
|
|
from = "2026-12-31"
|
|
to = "2026-01-01"
|
|
refused = "end_before_start"
|
|
|
|
# Only a start, after today: the end an omitted end means is today, so the
|
|
# period would end before it starts. Refused, never swapped.
|
|
[[expect]]
|
|
query = "period"
|
|
from = "2027-01-01"
|
|
refused = "start_after_today"
|
|
|
|
# A report as of a day: today.
|
|
[[expect]]
|
|
query = "day"
|
|
values = { as_of = "2026-10-20" }
|
|
|
|
[[expect]]
|
|
query = "trial_balance"
|
|
values = { "1000" = "607.00", "3000" = "-500.00", "4000" = "-127.00", "6000" = "20.00" }
|
|
|
|
# A count by calendar year: this calendar year, not the fiscal one.
|
|
[[expect]]
|
|
query = "calendar_year"
|
|
values = { year = "2026" }
|
|
|
|
# The calendar's first fiscal year: a July year holding a day early in
|
|
# year 1 began in year 0, outside the calendar; it starts on the
|
|
# calendar's first day.
|
|
[[expect]]
|
|
query = "period"
|
|
to = "0001-03-01"
|
|
values = { from = "0001-01-01", to = "0001-03-01" }
|