docs(claims): refused dates, amounts, periods, roles, exports, 1099 years and returns

Each rule's Checked line names the bookspec example that now shows it, the
enforcement site it goes through, and the test that runs it:

- B-28 (BS-entry-4, BS-entry-7): the date past 9999 and the line past the
  cap, through `try_create_entry` and `add_line`;
- B-12 (BS-period-4): the partly overlapping quarter, through
  `create_period`'s PeriodsOverlap;
- B-23 (BS-ledger-19): the role on a header, through `Store::assign_role`
  and `check_assign_role`;
- BS-format-10: the export refused through `IifError`;
- B-19 (BS-1099-2): the 2027 worksheet refused through `RuleNotKnown`;
- B-26 (BS-partner-8): the return taking 123-45-6789 from the vault.

Co-Authored-By: DeepSeek V4.1 Flash <noreply@opencode.ai>
This commit is contained in:
swaitsandDeepSeek V4.1 Flash committed 2026-11-09 07:40:31 -07:00
1 parent 7ac1e644b2
commit ad55ede8e4
6 files changed
+47 -6

No files matched your search

+8 -1
View File
@@ -62,7 +62,14 @@ Kani `payment_bucket_is_the_table`, `payment_split_is_exact`,
`the_untagged_note_counts_only_money_out`,
`the_other_receipts_note_says_what_each_entry_did` (ledger-package); the
MCP tests through a real books server (ledger-cli); bookspec
`examples/1099-*.toml`.
`examples/1099-*.toml`, including
`1099-a-worksheet-for-an-unpublished-year-is-refused` (BS-1099-2, the
option picked: a 2027 worksheet is refused through
`LedgerError::RuleNotKnown` as unknown_1099_year, never guessed), run by
`every_bookspec_example_holds` and
`the_runner_reports_every_claimed_rule_green`; the example for the option
not picked, `1099-a-worksheet-for-an-unpublished-year-carries-the-last-amount`,
is skipped.
### Product rules
+7 -1
View File
@@ -107,7 +107,13 @@ replay pair; `a_foreign_amount_and_a_rate_take_at_most_ten_places`),
`out_of_range_amount_is_rejected`; `ledger-store` `tests/bounds.rs`,
`tests/store.rs` `a_journaled_foreign_line_finer_than_ten_places_still_opens`;
`ledger-cli` `server.rs` `periods_are_a_year_and_a_month`,
`dates_are_four_digit_years_and_real_days`.
`dates_are_four_digit_years_and_real_days`; bookspec examples
`entry-a-date-past-9999-is-refused` and
`entry-an-amount-past-the-line-cap-is-refused` (BS-entry-7, the option picked:
the books refuse `try_create_entry`'s date past 9999 and `add_line`'s amount
past the cap, read off `LedgerError::DateOutOfRange` and
`LedgerError::AmountOutOfRange`), run by `every_bookspec_example_holds` and
`the_runner_reports_every_claimed_rule_green`.
### Product rules
+8 -1
View File
@@ -289,7 +289,14 @@ a file. **Checked:** `ledger-import` `tests/spec_import.rs`
`tests/package.rs`
(`the_package_refuses_an_entry_on_two_receivable_or_payable_accounts`);
`ledger-cli` `oracle_mcp.rs`
(`iif_and_the_package_refuse_an_entry_on_two_receivable_or_payable_accounts`).
(`iif_and_the_package_refuse_an_entry_on_two_receivable_or_payable_accounts`);
bookspec example
`format-an-export-of-an-entry-on-two-control-accounts-is-refused`
(BS-format-10, the option picked: an entry an earlier version wrote on a
receivable and a payable account is refused for export, read off
`IifError::SeveralReceivablePayableAccounts`), run by
`every_bookspec_example_holds` and
`the_runner_reports_every_claimed_rule_green`.
**Enforced:** `ledger_import::iif` (`field`, `iif_accounts`, `iif_classes`,
`journal_to_iif`, `Iif::warnings`, `Iif::changes`, `Iif::receivable_payable`),
+7 -1
View File
@@ -191,7 +191,13 @@ None.
`check_assign_role`, `Ledger::check_renumber_account` (an assigned role
frees its code); the control guard and `Ledger::control_check` (B-38).
**Checked:** `ledger-core` `tests/spec_roles.rs`, `tests/spec_documents.rs`;
`ledger-store` replay of `role.assigned`.
`ledger-store` replay of `role.assigned`; bookspec example
`ledger-a-role-on-an-account-of-the-wrong-type-is-refused` (BS-ledger-19,
the option picked: the receivables role on a header account is refused
through `Store::assign_role` and `Ledger::check_assign_role`'s
`ControlAccountMismatch`, and the chart is as it was), run by
`every_bookspec_example_holds` and
`the_runner_reports_every_claimed_rule_green`.
### Product rules
+8 -1
View File
@@ -128,7 +128,14 @@ the books' last fours).
`tests/spec_parties.rs`, `tests/spec_vault.rs` (every response, every
file handed over, the server's log, and every file in the books' folder
outside `vault/` and the files kept for their download scanned for the
TINs in any formatting), `tests/tin_files.rs`
TINs in any formatting), bookspec examples
`partner-a-return-takes-the-full-tin-from-the-vault` (BS-partner-8, the
option picked: the books hold 6789 and the return takes 123-45-6789 from
the vault) and `partner-a-return-with-no-full-tin-is-refused` (the nowhere
option, which wanderbooks does not pick: the return is refused
tin_not_held), the first run by `every_bookspec_example_holds` and
`the_runner_reports_every_claimed_rule_green`, the second skipped;
`tests/tin_files.rs`
(`a_tin_bearing_file_is_refused_from_every_session_and_after_a_restart`,
`text_with_a_vault_tin_or_a_printed_one_is_refused_and_a_bank_export_is_not`,
`text_probing_for_a_tin_is_refused_alike_by_every_filing_tool`), and the
+9 -1
View File
@@ -37,7 +37,15 @@ decision, D-73, 2026-11-08). **Checked:** Kani
store property `refused_commands_never_reach_the_journal` (no draft in a
closed period); `periods_nest_but_never_partially_overlap`
(`crates/ledger-core/tests/invariants.rs`) and `periods_nest`
(`crates/ledger-core/tests/spec_ledger.rs`).
(`crates/ledger-core/tests/spec_ledger.rs`); bookspec example
`period-a-period-that-partly-overlaps-another-is-refused` (BS-period-4, the
option picked: a February through April period that shares days with a
closed quarter is refused through `Ledger::create_period`'s
`PeriodsOverlap`, and the quarter stands), run by
`every_bookspec_example_holds` and
`the_runner_reports_every_claimed_rule_green`; the example for the option
not picked, `period-a-period-that-partly-overlaps-another-is-allowed`, is
skipped.
### Product rules